-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nrf: prevent I2C hangs #8094
nrf: prevent I2C hangs #8094
Conversation
This adds a check to make sure that SDA and SCL are in a sane condition before starting any I2C operation. If they are not it tries to rectify it, and then returns an error code if unable to do so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for figuring this out! Some refactoring suggestions.
@furbrain Before I approve, I just want to check that you have tried this on hardware after the latest round of changes. |
Good point, yes, I have tested it using the code provided in #8093, and the
second `print` statement now produces an OSError - which is what I would
have expected.
Phil
…On Tue, 20 Jun 2023 at 23:39, Dan Halbert ***@***.***> wrote:
@furbrain <https://github.com/furbrain> Before I approve, I just want to
check that you have tried this on hardware after the latest round of
changes.
—
Reply to this email directly, view it on GitHub
<#8094 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAW3PXKNII24RSNEEGLWKTTXMIRBVANCNFSM6AAAAAAZMNKUCY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This adds a check to make sure that SDA and SCL are in a sane condition before starting any I2C operation. If they are not it tries to rectify it, and then returns an error code if unable to do so.