From: tmk Date: Mon, 26 Oct 2020 17:33:33 +0000 (+0900) Subject: ibmpc: Fix XT reset comment and add inhibit_xt() X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=842b3f29b6d09adcc2d0b6c5a1a525b6c4f7e2f8;p=max%2Ftmk_keyboard.git ibmpc: Fix XT reset comment and add inhibit_xt() --- diff --git a/converter/ibmpc_usb/ibmpc_usb.c b/converter/ibmpc_usb/ibmpc_usb.c index cf1ab0b7..43dcf0d8 100644 --- a/converter/ibmpc_usb/ibmpc_usb.c +++ b/converter/ibmpc_usb/ibmpc_usb.c @@ -204,9 +204,10 @@ uint8_t matrix_scan(void) case XT_RESET: // Reset XT-initialize keyboard // XT: hard reset 500ms for IBM XT Type-1 keyboard and clones - // XT: soft reset 20ms min(clock Lo) - ibmpc_host_disable(); // soft reset: inihibit(clock Lo/Data Hi) - IBMPC_RST_LO(); // hard reset: reset pin Lo + // XT: soft reset 20ms min + // https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol#keyboard-soft-reset + ibmpc_host_disable(); // soft reset: Clock Lo/Data Hi + IBMPC_RST_LO(); // hard reset: Reset pin Lo init_time = timer_read(); state = XT_RESET_WAIT; @@ -217,9 +218,9 @@ uint8_t matrix_scan(void) } break; case XT_RESET_DONE: - IBMPC_RST_HIZ(); // hard reset: reset pin HiZ + IBMPC_RST_HIZ(); // hard reset: Reset pin HiZ ibmpc_host_isr_clear(); - ibmpc_host_enable(); // soft reset: idle(clock Hi/Data Hi) + ibmpc_host_enable(); // soft reset: idle(Clock Hi/Data Hi) xprintf("X%u ", timer_read()); init_time = timer_read(); diff --git a/tmk_core/protocol/ibmpc.h b/tmk_core/protocol/ibmpc.h index 4f682aa7..64bc2c8a 100644 --- a/tmk_core/protocol/ibmpc.h +++ b/tmk_core/protocol/ibmpc.h @@ -188,11 +188,17 @@ static inline void idle(void) data_hi(); } -/* inhibit device to send */ +/* inhibit device to send(AT), soft reset(XT) */ static inline void inhibit(void) { clock_lo(); data_hi(); } +/* inhibit device to send(XT) */ +static inline void inhibit_xt(void) +{ + clock_hi(); + data_lo(); +} #endif