We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 14949f5 + 466fa6f commit e073d28Copy full SHA for e073d28
cores/esp8266/core_esp8266_wiring_digital.c
@@ -111,6 +111,7 @@ static uint32_t interrupt_reg = 0;
111
112
void interrupt_handler(void *arg) {
113
uint32_t status = GPIE;
114
+ uint32_t levels = GPI;
115
GPIEC = status;//clear them interrupts
116
if(status == 0 || interrupt_reg == 0) return;
117
ETS_GPIO_INTR_DISABLE();
@@ -122,7 +123,7 @@ void interrupt_handler(void *arg) {
122
123
interrupt_handler_t *handler = &interrupt_handlers[i];
124
if (handler->fn &&
125
(handler->mode == CHANGE ||
- (handler->mode & 1) == digitalRead(i))) {
126
+ (handler->mode & 1) == !!(levels & (1 << i)))) {
127
// to make ISR compatible to Arduino AVR model where interrupts are disabled
128
// we disable them before we call the client ISR
129
uint32_t savedPS = xt_rsil(15); // stop other interrupts
0 commit comments