Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pic32/libraries/Wire/Wire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ uint8_t TwoWire::endTransmission(uint8_t fStopBit)
// a collision or the slave acked, in either case report a NACK from the slave
if(!di2c.getStatus().fMyBus)
{
//Make sure to discard transmit buffer if slave NACK, otherwise next beginTransmission will freeze system
di2c.abort();

return(2);
}

Expand Down