Skip to content

Commit 7753177

Browse files
authored
Wrong Spot!
Put the txQueue=0; in the correct place!
1 parent 1a458dc commit 7753177

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/Wire/src/Wire.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ size_t TwoWire::requestFrom(uint8_t address, size_t size, bool sendStop){
158158
rxIndex = 0;
159159
rxLength = 0;
160160
rxQueued = 0;
161-
txQueued = 0;
162161
last_error = I2C_ERROR_MEMORY;
163162
i2cFreeQueue(i2c);
164163
return cnt;
@@ -172,6 +171,7 @@ size_t TwoWire::requestFrom(uint8_t address, size_t size, bool sendStop){
172171
rxIndex = 0;
173172
rxLength = i2cQueueReadCount(i2c);
174173
rxQueued = 0;
174+
txQueued = 0;
175175
cnt = rxLength;
176176
i2cFreeQueue(i2c);
177177
}

0 commit comments

Comments
 (0)