-
Notifications
You must be signed in to change notification settings - Fork 1k
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
refactor: set /dev/gpiochip0
as default
#1018
Conversation
/dev/gpiochip0
as default
This comment was marked as off-topic.
This comment was marked as off-topic.
04333c8
to
48ba94a
Compare
I'm looking at this more in depth. I think we can get rid of the Furthermore, I think we can also get rid of |
I also figured that the cached FD for the GPIO chip could be static (e8269f6). This allows the gpio.cpp and interrupt.cpp modules use the same exact FD for accessing the GPIO chip. 🎉 |
LGTMThis works as expected on my RPi3 and RPi4 (both 64-bit). I specifically tested the interrupt example because it uses all the code changes in this patch. I also ran a modified getting-started example in which 2 radio objects were init'd (second radio obj failed as expected) and a third |
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.
Quick tests on RPi5: 64-bit & RPi4: 32-bit are working. Good job on these changes!
I probably could've used the static trick before, but the |
resolves #1017
This also adds some info to the docs that was requested in #1017