From bf0cce4ad8e45b6f0b0b331263fd2a99abf45d6b Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Wed, 4 Dec 2019 23:51:27 +0100 Subject: [PATCH] Fix ESP32 interrupt enable/disable switched Needs to be manually cherry-picked --- esphome/core/helpers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/core/helpers.cpp b/esphome/core/helpers.cpp index 3ff87678e8..2222a1a664 100644 --- a/esphome/core/helpers.cpp +++ b/esphome/core/helpers.cpp @@ -320,8 +320,8 @@ ICACHE_RAM_ATTR InterruptLock::InterruptLock() { xt_state_ = xt_rsil(15); } ICACHE_RAM_ATTR InterruptLock::~InterruptLock() { xt_wsr_ps(xt_state_); } #endif #ifdef ARDUINO_ARCH_ESP32 -ICACHE_RAM_ATTR InterruptLock::InterruptLock() { portENABLE_INTERRUPTS(); } -ICACHE_RAM_ATTR InterruptLock::~InterruptLock() { portDISABLE_INTERRUPTS(); } +ICACHE_RAM_ATTR InterruptLock::InterruptLock() { portDISABLE_INTERRUPTS(); } +ICACHE_RAM_ATTR InterruptLock::~InterruptLock() { portENABLE_INTERRUPTS(); } #endif } // namespace esphome