-
Notifications
You must be signed in to change notification settings - Fork 35
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
bcm283x: Don't override previous pull states #13
Conversation
Codecov Report
@@ Coverage Diff @@
## main #13 +/- ##
=====================================
Coverage 33.9% 34.0%
=====================================
Files 49 49
Lines 5379 5381 +2
=====================================
+ Hits 1826 1828 +2
Misses 3427 3427
Partials 126 126
Continue to review full report at Codecov.
|
gohci |
Oh the errors are not your fault, you can ignore. |
@maruel I don't have a board to test the other branch but it looks like the legacy case is also broken |
Hi, nice work, BTW, could you please help fix some links in comments? I copied some discussion in slack to here for your convenience.
Another question, could you please give some reference on libs talked here? thx!
|
nvm, https://github.com/RPi-Distro/raspi-gpio/blob/22b44e4765b4b78dc5b22394fff484e353d5914d/raspi-gpio.c#L889 seems to be a good reference, and dropping those two bits are necessary since we are doing a bitwise overwrite operation here. |
I rather keep this PR laser focus on this fix, can we do a new PR with the links fix? |
Thanks for the change. It took a while because I wanted to confirm locally. One tricky issue is that there's a subtle race condition, using an atomic compare exchange would get rid of it but it can be done as a follow up. |
I've updated the PDF reference in c025965. |
Currently the pull resistors are being overridden when a new GPIO is set on the same byte space.
This case:
Will end up printing:
The fix maintains the bits that are not being touched.