Skip to content

Commit b41e4a3

Browse files
committed
Merge branch 'jipp-master'
2 parents 3bbdf49 + cbd6812 commit b41e4a3

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
@@ -31,6 +31,7 @@ Version Modified By Date Comments
3131
0007 M Sproul 10/08/29 Changed #ifdefs from cpu to register
3232
0008 S Kanemoto 12/06/22 Fixed for Leonardo by @maris_HY
3333
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
3435
*************************************************/
3536

3637
#include <avr/interrupt.h>
@@ -152,7 +153,7 @@ static int8_t toneBegin(uint8_t _pin)
152153
// whereas 16 bit timers are set to either ck/1 or ck/64 prescalar
153154
switch (_timer)
154155
{
155-
#if defined(TCCR0A) && defined(TCCR0B)
156+
#if defined(TCCR0A) && defined(TCCR0B) && defined(WGM01)
156157
case 0:
157158
// 8 bit timer
158159
TCCR0A = 0;

0 commit comments

Comments
 (0)