FreeCalypso > hg > freecalypso-sw
view loadagent/main.c @ 1:da98dc08f575
loadagent: beginning to lay the foundation
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Mon, 29 Apr 2013 03:21:00 +0000 |
parents | |
children | ddda170fa6f4 |
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); } }