- refactored libsys

- added critical section
- added interrupt global enable/disable
- added console::getInstanveByName



git-svn-id: http://moon:8086/svn/mips@76 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
2017-01-12 16:25:20 +00:00
parent 0f4b7e015f
commit 5c9c50ebeb
21 changed files with 129 additions and 307 deletions
+5 -9
View File
@@ -7,11 +7,6 @@
#include <stddef.h>
#include "board.h"
#include "../../irq.h"
#include "../../mips_ps2.h"
#include "../../screen.h"
#include "../../uart.h"
#include "../../console.h"
extern void dbg_init();
extern void dbg_handler(struct xcptcontext * xcp);
@@ -27,10 +22,11 @@ static const con_if_entry_t con_if_entry[] =
{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, "UART-1", &uart_if[1], NULL, NULL, UART_readchar, UART_writechar},
{4, "PS2-0", &ps2_if[0], PS2_open, PS2_close, PS2_readchar, NULL},
{5, "PS2-1", &ps2_if[1], PS2_open, PS2_close, PS2_readchar, NULL},
{6, "VGA-0", &vga_if, cg_open, cg_close, NULL, cg_writechar}
{10, "UART-0", &uart_if[0], NULL, NULL, UART_readchar, UART_writechar},
{11, "UART-1", &uart_if[1], NULL, NULL, UART_readchar, UART_writechar},
{20, "PS2-0", &ps2_if[0], PS2_open, PS2_close, PS2_readchar, NULL},
{21, "PS2-1", &ps2_if[1], PS2_open, PS2_close, PS2_readchar, NULL},
{30, "VGA-0", &vga_if, cg_open, cg_close, NULL, cg_writechar}
};
con_if_t con_if =