mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-22 21:23:07 +03:00
Fix pin change interrupt handling (#322)
This commit is contained in:
parent
a7c7d27cb3
commit
7a9563d6c6
@ -123,7 +123,11 @@ void interrupt_handler(void *arg) {
|
|||||||
while(!(changedbits & (1 << i))) i++;
|
while(!(changedbits & (1 << i))) i++;
|
||||||
changedbits &= ~(1 << i);
|
changedbits &= ~(1 << i);
|
||||||
interrupt_handler_t *handler = &interrupt_handlers[i];
|
interrupt_handler_t *handler = &interrupt_handlers[i];
|
||||||
if(((handler->mode & 1) == digitalRead(i)) && handler->fn) handler->fn();
|
if (handler->fn &&
|
||||||
|
(handler->mode == CHANGE ||
|
||||||
|
(handler->mode & 1) == digitalRead(i))) {
|
||||||
|
handler->fn();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ETS_GPIO_INTR_ENABLE();
|
ETS_GPIO_INTR_ENABLE();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user