Skip to content

Commit c0cf01c

Browse files
committed
Wire: Fix return value for read() when there is no data available.
1 parent bbf70c7 commit c0cf01c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libraries/Wire/Wire.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ int arduino::MbedI2C::read() {
120120
if (rxBuffer.available()) {
121121
return rxBuffer.read_char();
122122
}
123-
return 0;
123+
return -1;
124124
}
125125

126126
int arduino::MbedI2C::available() {

0 commit comments

Comments
 (0)