File tree 1 file changed +2
-1
lines changed 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;
111
111
112
112
void ICACHE_RAM_ATTR interrupt_handler (void * arg ) {
113
113
uint32_t status = GPIE ;
114
+ uint32_t levels = GPI ;
114
115
GPIEC = status ;//clear them interrupts
115
116
if (status == 0 || interrupt_reg == 0 ) return ;
116
117
ETS_GPIO_INTR_DISABLE ();
@@ -122,7 +123,7 @@ void ICACHE_RAM_ATTR interrupt_handler(void *arg) {
122
123
interrupt_handler_t * handler = & interrupt_handlers [i ];
123
124
if (handler -> fn &&
124
125
(handler -> mode == CHANGE ||
125
- (handler -> mode & 1 ) == digitalRead ( i ))) {
126
+ (handler -> mode & 1 ) == !!( levels & ( 1 << i ) ))) {
126
127
// to make ISR compatible to Arduino AVR model where interrupts are disabled
127
128
// we disable them before we call the client ISR
128
129
uint32_t savedPS = xt_rsil (15 ); // stop other interrupts
You can’t perform that action at this time.
0 commit comments