8000 Fix `Wire::endTransmission()` · RedBearLab/nRF51822-Arduino@a93bbc2 · GitHub
[go: up one dir, main page]

Skip to content

Commit a93bbc2

Browse files
authored
Fix Wire::endTransmission()
The current impementation returns the number of bytes written. However, according to [Arduino Documentation](https://www.arduino.cc/en/Reference/WireEndTransmission), it should return 0 on success.
1 parent b33a278 commit a93bbc2

File tree

1 file changed

+1
-1
lines changed
  • arduino-1.6.x/hardware/RBL/RBL_nRF51822/libraries/Wire

1 file changed

+1
-1
lines changed

arduino-1.6.x/hardware/RBL/RBL_nRF51822/libraries/Wire/Wire.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ int8_t TwoWire::endTransmission( uint8_t stop)
102102
{
103103
int8_t result=0;
104104

105-
result = i2c_write(&i2c, Transfer_Addr, (const char *)TX_Buffer, TX_BufferHead, stop);
105+
i2c_write(&i2c, Transfer_Addr, (const char *)TX_Buffer, TX_BufferHead, stop);
106106

107107
TX_BufferHead = 0;
108108
twi_status = MASTER_IDLE;

0 commit comments

Comments
 (0)
0