8000 ... · arduino-collections/TTS@652713d · GitHub
[go: up one dir, main page]

Skip to content

Commit 652713d

Browse files
committed
...
1 parent 7b0863e commit 652713d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

TTS.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,10 @@ static void sound(int pin, byte b)
492492
#endif
493493
#ifdef TCCR2A:
494494
case 3:
495-
if ((duty / 256) != OCR2B) {
495+
duty /= 256;
496+
if (duty != OCR2B) {
496497
TCNT2 = 0;
497-
OCR2B = duty / 256;
498+
OCR2B = duty;
498499
}
499500
break;
500501
#endif

0 commit comments

Comments
 (0)
0