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
Keep i2c error as bit flag which TwoWire::endTransmission() returns
last_status is reasonable solution to get the last status of i2c
trnasmittion, but in some cases, the last_status is overwritten by
calling read/write register API more than once. For instance, init(),
startContinuous(), etc.
Especially on Arduino IDE 1.8.13, new error code `5` (i2c timeout) is
added to Wire.endTransmission() by merging this PR
arduino/ArduinoCore-avr#107 .
You can distinguish what error occurs and use them depending on the
situation.
Copy file name to clipboardExpand all lines: README.md
+3
Original file line number
Diff line number
Diff line change
@@ -163,6 +163,9 @@ This library is intended to provide a quicker and easier way to get started usin
163
163
*`bool timeoutOccurred()`<br>
164
164
Indicates whether a read timeout has occurred since the last call to `timeoutOccurred()`.
165
165
166
+
*`uint8_t getWireErrorBits(void)`<br>
167
+
Indicates what I²C transmission errors have occurred since the last call to VL53L0X API. Returns 0 if `last_status` was success, but returns value whose bit is set corresponding to error status written on [`Wire.endTransmission()` documentation](http://arduino.cc/en/Reference/WireEndTransmission).
168
+
166
169
## Version history
167
170
168
171
* 1.3.0 (2020 Sep 24): Added support for alternative I²C buses (thanks KurtE).
0 commit comments