- 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
+2 -12
View File
@@ -396,17 +396,6 @@ static char __findkey(char scancode, int mode)
#define ARROW_LEFT (SPECIALKEY|EXTENDED|0x6b)
#define ARROW_RIGHT (SPECIALKEY|EXTENDED|0x74)
static uint32_t readchar(ps2_if_t *pIF)
{
if (!pIF)
return -1;
while (!(SYS_PS2_BIT_RX_AVAIL & *pIF->pCTRL));
return (*pIF->pDATA & 0xFF);
}
uint32_t con_readchar(ps2_if_t *pIF)
{
uint8_t c;
@@ -417,7 +406,8 @@ uint32_t con_readchar(ps2_if_t *pIF)
int char_valid = 0;
uint8_t key;
key = readchar(pIF);
while (!(SYS_PS2_BIT_RX_AVAIL & *pIF->pCTRL));
key = *pIF->pDATA & 0xFF;
switch (key)
{