From: tmk Date: Sun, 5 Jul 2020 03:40:16 +0000 (+0900) Subject: ibmpc: Change timeout period: 1.0ms to 2.0ms X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=12eaedf9cf1a9ab3145ffaf15ff3df02c35e6f13;hp=7cf3060a6dbfe57909668833cb3edb702b0899bb;p=max%2Ftmk_keyboard.git ibmpc: Change timeout period: 1.0ms to 2.0ms Timeout error *could*(not always) detects when signal sequence takes beyond 1.0ms. Now this gives 2.0ms window at least to read signal sequence. --- diff --git a/tmk_core/protocol/ibmpc.c b/tmk_core/protocol/ibmpc.c index e84548c6..5f2ca79b 100644 --- a/tmk_core/protocol/ibmpc.c +++ b/tmk_core/protocol/ibmpc.c @@ -253,8 +253,8 @@ ISR(IBMPC_INT_VECT) if (isr_state == 0x8000) { timer_start = t; } else { - // should not take more than 1ms - if (timer_start != t && (uint8_t)(timer_start + 1) != t) { + // This gives 2.0ms at least before timeout + if ((uint8_t)(t - timer_start) >= 3) { ibmpc_isr_debug = isr_state; ibmpc_error = IBMPC_ERR_TIMEOUT; goto ERROR;