mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Merge branch 'master' into master
This commit is contained in:
commit
dc5065ce3b
@ -111,6 +111,7 @@ static uint32_t interrupt_reg = 0;
|
|||||||
|
|
||||||
void ICACHE_RAM_ATTR interrupt_handler(void *arg) {
|
void ICACHE_RAM_ATTR interrupt_handler(void *arg) {
|
||||||
uint32_t status = GPIE;
|
uint32_t status = GPIE;
|
||||||
|
uint32_t levels = GPI;
|
||||||
GPIEC = status;//clear them interrupts
|
GPIEC = status;//clear them interrupts
|
||||||
if(status == 0 || interrupt_reg == 0) return;
|
if(status == 0 || interrupt_reg == 0) return;
|
||||||
ETS_GPIO_INTR_DISABLE();
|
ETS_GPIO_INTR_DISABLE();
|
||||||
@ -122,7 +123,7 @@ void ICACHE_RAM_ATTR interrupt_handler(void *arg) {
|
|||||||
interrupt_handler_t *handler = &interrupt_handlers[i];
|
interrupt_handler_t *handler = &interrupt_handlers[i];
|
||||||
if (handler->fn &&
|
if (handler->fn &&
|
||||||
(handler->mode == CHANGE ||
|
(handler->mode == CHANGE ||
|
||||||
(handler->mode & 1) == digitalRead(i))) {
|
(handler->mode & 1) == !!(levels & (1 << i)))) {
|
||||||
// to make ISR compatible to Arduino AVR model where interrupts are disabled
|
// to make ISR compatible to Arduino AVR model where interrupts are disabled
|
||||||
// we disable them before we call the client ISR
|
// we disable them before we call the client ISR
|
||||||
uint32_t savedPS = xt_rsil(15); // stop other interrupts
|
uint32_t savedPS = xt_rsil(15); // stop other interrupts
|
||||||
|
Loading…
x
Reference in New Issue
Block a user