-
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
wrap MRAA lib's Gpio::isr()
for IRQ support
#970
Conversation
I also removed MRAA exclusion from examples build. Previously, interruptConfigure.cpp was not built for MRAA driver.
This seems to work on my RPi3 if example_linux/interruptConfigure.cpp does not call
|
stranger and stranger. with this example patch
diff --git a/examples_linux/interruptConfigure.cpp b/examples_linux/interruptConfigure.cpp
index ec71b7a..378b79f 100644
--- a/examples_linux/interruptConfigure.cpp
+++ b/examples_linux/interruptConfigure.cpp
@@ -119,8 +119,10 @@ int main(int argc, char** argv)
// radio.printDetails(); // (smaller) function that prints raw register values
// radio.printPrettyDetails(); // (larger) function that prints human readable data
+#ifndef MRAA
// setup the digital input pin connected to the nRF24L01's IRQ pin
- pinMode(IRQ_PIN, INPUT);
+ pinMode(IRQ_PIN, INPUT); // not needed for MRAA driver (causes error in most cases)
+#endif
// register the interrupt request (IRQ) to call our
// Interrupt Service Routine (ISR) callback function interruptHandler() I get the following prompts:
and yet the example still works when it finally initializes the hardware as expected. |
When I leave the |
This tests OK on my RPi model B with all tested examples with no error msgs. |
I'm not happy with the performance, but it's better than no interrupt support using mraa driver. The hardware unit problem is still perplexing though. |
I also removed MRAA exclusion from examples build. Previously, interruptConfigure.cpp was not built for MRAA driver.