From 329629a316e31cc91c6b56c54d5a9a06ce55dea7 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 19 May 2013 22:40:17 +0200 Subject: [PATCH] Pseudo-port the host mode demos for possible later multi-arch support. --- .../AndroidAccessoryHost/AndroidAccessoryHost.c | 2 ++ .../AndroidAccessoryHost/AndroidAccessoryHost.h | 1 + Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml | 8 ++++---- Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c | 2 ++ Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.h | 1 + Demos/Host/ClassDriver/AudioInputHost/asf.xml | 8 ++++---- Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c | 6 ++++-- Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.h | 3 ++- Demos/Host/ClassDriver/AudioOutputHost/asf.xml | 8 ++++---- .../JoystickHostWithParser/JoystickHostWithParser.c | 2 ++ .../JoystickHostWithParser/JoystickHostWithParser.h | 1 + Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml | 8 ++++---- Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c | 2 ++ Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h | 1 + Demos/Host/ClassDriver/KeyboardHost/asf.xml | 8 ++++---- .../KeyboardHostWithParser/KeyboardHostWithParser.c | 2 ++ .../KeyboardHostWithParser/KeyboardHostWithParser.h | 1 + Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml | 8 ++++---- Demos/Host/ClassDriver/MIDIHost/MIDIHost.c | 2 ++ Demos/Host/ClassDriver/MIDIHost/MIDIHost.h | 1 + Demos/Host/ClassDriver/MIDIHost/asf.xml | 8 ++++---- Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c | 2 ++ Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h | 1 + Demos/Host/ClassDriver/MassStorageHost/asf.xml | 8 ++++---- Demos/Host/ClassDriver/MouseHost/MouseHost.c | 2 ++ Demos/Host/ClassDriver/MouseHost/MouseHost.h | 1 + Demos/Host/ClassDriver/MouseHost/asf.xml | 8 ++++---- .../ClassDriver/MouseHostWithParser/MouseHostWithParser.c | 2 ++ .../ClassDriver/MouseHostWithParser/MouseHostWithParser.h | 1 + Demos/Host/ClassDriver/MouseHostWithParser/asf.xml | 8 ++++---- Demos/Host/ClassDriver/PrinterHost/PrinterHost.c | 2 ++ Demos/Host/ClassDriver/PrinterHost/PrinterHost.h | 1 + Demos/Host/ClassDriver/PrinterHost/asf.xml | 8 ++++---- .../ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c | 2 ++ .../ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h | 1 + Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml | 8 ++++---- Demos/Host/ClassDriver/StillImageHost/StillImageHost.c | 2 ++ Demos/Host/ClassDriver/StillImageHost/StillImageHost.h | 1 + Demos/Host/ClassDriver/StillImageHost/asf.xml | 8 ++++---- .../ClassDriver/VirtualSerialHost/VirtualSerialHost.c | 8 +++++--- .../ClassDriver/VirtualSerialHost/VirtualSerialHost.h | 1 + Demos/Host/ClassDriver/VirtualSerialHost/asf.xml | 8 ++++---- .../LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c | 2 ++ .../LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h | 1 + Demos/Host/LowLevel/AndroidAccessoryHost/asf.xml | 8 ++++---- Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c | 2 ++ Demos/Host/LowLevel/AudioInputHost/AudioInputHost.h | 1 + Demos/Host/LowLevel/AudioInputHost/asf.xml | 8 ++++---- Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c | 4 +++- Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h | 1 + Demos/Host/LowLevel/AudioOutputHost/asf.xml | 8 ++++---- Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c | 2 ++ Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h | 1 + Demos/Host/LowLevel/GenericHIDHost/asf.xml | 8 ++++---- .../JoystickHostWithParser/JoystickHostWithParser.c | 2 ++ .../JoystickHostWithParser/JoystickHostWithParser.h | 1 + Demos/Host/LowLevel/JoystickHostWithParser/asf.xml | 8 ++++---- Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c | 2 ++ Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h | 1 + Demos/Host/LowLevel/KeyboardHost/asf.xml | 8 ++++---- .../KeyboardHostWithParser/KeyboardHostWithParser.c | 2 ++ .../KeyboardHostWithParser/KeyboardHostWithParser.h | 1 + Demos/Host/LowLevel/KeyboardHostWithParser/asf.xml | 8 ++++---- Demos/Host/LowLevel/MIDIHost/MIDIHost.c | 4 +++- Demos/Host/LowLevel/MIDIHost/MIDIHost.h | 1 + Demos/Host/LowLevel/MIDIHost/asf.xml | 8 ++++---- Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c | 2 ++ Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h | 1 + Demos/Host/LowLevel/MassStorageHost/asf.xml | 8 ++++---- Demos/Host/LowLevel/MouseHost/MouseHost.c | 2 ++ Demos/Host/LowLevel/MouseHost/MouseHost.h | 1 + Demos/Host/LowLevel/MouseHost/asf.xml | 8 ++++---- .../LowLevel/MouseHostWithParser/MouseHostWithParser.c | 2 ++ .../LowLevel/MouseHostWithParser/MouseHostWithParser.h | 1 + Demos/Host/LowLevel/MouseHostWithParser/asf.xml | 8 ++++---- Demos/Host/LowLevel/PrinterHost/PrinterHost.c | 2 ++ Demos/Host/LowLevel/PrinterHost/PrinterHost.h | 1 + Demos/Host/LowLevel/PrinterHost/asf.xml | 8 ++++---- Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c | 2 ++ Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h | 1 + Demos/Host/LowLevel/RNDISEthernetHost/asf.xml | 8 ++++---- Demos/Host/LowLevel/StillImageHost/StillImageHost.c | 7 ++++--- Demos/Host/LowLevel/StillImageHost/StillImageHost.h | 1 + Demos/Host/LowLevel/StillImageHost/asf.xml | 8 ++++---- Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c | 2 ++ Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h | 1 + Demos/Host/LowLevel/VirtualSerialHost/asf.xml | 8 ++++---- 87 files changed, 213 insertions(+), 127 deletions(-) diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c index d103b5d336..a4248e2011 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 d0abfeff69..58b18e94cc 100644 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h +++ b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h @@ -48,6 +48,7 @@ #include #include #include + #include /* 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 19c6348c24..c31e66320f 100644 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml +++ b/Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c index bc6ade835a..fe02356886 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 b802a58ac4..3da8d88f40 100644 --- a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.h +++ b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.h @@ -48,6 +48,7 @@ #include #include #include + #include /* 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 5c28af91c7..ac0d067fb6 100644 --- a/Demos/Host/ClassDriver/AudioInputHost/asf.xml +++ b/Demos/Host/ClassDriver/AudioInputHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c index 30e60e5da5..6faa8fe30b 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 35f881cd5a..543f88ddce 100644 --- a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.h +++ b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.h @@ -50,7 +50,8 @@ #include #include #include - + #include + #include "Config/AppConfig.h" /* Macros: */ diff --git a/Demos/Host/ClassDriver/AudioOutputHost/asf.xml b/Demos/Host/ClassDriver/AudioOutputHost/asf.xml index 19f915c01f..5b53faffd0 100644 --- a/Demos/Host/ClassDriver/AudioOutputHost/asf.xml +++ b/Demos/Host/ClassDriver/AudioOutputHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c index e2f49bcd63..dc0532e6a0 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 e290407901..b66216e1bd 100644 --- a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h +++ b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h @@ -48,6 +48,7 @@ #include #include #include + #include /* 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 29eb917645..54a5a2ce52 100644 --- a/Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml +++ b/Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c index 95b96cd3f4..ee86cfcdd0 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 e890df455e..aaf0477a27 100644 --- a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h +++ b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h @@ -48,6 +48,7 @@ #include #include #include + #include /* 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 76762067fc..f9d6067e0e 100644 --- a/Demos/Host/ClassDriver/KeyboardHost/asf.xml +++ b/Demos/Host/ClassDriver/KeyboardHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c index 58c5029f66..c47d719eeb 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 63078fb0f4..643e2f3afe 100644 --- a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h +++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h @@ -48,6 +48,7 @@ #include #include #include + #include /* 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 c7352f641e..fdd3e79972 100644 --- a/Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml +++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c index 6e8c3e2441..1160f63199 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 1b8619d7e7..db1aaf6127 100644 --- a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.h +++ b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.h @@ -50,6 +50,7 @@ #include #include #include + #include /* 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 3ae82cbf8b..b52521f479 100644 --- a/Demos/Host/ClassDriver/MIDIHost/asf.xml +++ b/Demos/Host/ClassDriver/MIDIHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c index a09ae54e96..ead53a801b 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 d3a906a613..519aad7137 100644 --- a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h +++ b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h @@ -49,6 +49,7 @@ #include #include #include + #include /* 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 7eb2a6b549..dbc871e9d4 100644 --- a/Demos/Host/ClassDriver/MassStorageHost/asf.xml +++ b/Demos/Host/ClassDriver/MassStorageHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/ClassDriver/MouseHost/MouseHost.c b/Demos/Host/ClassDriver/MouseHost/MouseHost.c index e56590262a..7b3d20b541 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 d6c50f9e5d..b256641742 100644 --- a/Demos/Host/ClassDriver/MouseHost/MouseHost.h +++ b/Demos/Host/ClassDriver/MouseHost/MouseHost.h @@ -48,6 +48,7 @@ #include #include #include + #include /* 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 1bc0a31040..ecc6218544 100644 --- a/Demos/Host/ClassDriver/MouseHost/asf.xml +++ b/Demos/Host/ClassDriver/MouseHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c index 0ecab535f2..265a8f66c5 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 cb5c3130f2..d0dd9a9ff5 100644 --- a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h +++ b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h @@ -48,6 +48,7 @@ #include #include #include + #include /* 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 c1a4755787..a9ca34bff7 100644 --- a/Demos/Host/ClassDriver/MouseHostWithParser/asf.xml +++ b/Demos/Host/ClassDriver/MouseHostWithParser/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c index 4c82291907..3a19a7efdd 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 0bbec9ff19..6d289d18a6 100644 --- a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.h +++ b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.h @@ -48,6 +48,7 @@ #include #include #include + #include /* 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 69b4e13146..fa704ff5ed 100644 --- a/Demos/Host/ClassDriver/PrinterHost/asf.xml +++ b/Demos/Host/ClassDriver/PrinterHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c index b512735d18..50e2e50b35 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 602421c804..965ff447a0 100644 --- a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h +++ b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h @@ -48,6 +48,7 @@ #include #include #include + #include /* 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 5c55c5a70c..8199f2d927 100644 --- a/Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml +++ b/Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c index 35a98eb239..a08be21155 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 abe0e05811..e8110a6d9f 100644 --- a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.h +++ b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.h @@ -48,6 +48,7 @@ #include #include #include + #include /* 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 3703164f4c..947178288b 100644 --- a/Demos/Host/ClassDriver/StillImageHost/asf.xml +++ b/Demos/Host/ClassDriver/StillImageHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c index 13c8018edb..c20a7dead5 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 4aec83051b..1c63166ec5 100644 --- a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h +++ b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h @@ -48,6 +48,7 @@ #include #include #include + #include /* 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 67eb347cd6..4d0ebb0f83 100644 --- a/Demos/Host/ClassDriver/VirtualSerialHost/asf.xml +++ b/Demos/Host/ClassDriver/VirtualSerialHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c b/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c index 72190a42bd..e84b877b89 100644 --- a/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c +++ b/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c @@ -58,12 +58,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/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h b/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h index 5383d86c4d..395206d404 100644 --- a/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h +++ b/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h @@ -52,6 +52,7 @@ #include #include #include + #include /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/LowLevel/AndroidAccessoryHost/asf.xml b/Demos/Host/LowLevel/AndroidAccessoryHost/asf.xml index 0100f60ee0..9d95cb5d23 100644 --- a/Demos/Host/LowLevel/AndroidAccessoryHost/asf.xml +++ b/Demos/Host/LowLevel/AndroidAccessoryHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c b/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c index 9e6ddd3605..a4d083b9f3 100644 --- a/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c +++ b/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c @@ -57,12 +57,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/LowLevel/AudioInputHost/AudioInputHost.h b/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.h index febd6eae7b..abf19732c7 100644 --- a/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.h +++ b/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.h @@ -48,6 +48,7 @@ #include #include #include + #include #include "ConfigDescriptor.h" diff --git a/Demos/Host/LowLevel/AudioInputHost/asf.xml b/Demos/Host/LowLevel/AudioInputHost/asf.xml index f043fb9ed2..6c565b3bc5 100644 --- a/Demos/Host/LowLevel/AudioInputHost/asf.xml +++ b/Demos/Host/LowLevel/AudioInputHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c b/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c index dfe0609a80..5d62508826 100644 --- a/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c +++ b/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c @@ -57,12 +57,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); @@ -76,7 +78,7 @@ void SetupHardware(void) 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/LowLevel/AudioOutputHost/AudioOutputHost.h b/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h index 58655ba28f..3c4ef5b808 100644 --- a/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h +++ b/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h @@ -50,6 +50,7 @@ #include #include #include + #include #include "ConfigDescriptor.h" #include "Config/AppConfig.h" diff --git a/Demos/Host/LowLevel/AudioOutputHost/asf.xml b/Demos/Host/LowLevel/AudioOutputHost/asf.xml index 2008324525..a56c84d099 100644 --- a/Demos/Host/LowLevel/AudioOutputHost/asf.xml +++ b/Demos/Host/LowLevel/AudioOutputHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c index 392620461d..35794df0ec 100644 --- a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c +++ b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c @@ -59,12 +59,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/LowLevel/GenericHIDHost/GenericHIDHost.h b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h index ac9cd24bc1..8c05d301ec 100644 --- a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h +++ b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h @@ -48,6 +48,7 @@ #include #include #include + #include #include "ConfigDescriptor.h" diff --git a/Demos/Host/LowLevel/GenericHIDHost/asf.xml b/Demos/Host/LowLevel/GenericHIDHost/asf.xml index 17cc78aa0c..12df51faa6 100644 --- a/Demos/Host/LowLevel/GenericHIDHost/asf.xml +++ b/Demos/Host/LowLevel/GenericHIDHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c index bc5a457dad..35e34692b8 100644 --- a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c +++ b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c @@ -59,12 +59,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/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h index a6acd1a249..90bc70f410 100644 --- a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h +++ b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h @@ -48,6 +48,7 @@ #include #include #include + #include #include "ConfigDescriptor.h" #include "HIDReport.h" diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/asf.xml b/Demos/Host/LowLevel/JoystickHostWithParser/asf.xml index 2450519958..cf877064d2 100644 --- a/Demos/Host/LowLevel/JoystickHostWithParser/asf.xml +++ b/Demos/Host/LowLevel/JoystickHostWithParser/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c index a5a24aba96..f10191a0e7 100644 --- a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c +++ b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c @@ -59,12 +59,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/LowLevel/KeyboardHost/KeyboardHost.h b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h index 0f38db74f8..e11e63f7f9 100644 --- a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h +++ b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h @@ -48,6 +48,7 @@ #include #include #include + #include #include "ConfigDescriptor.h" diff --git a/Demos/Host/LowLevel/KeyboardHost/asf.xml b/Demos/Host/LowLevel/KeyboardHost/asf.xml index db3efd16bd..32a88aff82 100644 --- a/Demos/Host/LowLevel/KeyboardHost/asf.xml +++ b/Demos/Host/LowLevel/KeyboardHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c index 9587d71088..e02d583e53 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c @@ -59,12 +59,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/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h index 7d384d6d24..14a56931a7 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h @@ -43,6 +43,7 @@ #include #include #include + #include #include "ConfigDescriptor.h" #include "HIDReport.h" diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/asf.xml b/Demos/Host/LowLevel/KeyboardHostWithParser/asf.xml index e6f343deba..1b781972c3 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/asf.xml +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c index 7cef4427d5..620cbc988a 100644 --- a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c +++ b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c @@ -59,12 +59,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); @@ -188,7 +190,7 @@ void MIDIHost_Task(void) MIDIEvent.Data2, MIDIEvent.Data3); } } - + Pipe_Freeze(); Pipe_SelectPipe(MIDI_DATA_OUT_PIPE); diff --git a/Demos/Host/LowLevel/MIDIHost/MIDIHost.h b/Demos/Host/LowLevel/MIDIHost/MIDIHost.h index 73933c03ab..fd250016c6 100644 --- a/Demos/Host/LowLevel/MIDIHost/MIDIHost.h +++ b/Demos/Host/LowLevel/MIDIHost/MIDIHost.h @@ -50,6 +50,7 @@ #include #include #include + #include #include "ConfigDescriptor.h" diff --git a/Demos/Host/LowLevel/MIDIHost/asf.xml b/Demos/Host/LowLevel/MIDIHost/asf.xml index 1ecde005af..862f71928d 100644 --- a/Demos/Host/LowLevel/MIDIHost/asf.xml +++ b/Demos/Host/LowLevel/MIDIHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c index b3757981c6..ff32da5bf6 100644 --- a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c +++ b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c @@ -63,12 +63,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/LowLevel/MassStorageHost/MassStorageHost.h b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h index 2229ff3b93..429193dd63 100644 --- a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h +++ b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h @@ -55,6 +55,7 @@ #include #include #include + #include /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/LowLevel/MassStorageHost/asf.xml b/Demos/Host/LowLevel/MassStorageHost/asf.xml index fd93fc644f..1ee5870ba5 100644 --- a/Demos/Host/LowLevel/MassStorageHost/asf.xml +++ b/Demos/Host/LowLevel/MassStorageHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/LowLevel/MouseHost/MouseHost.c b/Demos/Host/LowLevel/MouseHost/MouseHost.c index b24d1ae725..a9225a1dfb 100644 --- a/Demos/Host/LowLevel/MouseHost/MouseHost.c +++ b/Demos/Host/LowLevel/MouseHost/MouseHost.c @@ -59,12 +59,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/LowLevel/MouseHost/MouseHost.h b/Demos/Host/LowLevel/MouseHost/MouseHost.h index 6bbb71a1eb..4dddd20749 100644 --- a/Demos/Host/LowLevel/MouseHost/MouseHost.h +++ b/Demos/Host/LowLevel/MouseHost/MouseHost.h @@ -48,6 +48,7 @@ #include #include #include + #include #include "ConfigDescriptor.h" diff --git a/Demos/Host/LowLevel/MouseHost/asf.xml b/Demos/Host/LowLevel/MouseHost/asf.xml index 8fca686c1e..30aa33dbc9 100644 --- a/Demos/Host/LowLevel/MouseHost/asf.xml +++ b/Demos/Host/LowLevel/MouseHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c index 81c734395b..438c6fee90 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c +++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c @@ -59,12 +59,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/LowLevel/MouseHostWithParser/MouseHostWithParser.h b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h index 8d907d7df8..d0744e522b 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h +++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h @@ -48,6 +48,7 @@ #include #include #include + #include #include "ConfigDescriptor.h" #include "HIDReport.h" diff --git a/Demos/Host/LowLevel/MouseHostWithParser/asf.xml b/Demos/Host/LowLevel/MouseHostWithParser/asf.xml index afc321afe0..f5a76a3651 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/asf.xml +++ b/Demos/Host/LowLevel/MouseHostWithParser/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c index 31b0145b46..c028f2823b 100644 --- a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c +++ b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c @@ -59,12 +59,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/LowLevel/PrinterHost/PrinterHost.h b/Demos/Host/LowLevel/PrinterHost/PrinterHost.h index 7998b98a94..69cfb9129c 100644 --- a/Demos/Host/LowLevel/PrinterHost/PrinterHost.h +++ b/Demos/Host/LowLevel/PrinterHost/PrinterHost.h @@ -52,6 +52,7 @@ #include #include #include + #include /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/LowLevel/PrinterHost/asf.xml b/Demos/Host/LowLevel/PrinterHost/asf.xml index abe73c5aee..f24a1e1640 100644 --- a/Demos/Host/LowLevel/PrinterHost/asf.xml +++ b/Demos/Host/LowLevel/PrinterHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c index e92b3146b5..d01bc3a907 100644 --- a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c +++ b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c @@ -59,12 +59,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/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h index cb77075f9e..9843b64a29 100644 --- a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h +++ b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h @@ -48,6 +48,7 @@ #include #include #include + #include #include "Lib/RNDISCommands.h" diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/asf.xml b/Demos/Host/LowLevel/RNDISEthernetHost/asf.xml index fafffbf081..7f64c8415e 100644 --- a/Demos/Host/LowLevel/RNDISEthernetHost/asf.xml +++ b/Demos/Host/LowLevel/RNDISEthernetHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/LowLevel/StillImageHost/StillImageHost.c b/Demos/Host/LowLevel/StillImageHost/StillImageHost.c index 779827a9c8..89e7996f7a 100644 --- a/Demos/Host/LowLevel/StillImageHost/StillImageHost.c +++ b/Demos/Host/LowLevel/StillImageHost/StillImageHost.c @@ -59,13 +59,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 */ - CLKPR = (1 << CLKPCE); - CLKPR = 0; + /* Disable clock division */ + clock_prescale_set(clock_div_1); +#endif /* Hardware Initialization */ Serial_Init(9600, false); diff --git a/Demos/Host/LowLevel/StillImageHost/StillImageHost.h b/Demos/Host/LowLevel/StillImageHost/StillImageHost.h index 8ce267d0ec..2d2181c94d 100644 --- a/Demos/Host/LowLevel/StillImageHost/StillImageHost.h +++ b/Demos/Host/LowLevel/StillImageHost/StillImageHost.h @@ -51,6 +51,7 @@ #include #include #include + #include /* Macros: */ /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */ diff --git a/Demos/Host/LowLevel/StillImageHost/asf.xml b/Demos/Host/LowLevel/StillImageHost/asf.xml index 5645c292ab..6592bf3b1a 100644 --- a/Demos/Host/LowLevel/StillImageHost/asf.xml +++ b/Demos/Host/LowLevel/StillImageHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + + diff --git a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c index 73a5b9c74c..59bd2b4783 100644 --- a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c +++ b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c @@ -59,12 +59,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/LowLevel/VirtualSerialHost/VirtualSerialHost.h b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h index 05d94a8d8c..486aed188d 100644 --- a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h +++ b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h @@ -48,6 +48,7 @@ #include #include #include + #include #include "ConfigDescriptor.h" diff --git a/Demos/Host/LowLevel/VirtualSerialHost/asf.xml b/Demos/Host/LowLevel/VirtualSerialHost/asf.xml index 783862d7b1..cfe4e2f869 100644 --- a/Demos/Host/LowLevel/VirtualSerialHost/asf.xml +++ b/Demos/Host/LowLevel/VirtualSerialHost/asf.xml @@ -1,14 +1,14 @@ - + - + - - + +