Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By kolban
#23293 I'm attempting to register an interrupt handler to be called when a GPIO pin changes logic level. I am trying:

Code: Select allvoid 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?
User avatar
By paritosharya007
#26065
kolban wrote:I'm attempting to register an interrupt handler to be called when a GPIO pin changes logic level. I am trying:

Code: Select allvoid 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?


Did you manage to get it working? I am also facing similar problem and haven't managed to get it working.
User avatar
By kolban
#26425 Unfortunately I haven't tried again since my last post. There is enough mystery in the ESP8266 that when I get stuck, I have enough other things to go away and work on that I hope when I come back, more will be known :-)