mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-30 03:26:13 +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;
|
queueHead = t->nextRequest;
|
||||||
if (!queueHead) queueTail = NULL;
|
if (!queueHead) queueTail = NULL;
|
||||||
currentRequest = NULL;
|
currentRequest = NULL;
|
||||||
|
bytesToReceive = bytesToSend = 0;
|
||||||
// Post request as timed out.
|
// Post request as timed out.
|
||||||
t->status = I2C_STATUS_TIMEOUT;
|
t->status = I2C_STATUS_TIMEOUT;
|
||||||
// Reset TWI interface so it is able to continue
|
// Reset TWI interface so it is able to continue
|
||||||
|
|
Loading…
Reference in New Issue
Block a user