Revision 31
Minor changes
lab3.c | ||
---|---|---|
1 | 1 |
#include <lcom/lcf.h> |
2 |
|
|
3 | 2 |
#include <lcom/lab3.h> |
4 | 3 |
|
5 | 4 |
#include <stdbool.h> |
... | ... | |
34 | 33 |
|
35 | 34 |
extern uint8_t scancode[2]; |
36 | 35 |
extern int two_byte_scancode; |
36 |
extern int got_error; |
|
37 | 37 |
|
38 | 38 |
int(kbd_test_scan)() { |
39 | 39 |
|
... | ... | |
60 | 60 |
|
61 | 61 |
kbc_ih(); |
62 | 62 |
|
63 |
if (!two_byte_scancode) { /* finished processing a scancode */
|
|
63 |
if (!(two_byte_scancode || got_error)) { /* finished processing a scancode */
|
|
64 | 64 |
if (scancode[0] == TWO_BYTE_CODE) |
65 | 65 |
kbd_print_scancode(!(scancode[1] & BREAK_CODE_BIT), 2, scancode); |
66 | 66 |
else |
67 | 67 |
kbd_print_scancode(!(scancode[0] & BREAK_CODE_BIT), 1, scancode); |
68 |
} else { |
|
69 |
break; |
|
68 | 70 |
} |
69 | 71 |
|
70 | 72 |
if (scancode[0] == ESC_BREAK_CODE) |
Also available in: Unified diff