Skip to content

Commit

Permalink
[Build] esp32devIDF5x build enable Arduino 3.0.0 alpha1 platform by s…
Browse files Browse the repository at this point in the history
…witching interrupts off/on instead of (missing) low-level IDF calls
  • Loading branch information
tonhuisman committed Oct 7, 2023
1 parent 591a589 commit c00fc86
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 6 additions & 1 deletion src/IRrecv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}

Expand Down

0 comments on commit c00fc86

Please sign in to comment.