File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ static uint32_t interrupt_reg = 0;
111111
112112void ICACHE_RAM_ATTR interrupt_handler (void * arg ) {
113113 uint32_t status = GPIE ;
114+ uint32_t levels = GPI ;
114115 GPIEC = status ;//clear them interrupts
115116 if (status == 0 || interrupt_reg == 0 ) return ;
116117 ETS_GPIO_INTR_DISABLE ();
@@ -122,7 +123,7 @@ void ICACHE_RAM_ATTR interrupt_handler(void *arg) {
122123 interrupt_handler_t * handler = & interrupt_handlers [i ];
123124 if (handler -> fn &&
124125 (handler -> mode == CHANGE ||
125- (handler -> mode & 1 ) == digitalRead ( i ))) {
126+ (handler -> mode & 1 ) == !!( levels & ( 1 << i ) ))) {
126127 // to make ISR compatible to Arduino AVR model where interrupts are disabled
127128 // we disable them before we call the client ISR
128129 uint32_t savedPS = xt_rsil (15 ); // stop other interrupts
You can’t perform that action at this time.
0 commit comments