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.
This commit is contained in:
parent
7cf3060a6d
commit
12eaedf9cf
1 changed files with 2 additions and 2 deletions
|
|
@ -253,8 +253,8 @@ ISR(IBMPC_INT_VECT)
|
||||||
if (isr_state == 0x8000) {
|
if (isr_state == 0x8000) {
|
||||||
timer_start = t;
|
timer_start = t;
|
||||||
} else {
|
} else {
|
||||||
// should not take more than 1ms
|
// This gives 2.0ms at least before timeout
|
||||||
if (timer_start != t && (uint8_t)(timer_start + 1) != t) {
|
if ((uint8_t)(t - timer_start) >= 3) {
|
||||||
ibmpc_isr_debug = isr_state;
|
ibmpc_isr_debug = isr_state;
|
||||||
ibmpc_error = IBMPC_ERR_TIMEOUT;
|
ibmpc_error = IBMPC_ERR_TIMEOUT;
|
||||||
goto ERROR;
|
goto ERROR;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue