mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Fixing bug w/ subsequent calls to tone().
http://code.google.com/p/arduino/issues/detail?id=397
This commit is contained in:
parent
a403c19ade
commit
c11098c237
@ -533,8 +533,12 @@ ISR(TIMER2_COMPA_vect)
|
||||
}
|
||||
else
|
||||
{
|
||||
disableTimer(2);
|
||||
*timer2_pin_port &= ~(timer2_pin_mask); // keep pin low after stop
|
||||
// need to call noTone() so that the tone_pins[] entry is reset, so the
|
||||
// timer gets initialized next time we call tone().
|
||||
// XXX: this assumes timer 2 is always the first one used.
|
||||
noTone(tone_pins[0]);
|
||||
// disableTimer(2);
|
||||
// *timer2_pin_port &= ~(timer2_pin_mask); // keep pin low after stop
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user