FreeCalypso > hg > freecalypso-sw
view target-utils/pirexplore/main.c @ 70:e2698daf40d1
dieid implemented in fc-loadtool as well
| author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
|---|---|
| date | Fri, 26 Jul 2013 17:51:49 +0000 |
| parents | a323b4cc69e6 |
| children | 8138a6380ae3 |
line wrap: on
line source
#include "types.h" #include "romvars.h" extern struct boot_rom_vars rom_vars; extern char *uart_name; main() { uart_select_init(); printf("Pirelli hardware exploration utility running\n"); printf("Loaded via UART %d (%s) at baud rate #%d\n", rom_vars.uart_id, uart_name, rom_vars.baud_rate_code); printf("TCXO clock input autodetected to be %d MHz\n", rom_vars.clktcxo_13mhz ? 13 : 26); /* * Make the same register settings as in the init script used by * fc-loadtool and fc-xram: ../../loadtools/scripts/pirelli.init */ *(volatile u16 *)0xfffffb00 = 0x00A4; *(volatile u16 *)0xfffffb02 = 0x00A4; *(volatile u16 *)0xfffffb06 = 0x00A4; *(volatile u16 *)0xfffef006 = 0x0008; for (;;) { putchar('='); if (command_entry()) command_dispatch(); } }
