Revision 67
not working
keyboard.c | ||
---|---|---|
14 | 14 |
return SUCCESS; |
15 | 15 |
} |
16 | 16 |
|
17 |
int done = 1; |
|
18 |
int sz = 1; |
|
17 |
int keyboard_done = 1;
|
|
18 |
int scancode_sz = 1;
|
|
19 | 19 |
int got_error_keyboard = 0; |
20 | 20 |
|
21 | 21 |
void (kbc_ih)(void) { |
22 |
if(done) sz = 1; |
|
23 |
else sz++; |
|
22 |
if(keyboard_done) scancode_sz = 0; |
|
24 | 23 |
uint8_t status = 0; |
25 | 24 |
got_error_keyboard = 0; |
26 | 25 |
if (util_sys_inb(STATUS_REG, &status)) { |
... | ... | |
40 | 39 |
got_error_keyboard = 1; |
41 | 40 |
return; |
42 | 41 |
} |
43 |
scancode[sz-1] = byte; |
|
44 |
done = !(TWO_BYTE_CODE == byte); |
|
42 |
scancode[scancode_sz] = byte; |
|
43 |
scancode_sz++; |
|
44 |
keyboard_done = !(TWO_BYTE_CODE == byte); |
|
45 | 45 |
} |
46 | 46 |
|
47 | 47 |
int (keyboard_poll)(uint8_t bytes[], uint8_t *size){ |
Also available in: Unified diff