Skip to content

Commit 748f3f9

Browse files
committed
Fix crashes when using tone()
Mark `t1IntHandler()` with ICACHE_RAM_ATTR
1 parent 4b55ee1 commit 748f3f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp8266/Tone.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void noTone(uint8_t _pin) {
113113
digitalWrite(_pin, LOW);
114114
}
115115

116-
void t1IntHandler() {
116+
ICACHE_RAM_ATTR void t1IntHandler() {
117117
if (toggle_counts[T1INDEX] != 0){
118118
// toggle the pin
119119
digitalWrite(tone_pins[T1INDEX], toggle_counts[T1INDEX] % 2);

0 commit comments

Comments
 (0)