From 7527117a71862cd20393c09661741ec058a3f27a Mon Sep 17 00:00:00 2001 From: "Wong \"Sadale\" Cho Ching" Date: Mon, 17 May 2021 22:05:38 +0800 Subject: [PATCH] Added IRAM_ATTR to _stopPWM() so that digitalWrite() would work inside ISR. Fixes #8043 --- cores/esp8266/core_esp8266_waveform_pwm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/esp8266/core_esp8266_waveform_pwm.cpp b/cores/esp8266/core_esp8266_waveform_pwm.cpp index 2107ef726c..916361e2ca 100644 --- a/cores/esp8266/core_esp8266_waveform_pwm.cpp +++ b/cores/esp8266/core_esp8266_waveform_pwm.cpp @@ -260,7 +260,7 @@ IRAM_ATTR bool _stopPWM_weak(uint8_t pin) { return true; } static bool _stopPWM_bound(uint8_t pin) __attribute__((weakref("_stopPWM_weak"))); -bool _stopPWM(uint8_t pin) { +IRAM_ATTR bool _stopPWM(uint8_t pin) { return _stopPWM_bound(pin); }