From fcebf2215f34a5197cc850b3146d10ca57f10d15 Mon Sep 17 00:00:00 2001 From: tmk Date: Mon, 11 May 2020 13:24:31 +0900 Subject: [PATCH 1/1] ibmpc_usb: Add protocol and isr_debug check --- converter/ibmpc_usb/ibmpc_usb.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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()); -- 2.46.2