Skip to content

Commit

Permalink
ibmpc: Fix start bit error for Zenith Z-150 AT #661
Browse files Browse the repository at this point in the history
ibmpc_host_send() can miss 1st clock from Zenith Z-150 AT sometimes.
#661 (comment)
  • Loading branch information
tmk committed Feb 6, 2021
1 parent a4bdf5e commit 8e34275
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tmk_core/protocol/ibmpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ int16_t ibmpc_host_send(uint8_t data)
data_lo();
wait_us(100);
clock_hi(); // [5]p.54 [clock low]>100us [5]p.50
WAIT(clock_lo, 10000, 1); // [5]p.53, -10ms [5]p.50
WAIT(clock_lo, 60000, 1); // [5]p.53, -10ms [5]p.50

/* Data bit[2-9] */
for (uint8_t i = 0; i < 8; i++) {
Expand Down Expand Up @@ -162,6 +162,8 @@ int16_t ibmpc_host_send(uint8_t data)
// https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-Protocol#zenith-z-150-beige
if (!ibmpc_protocol && ibmpc_error == 7) { goto RECV; }

inhibit();
wait_ms(2);
idle();
IBMPC_INT_ON();
return -1;
Expand Down

0 comments on commit 8e34275

Please sign in to comment.