diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2013-05-19 22:40:17 +0200 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2013-05-19 22:40:17 +0200 |
commit | 329629a316e31cc91c6b56c54d5a9a06ce55dea7 (patch) | |
tree | 922b91c99f99dac471581929408df9c3b6cf4877 /Demos/Host/ClassDriver/AudioOutputHost | |
parent | 65a8d68c5708c8bc87628d9a25cf0a9d951379ea (diff) | |
download | lufa-329629a316e31cc91c6b56c54d5a9a06ce55dea7.tar.gz lufa-329629a316e31cc91c6b56c54d5a9a06ce55dea7.tar.bz2 lufa-329629a316e31cc91c6b56c54d5a9a06ce55dea7.zip |
Pseudo-port the host mode demos for possible later multi-arch support.
Diffstat (limited to 'Demos/Host/ClassDriver/AudioOutputHost')
-rw-r--r-- | Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c | 6 | ||||
-rw-r--r-- | Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.h | 3 | ||||
-rw-r--r-- | Demos/Host/ClassDriver/AudioOutputHost/asf.xml | 8 |
3 files changed, 10 insertions, 7 deletions
diff --git a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c index 30e60e5da..6faa8fe30 100644 --- a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c +++ b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c @@ -111,12 +111,14 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK) /** Configures the board hardware and chip peripherals for the demo's functionality. */ void SetupHardware(void) { +#if (ARCH == ARCH_AVR8) /* Disable watchdog if enabled by bootloader/fuses */ MCUSR &= ~(1 << WDRF); wdt_disable(); /* Disable clock division */ clock_prescale_set(clock_div_1); +#endif /* Hardware Initialization */ Serial_Init(9600, false); @@ -128,9 +130,9 @@ void SetupHardware(void) /* Create a stdio stream for the serial port for stdin and stdout */ Serial_CreateStream(NULL); - + /* Start the ADC conversion in free running mode */ - ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_GET_CHANNEL_MASK(MIC_IN_ADC_CHANNEL)); + ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_GET_CHANNEL_MASK(MIC_IN_ADC_CHANNEL)); } /** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and diff --git a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.h b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.h index 35f881cd5..543f88ddc 100644 --- a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.h +++ b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.h @@ -50,7 +50,8 @@ #include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/Board/Buttons.h> #include <LUFA/Drivers/USB/USB.h> - + #include <LUFA/Platform/Platform.h> + #include "Config/AppConfig.h" /* Macros: */ diff --git a/Demos/Host/ClassDriver/AudioOutputHost/asf.xml b/Demos/Host/ClassDriver/AudioOutputHost/asf.xml index 19f915c01..5b53faffd 100644 --- a/Demos/Host/ClassDriver/AudioOutputHost/asf.xml +++ b/Demos/Host/ClassDriver/AudioOutputHost/asf.xml @@ -1,14 +1,14 @@ <asf xmlversion="1.0">
- <project caption="Audio Output Host Demo (Class Driver APIs)" id="lufa.demos.host.class.audio_output.example">
+ <project caption="Audio Output Host Demo (Class Driver APIs)" id="lufa.demos.host.class.audio_output.example.avr8">
<require idref="lufa.demos.host.class.audio_output"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.class.audio_output" caption="Audio Output Host Demo (Class Driver APIs)">
|