- instantiate uart_ifs in board

git-svn-id: http://moon:8086/svn/mips@182 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
2021-11-22 14:11:12 +00:00
parent 0d50f924ca
commit f26090a5a2
3 changed files with 39 additions and 5 deletions
+12 -2
View File
@@ -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},
+15 -1
View File
@@ -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},
+12 -2
View File
@@ -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},