summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7cf3060)
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.
if (isr_state == 0x8000) {
timer_start = t;
} else {
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;
ibmpc_isr_debug = isr_state;
ibmpc_error = IBMPC_ERR_TIMEOUT;
goto ERROR;