From 231b288ed95600e3e6dfd8621d3cafe6588e91b2 Mon Sep 17 00:00:00 2001 From: tmk Date: Mon, 21 Jun 2021 18:09:27 +0900 Subject: [PATCH] ibmpc_usb: Inhibit until INIT state at powerup Keep keyboard inhibited until scan-loop starts with INIT state --- converter/ibmpc_usb/ibmpc_usb.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/converter/ibmpc_usb/ibmpc_usb.c b/converter/ibmpc_usb/ibmpc_usb.c index 1d0e2154..ef80a61e 100644 --- a/converter/ibmpc_usb/ibmpc_usb.c +++ b/converter/ibmpc_usb/ibmpc_usb.c @@ -90,7 +90,6 @@ DONE: void hook_early_init(void) { ibmpc_host_init(); - ibmpc_host_enable(); } void matrix_init(void) @@ -193,12 +192,10 @@ uint8_t matrix_scan(void) init_time = timer_read(); state = WAIT_SETTLE; + ibmpc_host_enable(); break; case WAIT_SETTLE: - // Reset when keyboad sends something - if (ibmpc_host_recv() != -1) { - state = AT_RESET; - } + while (ibmpc_host_recv() != -1) ; // read data // wait for keyboard to settle after plugin if (timer_elapsed(init_time) > 3000) {