Skip to content

Commit a4fa733

Browse files
committed
Merge pull request #6 from esp8266/esp8266
Esp8266
2 parents d441d84 + 7a9563d commit a4fa733

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cores/esp8266/core_esp8266_wiring_digital.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,11 @@ void interrupt_handler(void *arg) {
123123
while(!(changedbits & (1 << i))) i++;
124124
changedbits &= ~(1 << i);
125125
interrupt_handler_t *handler = &interrupt_handlers[i];
126-
if(((handler->mode & 1) == digitalRead(i)) && handler->fn) handler->fn();
126+
if (handler->fn &&
127+
(handler->mode == CHANGE ||
128+
(handler->mode & 1) == digitalRead(i))) {
129+
handler->fn();
130+
}
127131
}
128132
ETS_GPIO_INTR_ENABLE();
129133
}

0 commit comments

Comments
 (0)