How to clear pending interrupt
Posted: Wed Jan 04, 2017 8:16 pm
The Arduino code does not clear pending interrupts on attachInterrupt Even though most consider this a bug, they have decided not to change the way it works. https://github.com/arduino/Arduino/issues/510
So before I attach interrupts, I clear pending interrupts by clearing the EIFR which is an Atmel specific flag that is available to Arduino programs running on traditional Arduino hardware.
Section 2.2.4 of the ESP8266 Technical Reference describes:
Interrupt clearing register GPIO_STATUS_W1TC
Bit[15:0] (readable and writable):
Write 1 into the related bit, the related GPIO interrupt status will be cleared.
But I can't find anything like GPIO_STATUS_W1TC in any of the header files. How do I access this register from my Arduino sketch? Am I missing another way to clear pending interrupts on the ESP8266?
So before I attach interrupts, I clear pending interrupts by clearing the EIFR which is an Atmel specific flag that is available to Arduino programs running on traditional Arduino hardware.
Section 2.2.4 of the ESP8266 Technical Reference describes:
Interrupt clearing register GPIO_STATUS_W1TC
Bit[15:0] (readable and writable):
Write 1 into the related bit, the related GPIO interrupt status will be cleared.
But I can't find anything like GPIO_STATUS_W1TC in any of the header files. How do I access this register from my Arduino sketch? Am I missing another way to clear pending interrupts on the ESP8266?