8000 Fix GPIO Interrupts · silverchris/arduino-esp32@a1bd429 · GitHub
[go: up one dir, main page]

Skip to content

Commit a1bd429

Browse files
authored
Fix GPIO Interrupts
1 parent 11cad87 commit a1bd429

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cores/esp32/esp32-hal-gpio.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,15 @@ extern void __attachInterruptFunctionalArg(uint8_t pin, voidFuncPtrArg userFunc,
344344
__pinInterruptHandlers[pin].functional = functional;
345345

346346
esp_intr_disable(gpio_intr_handle);
347+
#if CONFIG_IDF_TARGET_ESP32
347348
if(esp_intr_get_cpu(gpio_intr_handle)) { //APP_CPU
349+
#endif
348350
GPIO.pin[pin].int_ena = 1;
351+
#if CONFIG_IDF_TARGET_ESP32
349352
} else { //PRO_CPU
350353
GPIO.pin[pin].int_ena = 4;
351354
}
355+
#endif
352356
GPIO.pin[pin].int_type = intr_type;
353357
esp_intr_enable(gpio_intr_handle);
354358
}

0 commit comments

Comments
 (0)
0