uart: do not reload static timeout as it is already past (static timeout is used to compensate response delay)
This commit is contained in:
parent
555c32015c
commit
e110a78de7
1 changed files with 1 additions and 1 deletions
|
@ -262,7 +262,7 @@ uart_receive (serial_port sp, byte_t * pbtRx, size_t * pszRx)
|
|||
|
||||
*pszRx += res;
|
||||
// Reload timeout with a low value to prevent from waiting too long on slow devices (16x is enought to took at least 1 byte)
|
||||
tv.tv_usec = uiTimeoutStatic + uiTimeoutPerByte * MIN( iExpectedByteCount, 16 );
|
||||
tv.tv_usec = uiTimeoutPerByte * MIN( iExpectedByteCount, 16 );
|
||||
// DBG("Timeout reloaded at: %d µs", tv.tv_usec);
|
||||
} while (byteCount && (iExpectedByteCount > 0));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue