Revision 48
Fixes
lab3.c | ||
---|---|---|
33 | 33 |
} |
34 | 34 |
|
35 | 35 |
extern uint8_t scancode[2]; |
36 |
extern int two_byte_scancode; |
|
36 |
extern int sz; |
|
37 |
extern int done; |
|
37 | 38 |
extern int got_error; |
38 | 39 |
extern uint32_t sys_inb_counter; |
39 | 40 |
|
... | ... | |
59 | 60 |
case HARDWARE: /* hardware interrupt notification */ |
60 | 61 |
if (msg.m_notify.interrupts & kbc_irq) { /* subscribed interrupt */ |
61 | 62 |
kbc_ih(); |
62 |
if (!(two_byte_scancode || got_error)) { /* finished processing a scancode */ |
|
63 |
if (scancode[0] == TWO_BYTE_CODE) kbd_print_scancode(!(scancode[1] & BREAK_CODE_BIT), 2, scancode); |
|
64 |
else kbd_print_scancode(!(scancode[0] & BREAK_CODE_BIT), 1, scancode); |
|
65 |
} else { break; } |
|
63 |
if(done) |
|
64 |
kbd_print_scancode(!(scancode[sz-1] & BREAK_CODE_BIT), sz, scancode); |
|
65 |
|
|
66 | 66 |
if (scancode[0] == ESC_BREAK_CODE) good = 0; |
67 | 67 |
} |
68 | 68 |
break; |
... | ... | |
134 | 134 |
} |
135 | 135 |
if (msg.m_notify.interrupts & kbc_irq) { /// subscribed interrupt |
136 | 136 |
kbc_ih(); |
137 |
if (!(two_byte_scancode || got_error)) { /// finished processing a scancode |
|
138 |
if (scancode[0] == TWO_BYTE_CODE) kbd_print_scancode(!(scancode[1] & BREAK_CODE_BIT), 2, scancode); |
|
139 |
else kbd_print_scancode(!(scancode[0] & BREAK_CODE_BIT), 1, scancode); |
|
137 |
if(done) { |
|
138 |
kbd_print_scancode(!(scancode[sz-1] & BREAK_CODE_BIT), sz, scancode); |
|
140 | 139 |
time = 0; |
141 | 140 |
no_interrupts = 0; |
142 | 141 |
if (scancode[0] == ESC_BREAK_CODE) good = 0; |
Also available in: Unified diff