- fixed file descriptor table
- abstract I/O to mips_dbg git-svn-id: http://moon:8086/svn/mips@73 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "board.h"
|
||||
|
||||
#include "../../irq.h"
|
||||
#include "../../uart.h"
|
||||
#include "../../console.h"
|
||||
|
||||
@@ -17,8 +18,10 @@ extern uart_if_t uart_if[];
|
||||
|
||||
const con_if_entry_t con_if_entry[] =
|
||||
{
|
||||
{"UART-0", &uart_if[0], NULL, NULL, UART_readchar, UART_writechar},
|
||||
{"UART-1", &uart_if[1], NULL, NULL, UART_readchar, UART_writechar}
|
||||
{0, "stdin", &uart_if[0], NULL, NULL, UART_readchar, NULL},
|
||||
{1, "stdout", &uart_if[0], NULL, NULL, NULL, UART_writechar},
|
||||
{2, "stderr", &uart_if[0], NULL, NULL, NULL, UART_writechar},
|
||||
{3, "UART1", &uart_if[1], NULL, NULL, UART_readchar, UART_writechar}
|
||||
};
|
||||
|
||||
con_if_t con_if =
|
||||
@@ -43,4 +46,14 @@ void board_init(void)
|
||||
dbg_init();
|
||||
|
||||
// Do some initializations here
|
||||
}
|
||||
}
|
||||
|
||||
void dbg_putchar(char c)
|
||||
{
|
||||
writechar(3, c);
|
||||
}
|
||||
|
||||
char dbg_getchar()
|
||||
{
|
||||
return (char)readchar(3);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user