From: tmk Date: Mon, 11 May 2020 04:24:31 +0000 (+0900) Subject: ibmpc_usb: Add protocol and isr_debug check X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=fcebf2215f34a5197cc850b3146d10ca57f10d15;hp=0cf9dfc888755e18a88f71f40863e3dc035ab91a;p=max%2Ftmk_keyboard.git ibmpc_usb: Add protocol and isr_debug check --- diff --git a/converter/ibmpc_usb/ibmpc_usb.c b/converter/ibmpc_usb/ibmpc_usb.c index 99e65a4a..007ab0ba 100644 --- a/converter/ibmpc_usb/ibmpc_usb.c +++ b/converter/ibmpc_usb/ibmpc_usb.c @@ -105,6 +105,7 @@ void matrix_init(void) * d. ID is BF BF: Terminal keyboard CodeSet3 * e. error on recv: maybe broken PS/2 */ +uint8_t current_protocol = 0; uint16_t keyboard_id = 0x0000; keyboard_kind_t keyboard_kind = NONE; uint8_t matrix_scan(void) @@ -141,6 +142,18 @@ uint8_t matrix_scan(void) ibmpc_error = IBMPC_ERR_NONE; } + // check ISR state debug + if (ibmpc_isr_debug) { + xprintf("\nISR:%04X\n", ibmpc_isr_debug); + ibmpc_isr_debug = 0; + } + + // check protocol AT/XT + if (ibmpc_protocol != current_protocol) { + xprintf("\nPROTO:%02X\n", ibmpc_protocol); + current_protocol = ibmpc_protocol; + } + switch (state) { case INIT: xprintf("I%u ", timer_read());