Skip to content

Commit 3e168bb

Browse files
committed
Tone: Added missing break
1 parent 695fc40 commit 3e168bb

File tree

1 file changed

+2
-1
lines changed
  • hardware/arduino/avr/cores/arduino

1 file changed

+2
-1
lines changed

hardware/arduino/avr/cores/arduino/Tone.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static uint8_t tone_pins[AVAILABLE_TONE_PINS] = { 255 /*, 255 */ };
117117
#define AVAILABLE_TONE_PINS 1
118118
#define USE_TIMER2
119119

120-
// Leave timer 0 to last.
120+
// Leave timer 2 to last.
121121
const uint8_t PROGMEM tone_pin_to_timer_PGM[] = { 2 /*, 1, 0 */ };
122122
static uint8_t tone_pins[AVAILABLE_TONE_PINS] = { 255 /*, 255, 255 */ };
123123

@@ -485,6 +485,7 @@ void noTone(uint8_t _pin)
485485
if (tone_pins[i] == _pin) {
486486
_timer = pgm_read_byte(tone_pin_to_timer_PGM + i);
487487
tone_pins[i] = 255;
488+
break;
488489
}
489490
}
490491

0 commit comments

Comments
 (0)