FreeCalypso > hg > freecalypso-sw
view loadagent/main.c @ 4:5c7b3d5d5702
libprintf compiles with Anshit C GCC
| author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
|---|---|
| date | Mon, 29 Apr 2013 07:19:34 +0000 |
| parents | ddda170fa6f4 |
| children | 4a7a325ed1b6 |
line wrap: on
line source
/* * FreeCalypso loadagent main() function lives here */ #include "types.h" #include "romvars.h" #include "ns16550.h" #include "halt.h" #include <stdio.h> extern struct boot_rom_vars rom_vars; struct ns16550_regs *uart_base; char *uart_name; uart_select_init() { switch (rom_vars.uart_id) { case 0: uart_base = (struct ns16550_regs *) 0xFFFF5800; uart_name = "MODEM"; break; case 1: uart_base = (struct ns16550_regs *) 0xFFFF5000; uart_name = "IrDA"; break; default: _exit(HALTCODE_INVALIDUART); } } main() { uart_select_init(); #if 0 printf("FreeCalypso loadagent 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); #endif /* interactive command mode to be implemented */ while (1) ; }
