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
This commit is contained in:
tmk 2022-08-18 19:30:30 +09:00
parent dfe1143812
commit 52cdb909c9
2 changed files with 17 additions and 0 deletions

View file

@ -45,6 +45,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// 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

View file

@ -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()) {