From cb026d74a5b05763f5cf7c2b5326356639e99831 Mon Sep 17 00:00:00 2001 From: tmk Date: Fri, 17 Jan 2020 13:41:14 +0900 Subject: [PATCH] ibmpc_usb: Fix Disable/Enable keyboard - Return without enabling with F4 for 84-key AT wrongly before this fix - disable/enable doesn't seems to be needed --- converter/ibmpc_usb/ibmpc_usb.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/converter/ibmpc_usb/ibmpc_usb.c b/converter/ibmpc_usb/ibmpc_usb.c index 0527cfcf..ae897bb0 100644 --- a/converter/ibmpc_usb/ibmpc_usb.c +++ b/converter/ibmpc_usb/ibmpc_usb.c @@ -55,22 +55,23 @@ static uint16_t read_keyboard_id(void) int16_t code = 0; // Disable - code = ibmpc_host_send(0xF5); + //code = ibmpc_host_send(0xF5); // Read ID code = ibmpc_host_send(0xF2); - if (code == -1) return 0xFFFF; // XT or No keyboard - if (code != 0xFA) return 0xFFFE; // Broken PS/2? + if (code == -1) { id = 0xFFFF; goto DONE; } // XT or No keyboard + if (code != 0xFA) { id = 0xFFFE; goto DONE; } // Broken PS/2? code = read_wait(1000); - if (code == -1) return 0x0000; // AT + if (code == -1) { id = 0x0000; goto DONE; } // AT id = (code & 0xFF)<<8; code = read_wait(1000); id |= code & 0xFF; +DONE: // Enable - code = ibmpc_host_send(0xF4); + //code = ibmpc_host_send(0xF4); return id; } -- 2.46.2