You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: if twi_mode != TWI_MODE_MASTER
bytes really read: if the bytes_to_read parameter > 0
0: if success (huh?)
1: if failure (huh?)
1: if master_trans_status != TWIM_STATUS_READY
The text was updated successfully, but these errors were encountered:
Wire.endTransmission()
's reference page says: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 ofTWI_MasterWrite()
, which returns the return value ofTWI_MasterWriteRead()
, which, contrary to its documentation:actually returns:
false
: iftwi_mode != TWI_MODE_MASTER
bytes_to_read
parameter > 00
: if success (huh?)1
: if failure (huh?)1
: ifmaster_trans_status != TWIM_STATUS_READY
The text was updated successfully, but these errors were encountered: