We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 695fc40 commit 3e168bbCopy full SHA for 3e168bb
hardware/arduino/avr/cores/arduino/Tone.cpp
@@ -117,7 +117,7 @@ static uint8_t tone_pins[AVAILABLE_TONE_PINS] = { 255 /*, 255 */ };
117
#define AVAILABLE_TONE_PINS 1
118
#define USE_TIMER2
119
120
-// Leave timer 0 to last.
+// Leave timer 2 to last.
121
const uint8_t PROGMEM tone_pin_to_timer_PGM[] = { 2 /*, 1, 0 */ };
122
static uint8_t tone_pins[AVAILABLE_TONE_PINS] = { 255 /*, 255, 255 */ };
123
@@ -485,6 +485,7 @@ void noTone(uint8_t _pin)
485
if (tone_pins[i] == _pin) {
486
_timer = pgm_read_byte(tone_pin_to_timer_PGM + i);
487
tone_pins[i] = 255;
488
+ break;
489
}
490
491
0 commit comments