We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 028b420 commit 3804723Copy full SHA for 3804723
libraries/Wire/Wire_nRF52.cpp
@@ -214,7 +214,9 @@ uint8_t TwoWire::endTransmission(bool stopBit)
214
while(!_p_twim->EVENTS_TXSTARTED && !_p_twim->EVENTS_ERROR);
215
_p_twim->EVENTS_TXSTARTED = 0x0UL;
216
217
- while(!_p_twim->EVENTS_LASTTX && !_p_twim->EVENTS_ERROR);
+ if (txBuffer.available()) {
218
+ while(!_p_twim->EVENTS_LASTTX && !_p_twim->EVENTS_ERROR);
219
+ }
220
_p_twim->EVENTS_LASTTX = 0x0UL;
221
222
if (stopBit || _p_twim->EVENTS_ERROR)
0 commit comments