Skip to content
Merged
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
8 changes: 3 additions & 5 deletions libraries/Wire/Wire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,9 @@ uint8_t TwoWire::endTransmission(uint8_t sendStop)
if (txBufferLength >= 1) {
err = i2c_writebytes(txBuffer, txBufferLength, !sendStop);
} else {
/* FIXME: A zero byte transmit is typically used to check for an
* ACK from the slave device. This is currently not supported by
* this library implementation
*/
return 4; // Other error
//Workaround: I2C bus scan is currently implemented by sending an extra byte of value 0
txBuffer[0] = 0;
err = i2c_writebytes(txBuffer, 1, !sendStop);
}
// empty buffer
txBufferLength = 0;
Expand Down