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.
2 parents 3bbdf49 + cbd6812 commit b41e4a3Copy full SHA for b41e4a3
hardware/arduino/avr/cores/arduino/Tone.cpp
@@ -31,6 +31,7 @@ Version Modified By Date Comments
31
0007 M Sproul 10/08/29 Changed #ifdefs from cpu to register
32
0008 S Kanemoto 12/06/22 Fixed for Leonardo by @maris_HY
33
0009 J Reucker 15/04/10 Issue #292 Fixed problems with ATmega8 (thanks to Pete62)
34
+0010 jipp 15/04/13 added additional define check #2923
35
*************************************************/
36
37
#include <avr/interrupt.h>
@@ -152,7 +153,7 @@ static int8_t toneBegin(uint8_t _pin)
152
153
// whereas 16 bit timers are set to either ck/1 or ck/64 prescalar
154
switch (_timer)
155
{
- #if defined(TCCR0A) && defined(TCCR0B)
156
+ #if defined(TCCR0A) && defined(TCCR0B) && defined(WGM01)
157
case 0:
158
// 8 bit timer
159
TCCR0A = 0;
0 commit comments