mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
Fix crashes when using tone()
Mark `t1IntHandler()` with ICACHE_RAM_ATTR
This commit is contained in:
@ -113,7 +113,7 @@ void noTone(uint8_t _pin) {
|
|||||||
digitalWrite(_pin, LOW);
|
digitalWrite(_pin, LOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
void t1IntHandler() {
|
ICACHE_RAM_ATTR void t1IntHandler() {
|
||||||
if (toggle_counts[T1INDEX] != 0){
|
if (toggle_counts[T1INDEX] != 0){
|
||||||
// toggle the pin
|
// toggle the pin
|
||||||
digitalWrite(tone_pins[T1INDEX], toggle_counts[T1INDEX] % 2);
|
digitalWrite(tone_pins[T1INDEX], toggle_counts[T1INDEX] % 2);
|
||||||
|
Reference in New Issue
Block a user