GPIO Pin interrupt example code #716
Replies: 1 comment 4 replies
-
Here is my current code. It does not work and it seems that the ISR is not getting called. Thanks, // ============================================================================ #define TXD1 8 // GPIO8 PIN11 UART1 Tx #define GPIO 0x0d // GPIO interrupt number int8_t encoder_val = 0; // rotary encoder pin change interrupt handler // rotary encoder init // startup initialization // main program loop |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've been trying to get GPIO interrupts to work. I have tried both the Arduino style code: attachInterrupt(digitalPinToInterrupt(ROTA), readEncoder, RISING); and also the SDK call: gpio_set_irq_enabled_with_callback(ROTA, 0x0c, 1, &readEncoder); and neither of these seems to work. My ISR never gets called. Can anyone point me to some example working GPIO interrupt code.
Thanks,
Scott
Beta Was this translation helpful? Give feedback.
All reactions