diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-11-08 03:41:48 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-11-08 03:41:48 +0000 |
commit | 0ce2950d811b8dc11e46602e7490d795d8ddfb5d (patch) | |
tree | 3f070d28b9fe15ef998300769c256477669d5848 /Demos/Device/LowLevel | |
parent | bac860b173c938bda02be4d2b1e6c72d21380a38 (diff) | |
download | lufa-0ce2950d811b8dc11e46602e7490d795d8ddfb5d.tar.gz lufa-0ce2950d811b8dc11e46602e7490d795d8ddfb5d.tar.bz2 lufa-0ce2950d811b8dc11e46602e7490d795d8ddfb5d.zip |
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).
Diffstat (limited to 'Demos/Device/LowLevel')
-rw-r--r-- | Demos/Device/LowLevel/AudioInput/AudioInput.c | 2 | ||||
-rw-r--r-- | Demos/Device/LowLevel/AudioOutput/AudioOutput.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.c b/Demos/Device/LowLevel/AudioInput/AudioInput.c index dc75cd700..16ac90e8f 100644 --- a/Demos/Device/LowLevel/AudioInput/AudioInput.c +++ b/Demos/Device/LowLevel/AudioInput/AudioInput.c @@ -86,7 +86,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/LowLevel/AudioOutput/AudioOutput.c b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c index 6e7d818fb..178fd5bb3 100644 --- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c +++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c @@ -80,7 +80,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 |