[Docu: Wire::read()](https://www.arduino.cc/en/Reference/WireRead) > Returns > The next byte received It should be: > Returns > The next byte received (or -1 if no data is available). Data type: int.
Activity
carlosperate commentedon Dec 25, 2022
Is that always meant to be the case? In the Mbed core it looks like it returns
0
:https://github.com/arduino/ArduinoCore-mbed/blob/949c70ce6ae7d2910e5768d6d88fc3ae0e943584/libraries/Wire/Wire.cpp#L123
Edit: It is meant to be
-1
, the Mbed core will be updated.arduino::MbedI2C::read()
return-1
if there is no data available? arduino/ArduinoCore-mbed#601