6 #define KBD_BUFFER_SIZE 32
7 #define KBD_WRAP_MASK 0x1F
9 #define disable() __asm__("cli\n\t")
10 #define enable() __asm__("sti\n\t")
12 #define ALT_PRESSED (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED)
13 #define CTRL_PRESSED (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)
17 * Keyboard controller ports
20 #define KBD_DATA_PORT 0x60
21 #define KBD_CTRL_PORT 0x64
28 #define KBD_READ_MODE 0x20
29 #define KBD_WRITE_MODE 0x60
30 #define KBD_SELF_TEST 0xAA
31 #define KBD_LINE_TEST 0xAB
32 #define KBD_CTRL_ENABLE 0xAE
38 #define KBD_ENABLE 0xF4
39 #define KBD_DISABLE 0xF5
40 #define KBD_RESET 0xFF
48 #define KBD_BATCC 0xAA
52 * Controller status register bits
65 #define KBD_LED_SCROLL 0x01
66 #define KBD_LED_NUM 0x02
67 #define KBD_LED_CAPS 0x04