From: tmk Date: Fri, 17 Jan 2020 04:41:14 +0000 (+0900) Subject: ibmpc_usb: Fix Disable/Enable keyboard X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=cb026d74a5b05763f5cf7c2b5326356639e99831;p=max%2Ftmk_keyboard.git 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 --- 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; }