1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-25 20:02:37 +03:00

Fix crashes when using tone()

Mark `t1IntHandler()` with ICACHE_RAM_ATTR
This commit is contained in:
Uri Shaked 2016-03-12 19:21:32 +02:00
parent 4b55ee14ef
commit 748f3f93fa

View File

@ -113,7 +113,7 @@ void noTone(uint8_t _pin) {
digitalWrite(_pin, LOW);
}
void t1IntHandler() {
ICACHE_RAM_ATTR void t1IntHandler() {
if (toggle_counts[T1INDEX] != 0){
// toggle the pin
digitalWrite(tone_pins[T1INDEX], toggle_counts[T1INDEX] % 2);