Skip to content

Commit 641482d

Browse files
authored
Merge pull request #57 from soburi/wire_requestfrom_always_return_zero
Fix #56, Correcting the problem that TwoWire::requestFrom() return value always zero
2 parents ace1f6b + 6d657f7 commit 641482d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/Wire/Wire.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ uint8_t TwoWire::requestFrom(uint8_t address, size_t quantity, bool stopBit)
8181
if(i2c->start(i2c->devinfo, address, WIRE_READ_FLAG))
8282
{
8383

84-
i2c->read_bytes(i2c->devinfo, rxBuffer._aucBuffer, quantity);
84+
byteRead = i2c->read_bytes(i2c->devinfo, rxBuffer._aucBuffer, quantity);
8585
rxBuffer._iHead = quantity;
8686

8787
if (stopBit)

0 commit comments

Comments
 (0)