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 | |
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')
42 files changed, 104 insertions, 62 deletions
diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c index d103b5d33..a4248e201 100644 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c +++ b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c @@ -91,12 +91,14 @@ int main(void) /** 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); diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h index d0abfeff6..58b18e94c 100644 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h +++ b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h @@ -48,6 +48,7 @@ #include <LUFA/Drivers/Peripheral/Serial.h> #include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/USB/USB.h> + #include <LUFA/Platform/Platform.h> /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml b/Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml index 19c6348c2..c31e66320 100644 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml +++ b/Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml @@ -1,14 +1,14 @@ <asf xmlversion="1.0">
- <project caption="Android Accessory Host Demo (Class Driver APIs)" id="lufa.demos.host.class.android.example">
+ <project caption="Android Accessory Host Demo (Class Driver APIs)" id="lufa.demos.host.class.android.example.avr8">
<require idref="lufa.demos.host.class.android"/>
<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.android" caption="Android Accessory Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c index bc6ade835..fe0235688 100644 --- a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c +++ b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c @@ -106,12 +106,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); diff --git a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.h b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.h index b802a58ac..3da8d88f4 100644 --- a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.h +++ b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.h @@ -48,6 +48,7 @@ #include <LUFA/Drivers/Peripheral/Serial.h> #include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/USB/USB.h> + #include <LUFA/Platform/Platform.h> /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/ClassDriver/AudioInputHost/asf.xml b/Demos/Host/ClassDriver/AudioInputHost/asf.xml index 5c28af91c..ac0d067fb 100644 --- a/Demos/Host/ClassDriver/AudioInputHost/asf.xml +++ b/Demos/Host/ClassDriver/AudioInputHost/asf.xml @@ -1,14 +1,14 @@ <asf xmlversion="1.0">
- <project caption="Audio Input Host Demo (Class Driver APIs)" id="lufa.demos.host.class.audio_input.example">
+ <project caption="Audio Input Host Demo (Class Driver APIs)" id="lufa.demos.host.class.audio_input.example.avr8">
<require idref="lufa.demos.host.class.audio_input"/>
<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_input" caption="Audio Input Host Demo (Class Driver APIs)">
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)">
diff --git a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c index e2f49bcd6..dc0532e6a 100644 --- a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c +++ b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c @@ -87,12 +87,14 @@ int main(void) /** 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); diff --git a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h index e29040790..b66216e1b 100644 --- a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h +++ b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h @@ -48,6 +48,7 @@ #include <LUFA/Drivers/Peripheral/Serial.h> #include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/USB/USB.h> + #include <LUFA/Platform/Platform.h> /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml b/Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml index 29eb91764..54a5a2ce5 100644 --- a/Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml +++ b/Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml @@ -1,14 +1,14 @@ <asf xmlversion="1.0">
- <project caption="Joystick HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.joystick_parser.example">
+ <project caption="Joystick HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.joystick_parser.example.avr8">
<require idref="lufa.demos.host.class.joystick_parser"/>
<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.joystick_parser" caption="Joystick HID (with parser) Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c index 95b96cd3f..ee86cfcdd 100644 --- a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c +++ b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c @@ -83,12 +83,14 @@ int main(void) /** 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); diff --git a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h index e890df455..aaf0477a2 100644 --- a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h +++ b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h @@ -48,6 +48,7 @@ #include <LUFA/Drivers/Peripheral/Serial.h> #include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/USB/USB.h> + #include <LUFA/Platform/Platform.h> /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/ClassDriver/KeyboardHost/asf.xml b/Demos/Host/ClassDriver/KeyboardHost/asf.xml index 76762067f..f9d6067e0 100644 --- a/Demos/Host/ClassDriver/KeyboardHost/asf.xml +++ b/Demos/Host/ClassDriver/KeyboardHost/asf.xml @@ -1,14 +1,14 @@ <asf xmlversion="1.0">
- <project caption="Keyboard HID Host Demo (Class Driver APIs)" id="lufa.demos.host.class.keyboard.example">
+ <project caption="Keyboard HID Host Demo (Class Driver APIs)" id="lufa.demos.host.class.keyboard.example.avr8">
<require idref="lufa.demos.host.class.keyboard"/>
<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.keyboard" caption="Keyboard HID Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c index 58c5029f6..c47d719ee 100644 --- a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c +++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c @@ -87,12 +87,14 @@ int main(void) /** 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); diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h index 63078fb0f..643e2f3af 100644 --- a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h +++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h @@ -48,6 +48,7 @@ #include <LUFA/Drivers/Peripheral/Serial.h> #include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/USB/USB.h> + #include <LUFA/Platform/Platform.h> /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml b/Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml index c7352f641..fdd3e7997 100644 --- a/Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml +++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml @@ -1,14 +1,14 @@ <asf xmlversion="1.0">
- <project caption="Keyboard HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.keyboard_parser.example">
+ <project caption="Keyboard HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.keyboard_parser.example.avr8">
<require idref="lufa.demos.host.class.keyboard_parser"/>
<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.keyboard_parser" caption="Keyboard HID (with parser) Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c index 6e8c3e244..1160f6319 100644 --- a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c +++ b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c @@ -82,12 +82,14 @@ int main(void) /** 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); diff --git a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.h b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.h index 1b8619d7e..db1aaf612 100644 --- a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.h +++ b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.h @@ -50,6 +50,7 @@ #include <LUFA/Drivers/Board/Buttons.h> #include <LUFA/Drivers/Board/Joystick.h> #include <LUFA/Drivers/USB/USB.h> + #include <LUFA/Platform/Platform.h> /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/ClassDriver/MIDIHost/asf.xml b/Demos/Host/ClassDriver/MIDIHost/asf.xml index 3ae82cbf8..b52521f47 100644 --- a/Demos/Host/ClassDriver/MIDIHost/asf.xml +++ b/Demos/Host/ClassDriver/MIDIHost/asf.xml @@ -1,14 +1,14 @@ <asf xmlversion="1.0">
- <project caption="MIDI Host Demo (Class Driver APIs)" id="lufa.demos.host.class.midi.example">
+ <project caption="MIDI Host Demo (Class Driver APIs)" id="lufa.demos.host.class.midi.example.avr8">
<require idref="lufa.demos.host.class.midi"/>
<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.midi" caption="MIDI Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c index a09ae54e9..ead53a801 100644 --- a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c +++ b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c @@ -82,12 +82,14 @@ int main(void) /** 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); diff --git a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h index d3a906a61..519aad713 100644 --- a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h +++ b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h @@ -49,6 +49,7 @@ #include <LUFA/Drivers/Peripheral/Serial.h> #include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/USB/USB.h> + #include <LUFA/Platform/Platform.h> /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/ClassDriver/MassStorageHost/asf.xml b/Demos/Host/ClassDriver/MassStorageHost/asf.xml index 7eb2a6b54..dbc871e9d 100644 --- a/Demos/Host/ClassDriver/MassStorageHost/asf.xml +++ b/Demos/Host/ClassDriver/MassStorageHost/asf.xml @@ -1,14 +1,14 @@ <asf xmlversion="1.0">
- <project caption="Mass Storage Host Demo (Class Driver APIs)" id="lufa.demos.host.class.ms.example">
+ <project caption="Mass Storage Host Demo (Class Driver APIs)" id="lufa.demos.host.class.ms.example.avr8">
<require idref="lufa.demos.host.class.ms"/>
<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.ms" caption="Mass Storage Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/MouseHost/MouseHost.c b/Demos/Host/ClassDriver/MouseHost/MouseHost.c index e56590262..7b3d20b54 100644 --- a/Demos/Host/ClassDriver/MouseHost/MouseHost.c +++ b/Demos/Host/ClassDriver/MouseHost/MouseHost.c @@ -83,12 +83,14 @@ int main(void) /** 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); diff --git a/Demos/Host/ClassDriver/MouseHost/MouseHost.h b/Demos/Host/ClassDriver/MouseHost/MouseHost.h index d6c50f9e5..b25664174 100644 --- a/Demos/Host/ClassDriver/MouseHost/MouseHost.h +++ b/Demos/Host/ClassDriver/MouseHost/MouseHost.h @@ -48,6 +48,7 @@ #include <LUFA/Drivers/Peripheral/Serial.h> #include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/USB/USB.h> + #include <LUFA/Platform/Platform.h> /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/ClassDriver/MouseHost/asf.xml b/Demos/Host/ClassDriver/MouseHost/asf.xml index 1bc0a3104..ecc621854 100644 --- a/Demos/Host/ClassDriver/MouseHost/asf.xml +++ b/Demos/Host/ClassDriver/MouseHost/asf.xml @@ -1,14 +1,14 @@ <asf xmlversion="1.0">
- <project caption="Mouse HID Host Demo (Class Driver APIs)" id="lufa.demos.host.class.mouse.example">
+ <project caption="Mouse HID Host Demo (Class Driver APIs)" id="lufa.demos.host.class.mouse.example.avr8">
<require idref="lufa.demos.host.class.mouse"/>
<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.mouse" caption="Mouse HID Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c index 0ecab535f..265a8f66c 100644 --- a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c +++ b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c @@ -87,12 +87,14 @@ int main(void) /** 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); diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h index cb5c3130f..d0dd9a9ff 100644 --- a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h +++ b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h @@ -48,6 +48,7 @@ #include <LUFA/Drivers/Peripheral/Serial.h> #include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/USB/USB.h> + #include <LUFA/Platform/Platform.h> /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/asf.xml b/Demos/Host/ClassDriver/MouseHostWithParser/asf.xml index c1a475578..a9ca34bff 100644 --- a/Demos/Host/ClassDriver/MouseHostWithParser/asf.xml +++ b/Demos/Host/ClassDriver/MouseHostWithParser/asf.xml @@ -1,14 +1,14 @@ <asf xmlversion="1.0">
- <project caption="Mouse HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.mouse_parser.example">
+ <project caption="Mouse HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.mouse_parser.example.avr8">
<require idref="lufa.demos.host.class.mouse_parser"/>
<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.mouse_parser" caption="Mouse HID (with parser) Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c index 4c8229190..3a19a7efd 100644 --- a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c +++ b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c @@ -82,12 +82,14 @@ int main(void) /** 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); diff --git a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.h b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.h index 0bbec9ff1..6d289d18a 100644 --- a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.h +++ b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.h @@ -48,6 +48,7 @@ #include <LUFA/Drivers/Peripheral/Serial.h> #include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/USB/USB.h> + #include <LUFA/Platform/Platform.h> /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/ClassDriver/PrinterHost/asf.xml b/Demos/Host/ClassDriver/PrinterHost/asf.xml index 69b4e1314..fa704ff5e 100644 --- a/Demos/Host/ClassDriver/PrinterHost/asf.xml +++ b/Demos/Host/ClassDriver/PrinterHost/asf.xml @@ -1,14 +1,14 @@ <asf xmlversion="1.0">
- <project caption="Printer Host Demo (Class Driver APIs)" id="lufa.demos.host.class.printer.example">
+ <project caption="Printer Host Demo (Class Driver APIs)" id="lufa.demos.host.class.printer.example.avr8">
<require idref="lufa.demos.host.class.printer"/>
<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.printer" caption="Printer Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c index b512735d1..50e2e50b3 100644 --- a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c +++ b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c @@ -117,12 +117,14 @@ void RNDISHost_Task(void) /** 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); diff --git a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h index 602421c80..965ff447a 100644 --- a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h +++ b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h @@ -48,6 +48,7 @@ #include <LUFA/Drivers/Peripheral/Serial.h> #include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/USB/USB.h> + #include <LUFA/Platform/Platform.h> /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml b/Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml index 5c55c5a70..8199f2d92 100644 --- a/Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml +++ b/Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml @@ -1,14 +1,14 @@ <asf xmlversion="1.0">
- <project caption="RNDIS Ethernet Host Demo (Class Driver APIs)" id="lufa.demos.host.class.rndis.example">
+ <project caption="RNDIS Ethernet Host Demo (Class Driver APIs)" id="lufa.demos.host.class.rndis.example.avr8">
<require idref="lufa.demos.host.class.rndis"/>
<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.rndis" caption="RNDIS Ethernet Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c index 35a98eb23..a08be2115 100644 --- a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c +++ b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c @@ -87,12 +87,14 @@ int main(void) /** 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); diff --git a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.h b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.h index abe0e0581..e8110a6d9 100644 --- a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.h +++ b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.h @@ -48,6 +48,7 @@ #include <LUFA/Drivers/Peripheral/Serial.h> #include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/USB/USB.h> + #include <LUFA/Platform/Platform.h> /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/ClassDriver/StillImageHost/asf.xml b/Demos/Host/ClassDriver/StillImageHost/asf.xml index 3703164f4..947178288 100644 --- a/Demos/Host/ClassDriver/StillImageHost/asf.xml +++ b/Demos/Host/ClassDriver/StillImageHost/asf.xml @@ -1,14 +1,14 @@ <asf xmlversion="1.0">
- <project caption="Still Image Host Demo (Class Driver APIs)" id="lufa.demos.host.class.si.example">
+ <project caption="Still Image Host Demo (Class Driver APIs)" id="lufa.demos.host.class.si.example.avr8">
<require idref="lufa.demos.host.class.si"/>
<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.si" caption="Still Image Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c index 13c8018ed..c20a7dead 100644 --- a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c +++ b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c @@ -87,12 +87,14 @@ int main(void) /** 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); @@ -170,17 +172,17 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void) LEDs_SetAllLEDs(LEDMASK_USB_ERROR); return; } - + VirtualSerial_CDC_Interface.State.LineEncoding.BaudRateBPS = 9600; VirtualSerial_CDC_Interface.State.LineEncoding.CharFormat = CDC_LINEENCODING_OneStopBit; VirtualSerial_CDC_Interface.State.LineEncoding.ParityType = CDC_PARITY_None; VirtualSerial_CDC_Interface.State.LineEncoding.DataBits = 8; - + if (CDC_Host_SetLineEncoding(&VirtualSerial_CDC_Interface)) { puts_P(PSTR("Error Setting Device Line Encoding.\r\n")); LEDs_SetAllLEDs(LEDMASK_USB_ERROR); - return; + return; } puts_P(PSTR("CDC Device Enumerated.\r\n")); diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h index 4aec83051..1c63166ec 100644 --- a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h +++ b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h @@ -48,6 +48,7 @@ #include <LUFA/Drivers/Peripheral/Serial.h> #include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/USB/USB.h> + #include <LUFA/Platform/Platform.h> /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/asf.xml b/Demos/Host/ClassDriver/VirtualSerialHost/asf.xml index 67eb347cd..4d0ebb0f8 100644 --- a/Demos/Host/ClassDriver/VirtualSerialHost/asf.xml +++ b/Demos/Host/ClassDriver/VirtualSerialHost/asf.xml @@ -1,14 +1,14 @@ <asf xmlversion="1.0">
- <project caption="Virtual Serial CDC Host Demo (Class Driver APIs)" id="lufa.demos.host.class.cdc.example">
+ <project caption="Virtual Serial CDC Host Demo (Class Driver APIs)" id="lufa.demos.host.class.cdc.example.avr8">
<require idref="lufa.demos.host.class.cdc"/>
<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.cdc" caption="Virtual Serial CDC Host Demo (Class Driver APIs)">
|