| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #ifndef PC80_KEYBOARD_H |
| 4 | #define PC80_KEYBOARD_H |
| 5 | |
| 6 | #include <types.h> |
| 7 | |
| 8 | #define NO_AUX_DEVICE 0 |
| 9 | #define PROBE_AUX_DEVICE 1 |
| 10 | |
| 11 | /* |
| 12 | * The Keyboard controller command byte |
| 13 | * |
| 14 | * BIT | Description |
| 15 | * ----+------------------------------------------------------- |
| 16 | * 7 | reserved, must be zero : |
| 17 | * 6 | XT Translation : 1 = on, 0 = off |
| 18 | * 5 | Disable Mouse Port : 1 = disable, 0 = enable |
| 19 | * 4 | Disable Keyboard Port : 1 = disable, 0 = enable |
| 20 | * 3 | reserved, must be zero : |
| 21 | * 2 | System Flag : 1 = self-test passed (DO NOT SET TO ZERO) |
| 22 | * 1 | Mouse Port Interrupts : 1 = enable, 0 = disable |
| 23 | * 0 | Keyboard Port Interrupts : 1 = enable, 0 = disable |
| 24 | * ----+------------------------------------------------------- |
| 25 | */ |
| 26 | enum { |
| 27 | PC_KBC_KBD_INT = 0, |
| 28 | PC_KBC_AUX_INT = 1, |
| 29 | PC_KBC_SYS = 2, |
| 30 | PC_KBC_KBD_DISABLE = 4, |
| 31 | PC_KBC_AUX_DISABLE = 5, |
| 32 | PC_KBC_TRANSLATE = 6, |
| 33 | }; |
| 34 | |
| 35 | uint8_t pc_keyboard_init(uint8_t probe_aux); |
| 36 | void set_kbc_ps2_mode(void); |
| 37 | enum cb_err pc_keyboard_set_command_byte_bit(u8 bit, u8 value); |
| 38 | |
| 39 | #endif /* PC80_KEYBOARD_H */ |