Skip to content

Commit

Permalink
Fix _tx_active handling for Wire Slave
Browse files Browse the repository at this point in the history
  • Loading branch information
GrumpyOldPizza committed Sep 18, 2018
1 parent ed5e31f commit 7548c23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/Wire/src/Wire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,13 @@ void TwoWire::EventCallback(uint32_t events)

if (events & I2C_EVENT_TRANSMIT_REQUEST) {
_tx_write = 0;
_tx_active = true;

if(_requestCallback) {
(*_requestCallback)();
}

_tx_active = false;

stm32l4_i2c_service(_i2c, &_tx_data[0], _tx_write);
}
Expand Down

0 comments on commit 7548c23

Please sign in to comment.