Revision 38
few changes to polling
lab3.c | ||
---|---|---|
96 | 96 |
if(kbd_poll(c, &size)) return 1; |
97 | 97 |
if(kbd_print_scancode((~c[0])&BREAK_CODE_BIT, size, c)) return 1; |
98 | 98 |
}while(!(size == 1 && c[0] == ESC_BREAK_CODE)); |
99 |
|
|
100 |
uint8_t cmd = 0; |
|
101 |
if(kbd_read_cmd(&cmd)) return 1; |
|
102 |
printf("%x\n", cmd); |
|
103 |
|
|
99 | 104 |
return 0; |
100 | 105 |
} |
101 | 106 |
|
Also available in: Unified diff