From 7587fe33822af56e257d68064323f737c6d414f5 Mon Sep 17 00:00:00 2001 From: tmk Date: Wed, 8 Jan 2020 15:00:44 +0900 Subject: [PATCH] ibmpc: Fix how to initialize keyboard --- converter/ibmpc_usb/ibmpc_usb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/converter/ibmpc_usb/ibmpc_usb.c b/converter/ibmpc_usb/ibmpc_usb.c index b861c4fb..0527cfcf 100644 --- a/converter/ibmpc_usb/ibmpc_usb.c +++ b/converter/ibmpc_usb/ibmpc_usb.c @@ -78,10 +78,6 @@ static uint16_t read_keyboard_id(void) void matrix_init(void) { debug_enable = true; - ibmpc_host_init(); - - // hard reset for XT keyboard - IBMPC_RESET(); // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00; @@ -138,6 +134,9 @@ uint8_t matrix_scan(void) keyboard_id = 0x0000; last_time = timer_read(); state = WAIT_STARTUP; + + ibmpc_host_init(); + IBMPC_RESET(); // hard reset for some old XT keyboards matrix_clear(); clear_keyboard(); break; -- 2.46.2