Mic2015 / arduino-tiny

Automatically exported from code.google.com/p/arduino-tiny
Other
0 stars 0 forks source link

tone function doesn't actually enable the interrupt for continuous tone #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
EnableOutputCompareInterrupt is only called for duration > 0. This makes it 
impossible to make a continuous (duration = -1) tone with the tiny core.

Attached file works, tested on ATTINY85-20PU with Arduino 1.0.5.

Original issue reported on code.google.com by matt.min...@gmail.com on 11 Jun 2013 at 4:00

Attachments:

GoogleCodeExporter commented 9 years ago
Duration = 0 is continuous not duration = -1.

Original comment by arduino....@gmail.com on 11 Jun 2013 at 4:43

GoogleCodeExporter commented 9 years ago
Sorry, I meant to say duration = 0! ToneTimer_EnableOutputCompareInterruptA() 
isn't normally being called unless duration > 0. The version I attached fixes 
that.

Original comment by matt.min...@gmail.com on 11 Jun 2013 at 7:56

GoogleCodeExporter commented 9 years ago
Please include a test case (a sketch that illustrates the problem) and a brief 
description of what you expect to happen.

Original comment by arduino....@gmail.com on 12 Jun 2013 at 5:43