diff --git a/platformio.ini b/platformio.ini index 6cc589c9a..1c2a4f1cd 100644 --- a/platformio.ini +++ b/platformio.ini @@ -23,5 +23,5 @@ board = esp32dev # Experimental IDF 5.x support [env:esp32devIDF5x] -platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.03/platform-espressif32.zip +platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.10/platform-espressif32.zip board = esp32dev diff --git a/src/IRrecv.cpp b/src/IRrecv.cpp index 82b474dc1..d34f77a31 100644 --- a/src/IRrecv.cpp +++ b/src/IRrecv.cpp @@ -431,7 +431,11 @@ void IRrecv::pause(void) { params.rawlen = 0; params.overflow = false; #if defined(ESP32) +#if ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 3) ) + noInterrupts(); // Bluntly switch off (and on), not sure if we really want this... +#else // ESP_ARDUINO_VERSION_MAJOR >= 3 gpio_intr_disable((gpio_num_t)params.recvpin); +#endif // ESP_ARDUINO_VERSION_MAJOR >= 3 #endif // ESP32 } @@ -446,10 +450,11 @@ void IRrecv::resume(void) { #if defined(ESP32) #if ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 3) ) timerEnd(timer); + interrupts(); // Back on #else // ESP_ARDUINO_VERSION_MAJOR >= 3 timerAlarmDisable(timer); -#endif // ESP_ARDUINO_VERSION_MAJOR >= 3 gpio_intr_enable((gpio_num_t)params.recvpin); +#endif // ESP_ARDUINO_VERSION_MAJOR >= 3 #endif // ESP32 }