aboutsummaryrefslogtreecommitdiff
path: root/Demos/Device/LowLevel/AudioOutput/AudioOutput.c
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2009-10-12 05:59:55 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2009-10-12 05:59:55 +0000
commit6a652c60f3e3f3021fc0d22aa371c1de613e6ee5 (patch)
tree36e3ac322537017ae61ae9d70ba56efddad8fc02 /Demos/Device/LowLevel/AudioOutput/AudioOutput.c
parent0fd7211bf4279244883b6fa9bba3ac94b4888d79 (diff)
Make Audio device demos compatible with AVRs running at 16MHz instead of 8MHz.
Fix up demo documentation device compatibility list to be as general as possible to reduce changes required as Atmel releases more devices within the same USB AVR series. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@865 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Device/LowLevel/AudioOutput/AudioOutput.c')
-rw-r--r--Demos/Device/LowLevel/AudioOutput/AudioOutput.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c
index 28e57c48..b9c306cc 100644
--- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c
+++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c
@@ -79,9 +79,9 @@ void EVENT_USB_Device_Connect(void)
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
/* Sample reload timer initialization */
- OCR0A = (F_CPU / AUDIO_SAMPLE_FREQUENCY) - 1;
+ OCR0A = (F_CPU / 8 / AUDIO_SAMPLE_FREQUENCY) - 1;
TCCR0A = (1 << WGM01); // CTC mode
- TCCR0B = (1 << CS00); // Fcpu speed
+ TCCR0B = (1 << CS01); // Fcpu/8 speed
#if defined(AUDIO_OUT_MONO)
/* Set speaker as output */