Skip to content

Commit 7548c23

Browse files
Fix _tx_active handling for Wire Slave
1 parent ed5e31f commit 7548c23

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: libraries/Wire/src/Wire.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -404,10 +404,13 @@ void TwoWire::EventCallback(uint32_t events)
404404

405405
if (events & I2C_EVENT_TRANSMIT_REQUEST) {
406406
_tx_write = 0;
407+
_tx_active = true;
407408

408409
if(_requestCallback) {
409410
(*_requestCallback)();
410411
}
412+
413+
_tx_active = false;
411414

412415
stm32l4_i2c_service(_i2c, &_tx_data[0], _tx_write);
413416
}

0 commit comments

Comments
 (0)