-
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
revise MRAA driver's GPIO #965
Labels
Comments
2bndy5
added a commit
that referenced
this issue
Mar 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The MRAA driver's GPIO implementation hasn't seen many updates for years. While it doesn't work well with newer RPi4 (and above), it could still get updated to conform with other drivers' GPIO implementations. The following will allow for a more robust and less-specific implementation of Arduino wrappers for the MRAA lib:
mraa::Gpio*
instancesGPIO
member functions staticSolution
I'll submit a PR as a proposal. Basically, just
std::map<rf24_gpio_t, mraa::Gpio*>
as a cache.RF24/utility/MRAA/gpio.h
Lines 29 to 33 in af7fbec
RF24/utility/MRAA/gpio.cpp
Line 24 in af7fbec
RF24/RF24.cpp
Lines 1033 to 1036 in af7fbec
RF24/RF24.h
Lines 130 to 132 in af7fbec
RF24/utility/MRAA/gpio.cpp
Lines 39 to 40 in af7fbec
Additional context
I want this because I'm working to expose the GPIO and interrupt functions in the pyRF24 project, but the MRAA driver requires special context that seems unnecessary (in both RF24 lib and python bindings).
PS - I've already done much of this work in my CirquePinnacle lib, so it would be mostly copy-n-paste from there.
The text was updated successfully, but these errors were encountered: