diff options
-rw-r--r-- | chip/npcx/lpc.c | 11 | ||||
-rw-r--r-- | include/lpc.h | 8 |
2 files changed, 16 insertions, 3 deletions
diff --git a/chip/npcx/lpc.c b/chip/npcx/lpc.c index 1bcb5571b1..4e297654b8 100644 --- a/chip/npcx/lpc.c +++ b/chip/npcx/lpc.c @@ -314,12 +314,17 @@ void lpc_keyboard_put_char(uint8_t chr, int send_irq) } } -/* Put a char to host buffer by HIMDO */ -void lpc_mouse_put_char(uint8_t chr) +/* Put an aux char to host buffer by HIMDO and assert status bit 5. */ +void lpc_aux_put_char(uint8_t chr, int send_irq) { + if (send_irq) + SET_BIT(NPCX_HICTRL, NPCX_HICTRL_OBFMIE); + else + CLEAR_BIT(NPCX_HICTRL, NPCX_HICTRL_OBFMIE); + NPCX_HIKMST |= I8042_AUX_DATA; NPCX_HIMDO = chr; - CPRINTS("Mouse put %02x", chr); + CPRINTS("AUX put %02x", chr); /* Enable OBE interrupt to detect host read data out */ SET_BIT(NPCX_HICTRL, NPCX_HICTRL_OBECIE); diff --git a/include/lpc.h b/include/lpc.h index 8cbd29292c..2a69cbced8 100644 --- a/include/lpc.h +++ b/include/lpc.h @@ -36,6 +36,14 @@ int lpc_keyboard_input_pending(void); void lpc_keyboard_put_char(uint8_t chr, int send_irq); /** + * Send an aux byte to host via keyboard port 0x60. + * + * @param chr Byte to send + * @param send_irq If non-zero, asserts IRQ + */ +void lpc_aux_put_char(uint8_t chr, int send_irq); + +/** * Clear the keyboard buffer. */ void lpc_keyboard_clear_buffer(void); |