Working with GPIO interrupts using gpio_pin_intr_state_set()
Posted: Tue Jul 14, 2015 11:29 pm
I'm attempting to register an interrupt handler to be called when a GPIO pin changes logic level. I am trying:
But I'm not seeing the callback being invoked even though I am pretty sure that I am toggling the signal on the pin. Has anyone had any success using these functions?
Code: Select all
void intrHandler(uint32 interruptMask, void *arg) {
os_printf("Interrupted: %x\n", interruptMask);
lastIntr = system_get_time();
gpio_intr_ack(interruptMask);
}
gpio_intr_handler_register(intrHandler, NULL);
gpio_pin_intr_state_set(4, GPIO_PIN_INTR_NEGEDGE);
But I'm not seeing the callback being invoked even though I am pretty sure that I am toggling the signal on the pin. Has anyone had any success using these functions?