From 52cdb909c9a65741b6517ed18b400e2a8164dada Mon Sep 17 00:00:00 2001 From: tmk Date: Thu, 18 Aug 2022 19:30:30 +0900 Subject: [PATCH] ibmpc: siemens: Add inhibit after send/recv #747 SIEMENS PCD 2 Keyboard seems to require "inhibit" for a while after sending and receiving session, for some reason. A computer that can work with the keyboard adds "inhibit" after communications, and this appears to be remedy for the keyboard. https://github.com/tmk/tmk_keyboard/issues/747 --- converter/ibmpc_usb/config.h | 3 +++ tmk_core/protocol/ibmpc.cpp | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/converter/ibmpc_usb/config.h b/converter/ibmpc_usb/config.h index bf61aa6d..34ce5d65 100644 --- a/converter/ibmpc_usb/config.h +++ b/converter/ibmpc_usb/config.h @@ -45,6 +45,9 @@ along with this program. If not, see . // G80-2551 terminal keyboard support #define G80_2551_SUPPORT +// SIEMENS PCD 2 keyboard support +#define SIEMENS_PCD_SUPPORT + // Mouse Extended Report //#define MOUSE_EXT_REPORT diff --git a/tmk_core/protocol/ibmpc.cpp b/tmk_core/protocol/ibmpc.cpp index e9af15c6..3f931c10 100644 --- a/tmk_core/protocol/ibmpc.cpp +++ b/tmk_core/protocol/ibmpc.cpp @@ -140,6 +140,13 @@ RETRY: WAIT(data_hi, 300, 7); WAIT(clock_hi, 300, 8); +#ifdef SIEMENS_PCD_SUPPORT + // inhibit - https://github.com/tmk/tmk_keyboard/issues/747 + wait_us(15); + clock_lo(); + wait_us(150); +#endif + // clear buffer to get response correctly host_isr_clear(); @@ -360,6 +367,13 @@ void IBMPC::isr(void) } DONE: +#ifdef SIEMENS_PCD_SUPPORT + // inhibit - https://github.com/tmk/tmk_keyboard/issues/747 + clock_lo(); + wait_us(150); + clock_hi(); +#endif + // store data ringbuf_put(isr_state & 0xFF); if (ringbuf_is_full()) {