aboutsummaryrefslogtreecommitdiff
path: root/Demos/Device/ClassDriver
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-11-08 03:41:48 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2010-11-08 03:41:48 +0000
commit0276341d61ef2d22cb6b0a7d4224cc7fc4a5748a (patch)
tree3f070d28b9fe15ef998300769c256477669d5848 /Demos/Device/ClassDriver
parent02301881c517bb20f420544b8fc9b07efeeb1d29 (diff)
Added board hardware driver support for the Adafruit U4 breakout board.
Fixed calculation of timer register reload values derived from F_CPU; must subtract one from the division result for the compare value to be correct. Change AVRISP-MKII rescue clock speed to 4MHz to ensure that a 125KHz ISP speed works regardless of the target's fuses (i.e. DIV8 set). git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1559 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Demos/Device/ClassDriver')
-rw-r--r--Demos/Device/ClassDriver/AudioInput/AudioInput.c2
-rw-r--r--Demos/Device/ClassDriver/AudioOutput/AudioOutput.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Demos/Device/ClassDriver/AudioInput/AudioInput.c b/Demos/Device/ClassDriver/AudioInput/AudioInput.c
index cea89c5d..8314dd09 100644
--- a/Demos/Device/ClassDriver/AudioInput/AudioInput.c
+++ b/Demos/Device/ClassDriver/AudioInput/AudioInput.c
@@ -132,7 +132,7 @@ void EVENT_USB_Device_Connect(void)
/* Sample reload timer initialization */
TIMSK0 = (1 << OCIE0A);
- OCR0A = (F_CPU / 8 / AUDIO_SAMPLE_FREQUENCY) - 1;
+ OCR0A = ((F_CPU / 8 / AUDIO_SAMPLE_FREQUENCY) - 1);
TCCR0A = (1 << WGM01); // CTC mode
TCCR0B = (1 << CS01); // Fcpu/8 speed
}
diff --git a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
index bf0e22a6..4650cd8c 100644
--- a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
+++ b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
@@ -134,7 +134,7 @@ void EVENT_USB_Device_Connect(void)
/* Sample reload timer initialization */
TIMSK0 = (1 << OCIE0A);
- OCR0A = (F_CPU / 8 / AUDIO_SAMPLE_FREQUENCY) - 1;
+ OCR0A = ((F_CPU / 8 / AUDIO_SAMPLE_FREQUENCY) - 1);
TCCR0A = (1 << WGM01); // CTC mode
TCCR0B = (1 << CS01); // Fcpu/8 speed