- 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:
+2
-12
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user