1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-18 07:45:56 +00:00

Fix InterruptLock on ESP-IDF (#2388)

This commit is contained in:
Otto Winter
2021-09-25 09:14:07 +02:00
committed by GitHub
parent aec02afcdc
commit 8503e08ee6
3 changed files with 31 additions and 28 deletions

View File

@@ -350,7 +350,7 @@ std::string hexencode(const uint8_t *data, uint32_t len) {
IRAM_ATTR InterruptLock::InterruptLock() { xt_state_ = xt_rsil(15); }
IRAM_ATTR InterruptLock::~InterruptLock() { xt_wsr_ps(xt_state_); }
#endif
#ifdef USE_ESP32_FRAMEWORK_ARDUINO
#ifdef USE_ESP32
IRAM_ATTR InterruptLock::InterruptLock() { portDISABLE_INTERRUPTS(); }
IRAM_ATTR InterruptLock::~InterruptLock() { portENABLE_INTERRUPTS(); }
#endif