Skip to content

Keep i2c error as bit flag which TwoWire::endTransmission() returns #49

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dodo5522
Copy link

@dodo5522 dodo5522 commented Dec 7, 2020

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.

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.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant