Open dodo5522 opened 3 years ago
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 https://github.com/arduino/ArduinoCore-avr/pull/107 .
5
You can distinguish what error occurs and use them depending on the situation.
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 https://github.com/arduino/ArduinoCore-avr/pull/107 .You can distinguish what error occurs and use them depending on the situation.