-
-
Notifications
You must be signed in to change notification settings - Fork 65
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Wire.endTransmission()'s reference page says:
Returns
byte, which indicates the status of the transmission:
- 0:success
- 1:data too long to fit in transmit buffer
- 2:received NACK on transmit of address
- 3:received NACK on transmit of data
- 4:other error
From my reading of this repository's Wire library code, it doesn't seem to comply with the documentation. Wire.endTransmission() returns the return value of TWI_MasterWrite(), which returns the return value of TWI_MasterWriteRead(), which, contrary to its documentation:
* \retval true If transaction could be started.
* \retval false If transaction could not be started.
actually returns:
false: iftwi_mode != TWI_MODE_MASTER- bytes really read: if the
bytes_to_readparameter > 0 0: if success (huh?)1: if failure (huh?)1: ifmaster_trans_status != TWIM_STATUS_READY
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working