diff --git a/src/libsys/boards/denano/board.c b/src/libsys/boards/denano/board.c index b549c6f..05380c1 100644 --- a/src/libsys/boards/denano/board.c +++ b/src/libsys/boards/denano/board.c @@ -12,8 +12,6 @@ #include "../../asm/regdef.h" #include "../../syscalls.h" -extern uart_if_t uart_if[]; - #ifdef WITH_ROM_DEBUGGER const fp_xcpt_t dbg_func = (fp_xcpt_t)0xbfc01fc0; #else @@ -40,6 +38,18 @@ const fp_xcpt_t dbg_func = (fp_xcpt_t)dbg_stub; #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0])) +// --------------------------------------------------------------------------------- +// Uart +// --------------------------------------------------------------------------------- +const uart_if_t uart_if[] = +{ + {(uint32_t*)SYS_UART0_STAT, (uint32_t*)SYS_UART0_DATA, (uint32_t*)SYS_UART0_BAUD}, + {(uint32_t*)SYS_UART1_STAT, (uint32_t*)SYS_UART1_DATA, (uint32_t*)SYS_UART1_BAUD} +}; + +// --------------------------------------------------------------------------------- +// Console +// --------------------------------------------------------------------------------- const con_if_entry_t con_if_entry[] = { {0, "stdin", &uart_if[0], NULL, NULL, UART_readchar, NULL}, diff --git a/src/libsys/boards/ml402/board.c b/src/libsys/boards/ml402/board.c index 3b910ca..6cb049a 100644 --- a/src/libsys/boards/ml402/board.c +++ b/src/libsys/boards/ml402/board.c @@ -12,7 +12,9 @@ #include "../../asm/regdef.h" #include "../../syscalls.h" -extern uart_if_t uart_if[]; +// --------------------------------------------------------------------------------- +// Debugger +// --------------------------------------------------------------------------------- #ifdef WITH_ROM_DEBUGGER const fp_xcpt_t dbg_func = (fp_xcpt_t)0xbfc01fc0; #else @@ -36,8 +38,20 @@ int dbg_stub(struct xcptcontext * xcp) const fp_xcpt_t dbg_func = (fp_xcpt_t)dbg_stub; #endif +// --------------------------------------------------------------------------------- +// Uart +// --------------------------------------------------------------------------------- #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0])) +const uart_if_t uart_if[] = +{ + {(uint32_t*)SYS_UART0_STAT, (uint32_t*)SYS_UART0_DATA, (uint32_t*)SYS_UART0_BAUD}, + {(uint32_t*)SYS_UART1_STAT, (uint32_t*)SYS_UART1_DATA, (uint32_t*)SYS_UART1_BAUD} +}; + +// --------------------------------------------------------------------------------- +// Console +// --------------------------------------------------------------------------------- const con_if_entry_t con_if_entry[] = { {0, "stdin", &uart_if[0], NULL, NULL, UART_readchar, NULL}, diff --git a/src/libsys/boards/sim/board.c b/src/libsys/boards/sim/board.c index 4ea954c..40d2309 100644 --- a/src/libsys/boards/sim/board.c +++ b/src/libsys/boards/sim/board.c @@ -12,10 +12,20 @@ #include "../../asm/regdef.h" #include "../../syscalls.h" -extern uart_if_t uart_if[]; - #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0])) +// --------------------------------------------------------------------------------- +// Uart +// --------------------------------------------------------------------------------- +const uart_if_t uart_if[] = +{ + {(uint32_t*)SYS_UART0_STAT, (uint32_t*)SYS_UART0_DATA, (uint32_t*)SYS_UART0_BAUD}, + {(uint32_t*)SYS_UART1_STAT, (uint32_t*)SYS_UART1_DATA, (uint32_t*)SYS_UART1_BAUD} +}; + +// --------------------------------------------------------------------------------- +// Console +// --------------------------------------------------------------------------------- const con_if_entry_t con_if_entry[] = { {0, "stdin", &uart_if[0], NULL, NULL, UART_readchar, NULL},