From 25e1b3b61c6e37a648e49292916f4ed672304dfb Mon Sep 17 00:00:00 2001
From: "Wong \"Sadale\" Cho Ching" <SadaleNet@users.noreply.github.com>
Date: Tue, 18 May 2021 01:56:24 +0800
Subject: [PATCH] Added IRAM_ATTR to _stopPWM() so that digitalWrite() would
 work inside ISR. Fixes #8043 (#8044)

---
 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 2107ef726..916361e2c 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);
 }