mirror of https://github.com/noisymime/Arduino.git
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…
Reference in New Issue