mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-26 17:46:14 +01:00
Non-blocking I2C - reset byte counters on timeout.
This commit is contained in:
parent
10c8915d33
commit
e8e00f69d6
|
@ -196,6 +196,7 @@ void I2CManagerClass::checkForTimeout() {
|
|||
queueHead = t->nextRequest;
|
||||
if (!queueHead) queueTail = NULL;
|
||||
currentRequest = NULL;
|
||||
bytesToReceive = bytesToSend = 0;
|
||||
// Post request as timed out.
|
||||
t->status = I2C_STATUS_TIMEOUT;
|
||||
// Reset TWI interface so it is able to continue
|
||||
|
|
Loading…
Reference in New Issue
Block a user