Merge branch 'XMEGA-Demo-Ports-ClockOnly'
authorDean Camera <dean@fourwalledcubicle.com>
Mon, 20 May 2013 14:40:26 +0000 (16:40 +0200)
committerDean Camera <dean@fourwalledcubicle.com>
Mon, 20 May 2013 14:40:26 +0000 (16:40 +0200)
268 files changed:
Bootloaders/CDC/BootloaderCDC.h
Bootloaders/CDC/asf.xml
Bootloaders/DFU/BootloaderDFU.h
Bootloaders/DFU/asf.xml
Bootloaders/HID/BootloaderHID.h
Bootloaders/HID/asf.xml
Bootloaders/MassStorage/BootloaderMassStorage.h
Bootloaders/MassStorage/asf.xml
Bootloaders/Printer/BootloaderPrinter.h
Bootloaders/Printer/asf.xml
Demos/Device/ClassDriver/AudioInput/AudioInput.c
Demos/Device/ClassDriver/AudioInput/AudioInput.h
Demos/Device/ClassDriver/AudioInput/asf.xml
Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
Demos/Device/ClassDriver/AudioOutput/AudioOutput.h
Demos/Device/ClassDriver/AudioOutput/asf.xml
Demos/Device/ClassDriver/DualVirtualSerial/Config/LUFAConfig.h
Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c
Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.h
Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.txt
Demos/Device/ClassDriver/DualVirtualSerial/asf.xml
Demos/Device/ClassDriver/GenericHID/Config/LUFAConfig.h
Demos/Device/ClassDriver/GenericHID/GenericHID.c
Demos/Device/ClassDriver/GenericHID/GenericHID.h
Demos/Device/ClassDriver/GenericHID/GenericHID.txt
Demos/Device/ClassDriver/GenericHID/asf.xml
Demos/Device/ClassDriver/Joystick/Config/LUFAConfig.h
Demos/Device/ClassDriver/Joystick/Joystick.c
Demos/Device/ClassDriver/Joystick/Joystick.h
Demos/Device/ClassDriver/Joystick/Joystick.txt
Demos/Device/ClassDriver/Joystick/asf.xml
Demos/Device/ClassDriver/Keyboard/Config/LUFAConfig.h
Demos/Device/ClassDriver/Keyboard/Keyboard.c
Demos/Device/ClassDriver/Keyboard/Keyboard.h
Demos/Device/ClassDriver/Keyboard/Keyboard.txt
Demos/Device/ClassDriver/Keyboard/asf.xml
Demos/Device/ClassDriver/KeyboardMouse/Config/LUFAConfig.h
Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h
Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.txt
Demos/Device/ClassDriver/KeyboardMouse/asf.xml
Demos/Device/ClassDriver/KeyboardMouseMultiReport/Config/LUFAConfig.h
Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.h
Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.txt
Demos/Device/ClassDriver/KeyboardMouseMultiReport/asf.xml
Demos/Device/ClassDriver/MIDI/Config/LUFAConfig.h
Demos/Device/ClassDriver/MIDI/MIDI.c
Demos/Device/ClassDriver/MIDI/MIDI.h
Demos/Device/ClassDriver/MIDI/MIDI.txt
Demos/Device/ClassDriver/MIDI/asf.xml
Demos/Device/ClassDriver/MassStorage/Config/LUFAConfig.h
Demos/Device/ClassDriver/MassStorage/MassStorage.c
Demos/Device/ClassDriver/MassStorage/MassStorage.h
Demos/Device/ClassDriver/MassStorage/MassStorage.txt
Demos/Device/ClassDriver/MassStorage/asf.xml
Demos/Device/ClassDriver/MassStorageKeyboard/Config/LUFAConfig.h
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h
Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.txt
Demos/Device/ClassDriver/MassStorageKeyboard/asf.xml
Demos/Device/ClassDriver/Mouse/Config/LUFAConfig.h
Demos/Device/ClassDriver/Mouse/Mouse.c
Demos/Device/ClassDriver/Mouse/Mouse.h
Demos/Device/ClassDriver/Mouse/Mouse.txt
Demos/Device/ClassDriver/Mouse/asf.xml
Demos/Device/ClassDriver/RNDISEthernet/Config/LUFAConfig.h
Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h
Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.txt
Demos/Device/ClassDriver/RNDISEthernet/asf.xml
Demos/Device/ClassDriver/VirtualSerial/Config/LUFAConfig.h
Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c
Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.h
Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.txt
Demos/Device/ClassDriver/VirtualSerial/asf.xml
Demos/Device/ClassDriver/VirtualSerialMassStorage/Config/LUFAConfig.h
Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.h
Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.txt
Demos/Device/ClassDriver/VirtualSerialMassStorage/asf.xml
Demos/Device/ClassDriver/VirtualSerialMouse/Config/LUFAConfig.h
Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.h
Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.txt
Demos/Device/ClassDriver/VirtualSerialMouse/asf.xml
Demos/Device/Incomplete/TestAndMeasurement/Config/LUFAConfig.h
Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.h
Demos/Device/LowLevel/AudioInput/AudioInput.c
Demos/Device/LowLevel/AudioInput/AudioInput.h
Demos/Device/LowLevel/AudioInput/asf.xml
Demos/Device/LowLevel/AudioOutput/AudioOutput.c
Demos/Device/LowLevel/AudioOutput/AudioOutput.h
Demos/Device/LowLevel/AudioOutput/asf.xml
Demos/Device/LowLevel/DualVirtualSerial/Config/LUFAConfig.h
Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h
Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c
Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h
Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.txt
Demos/Device/LowLevel/DualVirtualSerial/asf.xml
Demos/Device/LowLevel/GenericHID/Config/LUFAConfig.h
Demos/Device/LowLevel/GenericHID/GenericHID.c
Demos/Device/LowLevel/GenericHID/GenericHID.h
Demos/Device/LowLevel/GenericHID/GenericHID.txt
Demos/Device/LowLevel/GenericHID/asf.xml
Demos/Device/LowLevel/Joystick/Config/LUFAConfig.h
Demos/Device/LowLevel/Joystick/Joystick.c
Demos/Device/LowLevel/Joystick/Joystick.h
Demos/Device/LowLevel/Joystick/Joystick.txt
Demos/Device/LowLevel/Joystick/asf.xml
Demos/Device/LowLevel/Keyboard/Config/LUFAConfig.h
Demos/Device/LowLevel/Keyboard/Keyboard.c
Demos/Device/LowLevel/Keyboard/Keyboard.h
Demos/Device/LowLevel/Keyboard/Keyboard.txt
Demos/Device/LowLevel/Keyboard/asf.xml
Demos/Device/LowLevel/KeyboardMouse/Config/LUFAConfig.h
Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c
Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h
Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.txt
Demos/Device/LowLevel/KeyboardMouse/asf.xml
Demos/Device/LowLevel/MIDI/Config/LUFAConfig.h
Demos/Device/LowLevel/MIDI/MIDI.c
Demos/Device/LowLevel/MIDI/MIDI.h
Demos/Device/LowLevel/MIDI/MIDI.txt
Demos/Device/LowLevel/MIDI/asf.xml
Demos/Device/LowLevel/MassStorage/Config/LUFAConfig.h
Demos/Device/LowLevel/MassStorage/MassStorage.c
Demos/Device/LowLevel/MassStorage/MassStorage.h
Demos/Device/LowLevel/MassStorage/MassStorage.txt
Demos/Device/LowLevel/MassStorage/asf.xml
Demos/Device/LowLevel/Mouse/Config/LUFAConfig.h
Demos/Device/LowLevel/Mouse/Mouse.c
Demos/Device/LowLevel/Mouse/Mouse.h
Demos/Device/LowLevel/Mouse/Mouse.txt
Demos/Device/LowLevel/Mouse/asf.xml
Demos/Device/LowLevel/RNDISEthernet/Config/LUFAConfig.h
Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c
Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h
Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.txt
Demos/Device/LowLevel/RNDISEthernet/asf.xml
Demos/Device/LowLevel/VirtualSerial/Config/LUFAConfig.h
Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c
Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h
Demos/Device/LowLevel/VirtualSerial/VirtualSerial.txt
Demos/Device/LowLevel/VirtualSerial/asf.xml
Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c
Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.h
Demos/DualRole/ClassDriver/MouseHostDevice/asf.xml
Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c
Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h
Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml
Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c
Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.h
Demos/Host/ClassDriver/AudioInputHost/asf.xml
Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c
Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.h
Demos/Host/ClassDriver/AudioOutputHost/asf.xml
Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h
Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml
Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h
Demos/Host/ClassDriver/KeyboardHost/asf.xml
Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h
Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml
Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
Demos/Host/ClassDriver/MIDIHost/MIDIHost.h
Demos/Host/ClassDriver/MIDIHost/asf.xml
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h
Demos/Host/ClassDriver/MassStorageHost/asf.xml
Demos/Host/ClassDriver/MouseHost/MouseHost.c
Demos/Host/ClassDriver/MouseHost/MouseHost.h
Demos/Host/ClassDriver/MouseHost/asf.xml
Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h
Demos/Host/ClassDriver/MouseHostWithParser/asf.xml
Demos/Host/ClassDriver/PrinterHost/PrinterHost.c
Demos/Host/ClassDriver/PrinterHost/PrinterHost.h
Demos/Host/ClassDriver/PrinterHost/asf.xml
Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h
Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml
Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
Demos/Host/ClassDriver/StillImageHost/StillImageHost.h
Demos/Host/ClassDriver/StillImageHost/asf.xml
Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h
Demos/Host/ClassDriver/VirtualSerialHost/asf.xml
Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c
Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h
Demos/Host/LowLevel/AndroidAccessoryHost/asf.xml
Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c
Demos/Host/LowLevel/AudioInputHost/AudioInputHost.h
Demos/Host/LowLevel/AudioInputHost/asf.xml
Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c
Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h
Demos/Host/LowLevel/AudioOutputHost/asf.xml
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h
Demos/Host/LowLevel/GenericHIDHost/asf.xml
Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h
Demos/Host/LowLevel/JoystickHostWithParser/asf.xml
Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h
Demos/Host/LowLevel/KeyboardHost/asf.xml
Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h
Demos/Host/LowLevel/KeyboardHostWithParser/asf.xml
Demos/Host/LowLevel/MIDIHost/MIDIHost.c
Demos/Host/LowLevel/MIDIHost/MIDIHost.h
Demos/Host/LowLevel/MIDIHost/asf.xml
Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h
Demos/Host/LowLevel/MassStorageHost/asf.xml
Demos/Host/LowLevel/MouseHost/MouseHost.c
Demos/Host/LowLevel/MouseHost/MouseHost.h
Demos/Host/LowLevel/MouseHost/asf.xml
Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h
Demos/Host/LowLevel/MouseHostWithParser/asf.xml
Demos/Host/LowLevel/PrinterHost/PrinterHost.c
Demos/Host/LowLevel/PrinterHost/PrinterHost.h
Demos/Host/LowLevel/PrinterHost/asf.xml
Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c
Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h
Demos/Host/LowLevel/RNDISEthernetHost/asf.xml
Demos/Host/LowLevel/StillImageHost/StillImageHost.c
Demos/Host/LowLevel/StillImageHost/StillImageHost.h
Demos/Host/LowLevel/StillImageHost/asf.xml
Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c
Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h
Demos/Host/LowLevel/VirtualSerialHost/asf.xml
LUFA/DoxygenPages/ChangeLog.txt
LUFA/Drivers/Board/Buttons.h
LUFA/Drivers/Board/Dataflash.h
LUFA/Drivers/Board/Joystick.h
Projects/AVRISP-MKII/AVRISP-MKII.c
Projects/AVRISP-MKII/AVRISP-MKII.h
Projects/Benito/Benito.c
Projects/Benito/Benito.h
Projects/HIDReportViewer/HIDReportViewer.c
Projects/HIDReportViewer/HIDReportViewer.h
Projects/LEDNotifier/LEDNotifier.c
Projects/LEDNotifier/LEDNotifier.h
Projects/MIDIToneGenerator/MIDIToneGenerator.c
Projects/MIDIToneGenerator/MIDIToneGenerator.h
Projects/Magstripe/Magstripe.c
Projects/Magstripe/Magstripe.h
Projects/MediaController/MediaController.c
Projects/MediaController/MediaController.h
Projects/MissileLauncher/MissileLauncher.c
Projects/MissileLauncher/MissileLauncher.h
Projects/RelayBoard/RelayBoard.c
Projects/RelayBoard/RelayBoard.h
Projects/SerialToLCD/SerialToLCD.c
Projects/SerialToLCD/SerialToLCD.h
Projects/TempDataLogger/TempDataLogger.c
Projects/TempDataLogger/TempDataLogger.h
Projects/USBtoSerial/USBtoSerial.c
Projects/USBtoSerial/USBtoSerial.h
Projects/Webserver/Webserver.c
Projects/Webserver/Webserver.h
Projects/XPLAINBridge/XPLAINBridge.c
Projects/XPLAINBridge/XPLAINBridge.h

index b0d08d8..89f90a6 100644 (file)
@@ -51,6 +51,7 @@
 
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Preprocessor Checks: */
                #if !defined(__OPTIMIZE_SIZE__)
index 6f0fa64..bddbcff 100644 (file)
@@ -9,8 +9,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x1F000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>\r
@@ -33,8 +33,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0xF000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>\r
@@ -57,8 +57,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x7000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>\r
@@ -81,8 +81,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x3000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>\r
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x1000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/>\r
index 72bb691..3d6d906 100644 (file)
@@ -53,6 +53,7 @@
 
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Preprocessor Checks: */
                #if !defined(__OPTIMIZE_SIZE__)
index 746dca7..0a547c3 100644 (file)
@@ -9,8 +9,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x1F000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>\r
@@ -33,8 +33,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0xF000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>\r
@@ -57,8 +57,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x7000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>\r
@@ -79,8 +79,8 @@
                <device-support value="atmega16u2"/>\r
                <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x3000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>\r
                <device-support value="atmega8u2"/>\r
                <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x1000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/>\r
index df9e39e..92304dc 100644 (file)
@@ -47,6 +47,7 @@
                #include "Descriptors.h"
 
                #include <LUFA/Drivers/USB/USB.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Preprocessor Checks: */
                #if !defined(__OPTIMIZE_SIZE__)
index 793b3e5..91fb35e 100644 (file)
@@ -9,8 +9,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x1F000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>\r
@@ -26,8 +26,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0xF000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>\r
@@ -43,8 +43,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x7000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>\r
@@ -60,8 +60,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x3800"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x3800"/>\r
@@ -77,8 +77,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x1800"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x1800"/>\r
index ec66d94..1fcce90 100644 (file)
@@ -49,6 +49,7 @@
 
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/USB/USB.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Preprocessor Checks: */
                #if !defined(__OPTIMIZE_SIZE__)
index 07a6f80..11633dc 100644 (file)
@@ -9,8 +9,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x1E000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x1E000"/>\r
@@ -35,8 +35,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0xE000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0xE000"/>\r
@@ -61,8 +61,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x7000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>\r
@@ -90,8 +90,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x3000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>\r
index 67789de..1e91288 100644 (file)
@@ -44,8 +44,9 @@
 
                #include "Descriptors.h"
 
-               #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Drivers/USB/USB.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Preprocessor Checks: */
                #if !defined(__OPTIMIZE_SIZE__)
index 5773bf6..b7621ac 100644 (file)
@@ -9,8 +9,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x1F000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>\r
@@ -33,8 +33,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0xF000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>\r
@@ -57,8 +57,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x7000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>\r
@@ -81,8 +81,8 @@
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x3000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>\r
 \r
                <config name="config.compiler.optimization.level" value="size"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
 \r
                <build type="define" name="BOOT_START_ADDR" value="0x1000"/>\r
                <build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/>\r
index c5ba9bc..9eec39c 100644 (file)
@@ -79,12 +79,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 */
        LEDs_Init();
@@ -265,7 +267,7 @@ bool CALLBACK_Audio_Device_GetSetInterfaceProperty(USB_ClassInfo_Audio_Device_t*
                                                    const uint8_t EntityAddress,
                                                    const uint16_t Parameter,
                                                    uint16_t* const DataLength,
-                                                   uint8_t* Data) 
+                                                   uint8_t* Data)
 {
        /* No audio interface entities in the device descriptor, thus no properties to get or set. */
        return false;
index 093f3ee..14bbd2e 100644 (file)
@@ -46,6 +46,7 @@
                #include <LUFA/Drivers/Board/Buttons.h>
                #include <LUFA/Drivers/Peripheral/ADC.h>
                #include <LUFA/Drivers/USB/USB.h>
+               #include <LUFA/Platform/Platform.h>
 
                #include "Descriptors.h"
                #include "Config/AppConfig.h"
@@ -76,7 +77,7 @@
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
                void EVENT_USB_Device_ControlRequest(void);
-               
+
                bool CALLBACK_Audio_Device_GetSetEndpointProperty(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo,
                                                                  const uint8_t EndpointProperty,
                                                                  const uint8_t EndpointAddress,
index b61714e..2a60a1e 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Audio Input Device Demo (Class Driver APIs)" id="lufa.demos.device.class.audio_input.example">\r
+       <project caption="Audio Input Device Demo (Class Driver APIs)" id="lufa.demos.device.class.audio_input.example.avr8">\r
                <require idref="lufa.demos.device.class.audio_input"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.audio_input" caption="Audio Input Device Demo (Class Driver APIs)">\r
index 22d19a4..81fd95b 100644 (file)
@@ -79,12 +79,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 */
        LEDs_Init();
@@ -302,7 +304,7 @@ bool CALLBACK_Audio_Device_GetSetInterfaceProperty(USB_ClassInfo_Audio_Device_t*
                                                    const uint8_t EntityAddress,
                                                    const uint16_t Parameter,
                                                    uint16_t* const DataLength,
-                                                   uint8_t* Data) 
+                                                   uint8_t* Data)
 {
        /* No audio interface entities in the device descriptor, thus no properties to get or set. */
        return false;
index 802bec9..bf2d3c8 100644 (file)
@@ -48,6 +48,7 @@
 
                #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. */
@@ -81,6 +82,6 @@
                                                                   const uint8_t EntityAddress,
                                                                   const uint16_t Parameter,
                                                                   uint16_t* const DataLength,
-                                                                  uint8_t* Data);              
+                                                                  uint8_t* Data);
 #endif
 
index dacdbd5..c7b0768 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Audio Output Device Demo (Class Driver APIs)" id="lufa.demos.device.class.audio_output.example">\r
+       <project caption="Audio Output Device Demo (Class Driver APIs)" id="lufa.demos.device.class.audio_output.example.avr8">\r
                <require idref="lufa.demos.device.class.audio_output"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.audio_output" caption="Audio Output Device Demo (Class Driver APIs)">\r
@@ -45,6 +45,5 @@
                <require idref="lufa.drivers.usb"/>\r
                <require idref="lufa.drivers.board"/>\r
                <require idref="lufa.drivers.board.leds"/>\r
-               <require idref="lufa.drivers.board.buttons"/>\r
        </module>\r
 </asf>\r
index 3b33e2d..d2f780a 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               6
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index b7d0455..eaba618 100644 (file)
@@ -131,12 +131,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
index 0f4ae58..c0447af 100644 (file)
@@ -48,6 +48,7 @@
                #include <LUFA/Drivers/Board/LEDs.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. */
index 70e95ad..1e8d3c5 100644 (file)
@@ -13,6 +13,9 @@
  *  \li Series 7 USB AVRs (AT90USBxxx7)
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index 11a23eb..78ca488 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Dual Virtual Serial Device Demo (Class Driver APIs)" id="lufa.demos.device.class.dual_cdc.example">\r
+       <project caption="Dual Virtual Serial Device Demo (Class Driver APIs)" id="lufa.demos.device.class.dual_cdc.example.avr8">\r
                <require idref="lufa.demos.device.class.dual_cdc"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Dual Virtual Serial Device Demo (Class Driver APIs)" id="lufa.demos.device.class.dual_cdc.example.xmega">\r
+               <require idref="lufa.demos.device.class.dual_cdc"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.dual_cdc" caption="Dual Virtual Serial Device Demo (Class Driver APIs)">\r
index 3244d3b..3871759 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               1
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 95dd44d..aae3ea7 100644 (file)
@@ -80,12 +80,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        LEDs_Init();
index bb0a6cc..7b7ac9c 100644 (file)
 
                #include "Descriptors.h"
                #include "Config/AppConfig.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. */
index 3d72345..1402740 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
@@ -68,7 +71,7 @@
  *   <tr>
  *    <td>GENERIC_REPORT_SIZE</td>
  *    <td>AppConfig.h</td>
- *    <td>This token defines the size of the device reports, both sent and received (including report ID byte). The value 
+ *    <td>This token defines the size of the device reports, both sent and received (including report ID byte). The value
  *        must be an integer ranging from 1 to 255.</td>
  *   </tr>
  *  </table>
index 2b1ee5f..f64c7da 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Generic HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.generic_hid.example">\r
+       <project caption="Generic HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.generic_hid.example.avr8">\r
                <require idref="lufa.demos.device.class.generic_hid"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Generic HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.generic_hid.example.xmega">\r
+               <require idref="lufa.demos.device.class.generic_hid"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.generic_hid" caption="Generic HID Device Demo (Class Driver APIs)">\r
index 3244d3b..3871759 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               1
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index c4576ba..809c410 100644 (file)
@@ -80,12 +80,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
index 5eafa61..037e03d 100644 (file)
@@ -49,6 +49,7 @@
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Buttons.h>
                #include <LUFA/Drivers/USB/USB.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Type Defines: */
                /** Type define for the joystick HID report structure, for creating and sending HID reports to the host PC.
index 55be2c3..e3aec3d 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index 2cae1e5..e43b1c6 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Joystick HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.joystick.example">\r
+       <project caption="Joystick HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.joystick.example.avr8">\r
                <require idref="lufa.demos.device.class.joystick"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Joystick HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.joystick.example.xmega">\r
+               <require idref="lufa.demos.device.class.joystick"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.joystick" caption="Joystick HID Device Demo (Class Driver APIs)">\r
@@ -43,6 +55,7 @@
                <require idref="lufa.drivers.usb"/>\r
                <require idref="lufa.drivers.board"/>\r
                <require idref="lufa.drivers.board.leds"/>\r
+               <require idref="lufa.drivers.board.buttons"/>\r
                <require idref="lufa.drivers.board.joystick"/>\r
        </module>\r
 </asf>\r
index 3244d3b..3871759 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               1
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 5c7a6f1..b3cc67e 100644 (file)
@@ -80,12 +80,24 @@ int main(void)
 /** Configures the board hardware and chip peripherals for the demo's functionality. */
 void SetupHardware()
 {
+#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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
index 853430a..38f50d1 100644 (file)
@@ -50,6 +50,7 @@
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Buttons.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. */
index 3e7ff88..9b4375b 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index f298910..5defbee 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Keyboard HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard.example">\r
+       <project caption="Keyboard HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard.example.avr8">\r
                <require idref="lufa.demos.device.class.keyboard"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Keyboard HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard.example.xmega">\r
+               <require idref="lufa.demos.device.class.keyboard"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.keyboard" caption="Keyboard HID Device Demo (Class Driver APIs)">\r
index 3244d3b..4873f80 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               3
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 6b2e9bb..f663f16 100644 (file)
@@ -106,12 +106,24 @@ int main(void)
 /** Configures the board hardware and chip peripherals for the demo's functionality. */
 void SetupHardware()
 {
+#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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
index 7019849..2f1d01b 100644 (file)
@@ -45,6 +45,7 @@
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Buttons.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. */
index b994422..20c89cc 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index a530eed..9e3bd49 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Keyboard and Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard_mouse.example">\r
+       <project caption="Keyboard and Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard_mouse.example.avr8">\r
                <require idref="lufa.demos.device.class.keyboard_mouse"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Keyboard and Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard_mouse.example.xmega">\r
+               <require idref="lufa.demos.device.class.keyboard_mouse"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.keyboard_mouse" caption="Keyboard and Mouse HID Device Demo (Class Driver APIs)">\r
index 3244d3b..3871759 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               1
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index b371041..f15d134 100644 (file)
@@ -80,12 +80,24 @@ int main(void)
 /** Configures the board hardware and chip peripherals for the demo's functionality. */
 void SetupHardware()
 {
+#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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
index 7019849..2f1d01b 100644 (file)
@@ -45,6 +45,7 @@
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Buttons.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. */
index e99a7dc..6ff910e 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index 7c6d76d..65858aa 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Keyboard and Mouse HID (Multi Report) Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard_mouse_mr.example">\r
+       <project caption="Keyboard and Mouse HID (Multi Report) Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard_mouse_mr.example.avr8">\r
                <require idref="lufa.demos.device.class.keyboard_mouse_mr"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Keyboard and Mouse HID (Multi Report) Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard_mouse_mr.example.xmega">\r
+               <require idref="lufa.demos.device.class.keyboard_mouse_mr"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.keyboard_mouse_mr" caption="Keyboard and Mouse HID (Multi Report) Device Demo (Class Driver APIs)">\r
index 3244d3b..a4ca343 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               2
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 139c65e..bec4428 100644 (file)
@@ -92,12 +92,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
index 54dbef2..ca4fa3b 100644 (file)
@@ -50,6 +50,7 @@
                #include <LUFA/Drivers/Board/Joystick.h>
                #include <LUFA/Drivers/Board/Buttons.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. */
index 362250c..9ac3d9e 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index 6212b48..8a7479d 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="MIDI Device Demo (Class Driver APIs)" id="lufa.demos.device.class.midi.example">\r
+       <project caption="MIDI Device Demo (Class Driver APIs)" id="lufa.demos.device.class.midi.example.avr8">\r
                <require idref="lufa.demos.device.class.midi"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="MIDI Device Demo (Class Driver APIs)" id="lufa.demos.device.class.midi.example.xmega">\r
+               <require idref="lufa.demos.device.class.midi"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.midi" caption="MIDI Device Demo (Class Driver APIs)">\r
index 3b33e2d..da728ec 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               4
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 598698a..a0fa7a2 100644 (file)
@@ -82,12 +82,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        LEDs_Init();
index cfeea80..55e1796 100644 (file)
@@ -51,6 +51,7 @@
 
                #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. */
index 5bf7c55..dd71e3b 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index 4d10f3c..2615273 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Mass Storage Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mass_storage.example">\r
+       <project caption="Mass Storage Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mass_storage.example.avr8">\r
                <require idref="lufa.demos.device.class.mass_storage"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Mass Storage Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mass_storage.example.xmega">\r
+               <require idref="lufa.demos.device.class.mass_storage"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.mass_storage" caption="Mass Storage Device Demo (Class Driver APIs)">\r
index 3b33e2d..9d358ed 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               5
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 0076178..05fdfbe 100644 (file)
@@ -106,12 +106,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        LEDs_Init();
index 2e213c9..05b5a84 100644 (file)
@@ -56,6 +56,7 @@
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Buttons.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. */
index 7cdb472..d9affad 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index 3b53aec..cd0a101 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Mass Storage and HID Keyboard Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mass_storage_keyboard.example">\r
+       <project caption="Mass Storage and HID Keyboard Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mass_storage_keyboard.example.avr8">\r
                <require idref="lufa.demos.device.class.mass_storage_keyboard"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Mass Storage and HID Keyboard Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mass_storage_keyboard.example.xmega">\r
+               <require idref="lufa.demos.device.class.mass_storage_keyboard"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.mass_storage_keyboard" caption="Mass Storage and HID Keyboard Device Demo (Class Driver APIs)">\r
index 3244d3b..3871759 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               1
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index c9caa1c..8432b65 100644 (file)
@@ -80,12 +80,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
index 371ef6c..e63c935 100644 (file)
@@ -51,6 +51,7 @@
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Buttons.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. */
index d1277a2..e4673ae 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index f501963..7ad6b94 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mouse.example">\r
+       <project caption="Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mouse.example.avr8">\r
                <require idref="lufa.demos.device.class.mouse"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mouse.example.xmega">\r
+               <require idref="lufa.demos.device.class.mouse"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.mouse" caption="Mouse HID Device Demo (Class Driver APIs)">\r
index 3244d3b..4873f80 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               3
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index ef643a8..54d5511 100644 (file)
@@ -115,12 +115,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        LEDs_Init();
index 57fdc4e..839a53b 100644 (file)
                #include "Lib/ARP.h"
                #include "Lib/Webserver.h"
                #include "Config/AppConfig.h"
-               
+
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Peripheral/Serial.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. */
index ac72d4a..aafa3cc 100644 (file)
@@ -12,6 +12,9 @@
  *
  *  \li Series 7 USB AVRs (AT90USBxxx7)
  *  \li Series 6 USB AVRs (AT90USBxxx6)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index 9aef273..3084f41 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="RNDIS Ethernet Device Demo (Class Driver APIs)" id="lufa.demos.device.class.rndis.example">\r
+       <project caption="RNDIS Ethernet Device Demo (Class Driver APIs)" id="lufa.demos.device.class.rndis.example.avr8">\r
                <require idref="lufa.demos.device.class.rndis"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="RNDIS Ethernet Device Demo (Class Driver APIs)" id="lufa.demos.device.class.rndis.example.xmega">\r
+               <require idref="lufa.demos.device.class.rndis"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.rndis" caption="RNDIS Ethernet Device Demo (Class Driver APIs)">\r
index 3b33e2d..da728ec 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               4
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 07bb842..0079acb 100644 (file)
@@ -100,12 +100,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
index 3353996..2e10366 100644 (file)
@@ -49,6 +49,7 @@
                #include <LUFA/Drivers/Board/LEDs.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. */
index e0a3291..61b6656 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index c719468..64ce25f 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Virtual Serial CDC Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc.example">\r
+       <project caption="Virtual Serial CDC Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc.example.avr8">\r
                <require idref="lufa.demos.device.class.cdc"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Virtual Serial CDC Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc.example.xmega">\r
+               <require idref="lufa.demos.device.class.cdc"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.cdc" caption="Virtual Serial CDC Device Demo (Class Driver APIs)">\r
index 3b33e2d..9d358ed 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               5
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index cc146a9..f1dc049 100644 (file)
@@ -126,12 +126,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        LEDs_Init();
index 413164d..c191f09 100644 (file)
@@ -52,6 +52,7 @@
                #include <LUFA/Drivers/Board/LEDs.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. */
index 0422441..62a7c3d 100644 (file)
@@ -13,6 +13,9 @@
  *  \li Series 7 USB AVRs (AT90USBxxx7)
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index beae956..6a21768 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Virtual Serial CDC and Mass Storage Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc_ms.example">\r
+       <project caption="Virtual Serial CDC and Mass Storage Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc_ms.example.avr8">\r
                <require idref="lufa.demos.device.class.cdc_ms"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Virtual Serial CDC and Mass Storage Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc_ms.example.xmega">\r
+               <require idref="lufa.demos.device.class.cdc_ms"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.cdc_ms" caption="Virtual Serial CDC and Mass Storage Device Demo (Class Driver APIs)">\r
index 3b33e2d..da728ec 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               4
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 54b8534..73f9e38 100644 (file)
@@ -116,12 +116,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
index b4db433..0e9a721 100644 (file)
@@ -49,6 +49,7 @@
                #include <LUFA/Drivers/Board/Joystick.h>
                #include <LUFA/Drivers/Board/Buttons.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. */
index fe6328b..96b3178 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index 61bb17f..e555710 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Virtual Serial CDC and Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc_mouse.example">\r
+       <project caption="Virtual Serial CDC and Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc_mouse.example.avr8">\r
                <require idref="lufa.demos.device.class.cdc_mouse"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Virtual Serial CDC and Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc_mouse.example.xmega">\r
+               <require idref="lufa.demos.device.class.cdc_mouse"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.class.cdc_mouse" caption="Virtual Serial CDC and Mouse HID Device Demo (Class Driver APIs)">\r
index 3b33e2d..da728ec 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               4
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index bd972e2..4bd7027 100644 (file)
@@ -93,12 +93,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        LEDs_Init();
index ed02033..0c86cc8 100644 (file)
@@ -1,7 +1,7 @@
 /*
              LUFA Library
      Copyright (C) Dean Camera, 2013.
-              
+
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
@@ -9,13 +9,13 @@
 /*
   Copyright 2013  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
-  Permission to use, copy, modify, distribute, and sell this 
+  Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
-  without fee, provided that the above copyright notice appear in 
+  without fee, provided that the above copyright notice appear in
   all copies and that both that the copyright notice and this
-  permission notice and warranty disclaimer appear in supporting 
-  documentation, and that the name of the author not be used in 
-  advertising or publicity pertaining to distribution of the 
+  permission notice and warranty disclaimer appear in supporting
+  documentation, and that the name of the author not be used in
+  advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
   The author disclaims all warranties with regard to this
@@ -39,8 +39,9 @@
 
                #include "Descriptors.h"
 
-               #include <LUFA/Drivers/USB/USB.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. */
@@ -54,7 +55,7 @@
 
                /** LED mask for the library LED driver, to indicate that an error has occurred in the USB interface. */
                #define LEDMASK_USB_ERROR                    (LEDS_LED1 | LEDS_LED3)
-               
+
                /** LED mask for the library LED driver, to indicate that the USB interface is busy. */
                #define LEDMASK_USB_BUSY                      LEDS_LED2
 
                #define Req_CheckClearStatus                  0x06
                #define Req_GetCapabilities                   0x07
                #define Req_IndicatorPulse                    0x40
-               
+
                #define TMC_STATUS_SUCCESS                    0x01
                #define TMC_STATUS_PENDING                    0x02
                #define TMC_STATUS_FAILED                     0x80
                #define TMC_STATUS_TRANSFER_NOT_IN_PROGRESS   0x81
                #define TMC_STATUS_SPLIT_NOT_IN_PROGRESS      0x82
                #define TMC_STATUS_SPLIT_IN_PROGRESS          0x83
-               
+
                #define TMC_MESSAGEID_DEV_DEP_MSG_OUT         0x01
                #define TMC_MESSAGEID_DEV_DEP_MSG_IN          0x02
                #define TMC_MESSAGEID_DEV_VENDOR_OUT          0x7E
@@ -86,7 +87,7 @@
                        uint8_t  Reserved;
 
                        uint16_t TMCVersion;
-                       
+
                        struct
                        {
                                unsigned ListenOnly             : 1;
                                unsigned PulseIndicateSupported : 1;
                                unsigned Reserved               : 5;
                        } Interface;
-                       
+
                        struct
                        {
                                unsigned SupportsAbortINOnMatch : 1;
                                unsigned Reserved               : 7;
                        } Device;
-                       
+
                        uint8_t Reserved2[6];
-                       uint8_t Reserved3[12];                  
+                       uint8_t Reserved3[12];
                } TMC_Capabilities_t;
-               
+
                typedef struct
                {
                        uint8_t LastMessageTransaction;
                        uint8_t  InverseTag;
                        uint8_t  Reserved;
                        uint32_t TransferSize;
-                       
+
                        union
                        {
                                TMC_DevOUTMessageHeader_t DeviceOUT;
index 1544f09..6c7bd1d 100644 (file)
@@ -62,12 +62,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 */
        LEDs_Init();
index b7727a8..6701f8e 100644 (file)
@@ -49,6 +49,7 @@
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Buttons.h>
                #include <LUFA/Drivers/Peripheral/ADC.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** Maximum audio sample value for the microphone input. */
index 767b3fd..3fdfb65 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Audio Input Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.audio_input.example">\r
+       <project caption="Audio Input Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.audio_input.example.avr8">\r
                <require idref="lufa.demos.device.lowlevel.audio_input"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.lowlevel.audio_input" caption="Audio Input Device Demo (Low Level APIs)">\r
index e77b041..d47381d 100644 (file)
@@ -62,12 +62,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 */
        LEDs_Init();
index 2094090..45f0d4a 100644 (file)
@@ -47,6 +47,7 @@
 
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
index 458a8b9..19c15c3 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Audio Output Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.audio_output.example">\r
+       <project caption="Audio Output Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.audio_output.example.avr8">\r
                <require idref="lufa.demos.device.lowlevel.audio_output"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.lowlevel.audio_output" caption="Audio Output Device Demo (Low Level APIs)">\r
index 3b33e2d..d2f780a 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               6
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 154ed0c..a5a87dc 100644 (file)
@@ -58,7 +58,7 @@
                #define CDC2_RX_EPADDR                 (ENDPOINT_DIR_OUT | 5)
 
                /** Endpoint address of the second CDC interface's device-to-host notification IN endpoint. */
-               #define CDC2_NOTIFICATION_EPADDR       (ENDPOINT_DIR_IN | 6)
+               #define CDC2_NOTIFICATION_EPADDR       (ENDPOINT_DIR_IN  | 6)
 
                /** Size in bytes of the CDC device-to-host notification IN endpoints. */
                #define CDC_NOTIFICATION_EPSIZE        8
index a803b41..45790b1 100644 (file)
@@ -84,12 +84,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
index 6e7c73d..63f1f08 100644 (file)
@@ -48,6 +48,7 @@
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Board/Joystick.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
index 0897bf9..af263cc 100644 (file)
@@ -13,6 +13,9 @@
  *  \li Series 7 USB AVRs (AT90USBxxx7)
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index d304568..4628f4b 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Dual Virtual Serial Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.dual_cdc.example">\r
+       <project caption="Dual Virtual Serial Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.dual_cdc.example.avr8">\r
                <require idref="lufa.demos.device.lowlevel.dual_cdc"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Dual Virtual Serial Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.dual_cdc.example.xmega">\r
+               <require idref="lufa.demos.device.lowlevel.dual_cdc"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.lowlevel.dual_cdc" caption="Dual Virtual Serial Device Demo (Low Level APIs)">\r
index 3244d3b..a4ca343 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               2
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 10b344f..2c55196 100644 (file)
@@ -57,12 +57,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        LEDs_Init();
index 806eda0..3a3c86c 100644 (file)
 
                #include "Descriptors.h"
                #include "Config/AppConfig.h"
-               
+
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
index 3d72345..1402740 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
@@ -68,7 +71,7 @@
  *   <tr>
  *    <td>GENERIC_REPORT_SIZE</td>
  *    <td>AppConfig.h</td>
- *    <td>This token defines the size of the device reports, both sent and received (including report ID byte). The value 
+ *    <td>This token defines the size of the device reports, both sent and received (including report ID byte). The value
  *        must be an integer ranging from 1 to 255.</td>
  *   </tr>
  *  </table>
index 27e09ca..44fa5cf 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Generic HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.generic_hid.example">\r
+       <project caption="Generic HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.generic_hid.example.avr8">\r
                <require idref="lufa.demos.device.lowlevel.generic_hid"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Generic HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.generic_hid.example.xmega">\r
+               <require idref="lufa.demos.device.lowlevel.generic_hid"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.lowlevel.generic_hid" caption="Generic HID Device Demo (Low Level APIs)">\r
index 3244d3b..3871759 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               1
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 4e5af8d..2af5e28 100644 (file)
@@ -56,12 +56,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
index 02a85f5..0cc17a5 100644 (file)
@@ -49,6 +49,7 @@
                #include <LUFA/Drivers/Board/Joystick.h>
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Buttons.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
index 55be2c3..e3aec3d 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index 05cc157..e7df499 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Joystick HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.joystick.example">\r
+       <project caption="Joystick HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.joystick.example.avr8">\r
                <require idref="lufa.demos.device.lowlevel.joystick"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Joystick HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.joystick.example.xmega">\r
+               <require idref="lufa.demos.device.lowlevel.joystick"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.lowlevel.joystick" caption="Joystick HID Device Demo (Low Level APIs)">\r
@@ -43,6 +55,7 @@
                <require idref="lufa.drivers.usb"/>\r
                <require idref="lufa.drivers.board"/>\r
                <require idref="lufa.drivers.board.leds"/>\r
+               <require idref="lufa.drivers.board.buttons"/>\r
                <require idref="lufa.drivers.board.joystick"/>\r
        </module>\r
 </asf>\r
index 3244d3b..a4ca343 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               2
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 5ffe72f..18fde65 100644 (file)
@@ -74,12 +74,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
@@ -311,7 +323,7 @@ void SendNextReport(void)
        else
        {
                /* Check to see if the report data has changed - if so a report MUST be sent */
-               SendReport = (memcmp(&PrevKeyboardReportData, &KeyboardReportData, sizeof(USB_KeyboardReport_Data_t)) != 0);    
+               SendReport = (memcmp(&PrevKeyboardReportData, &KeyboardReportData, sizeof(USB_KeyboardReport_Data_t)) != 0);
        }
 
        /* Select the Keyboard Report Endpoint */
index 4b25e34..a2fcf5a 100644 (file)
@@ -51,6 +51,7 @@
                #include <LUFA/Drivers/Board/Joystick.h>
                #include <LUFA/Drivers/Board/Buttons.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
index f7e2829..a1582a8 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index bae9848..d242754 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Keyboard HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.keyboard.example">\r
+       <project caption="Keyboard HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.keyboard.example.avr8">\r
                <require idref="lufa.demos.device.lowlevel.keyboard"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Keyboard HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.keyboard.example.xmega">\r
+               <require idref="lufa.demos.device.lowlevel.keyboard"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.lowlevel.keyboard" caption="Keyboard HID Device Demo (Low Level APIs)">\r
index 3244d3b..4873f80 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               3
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 3eba6c3..c924bac 100644 (file)
@@ -65,12 +65,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
index ac42b34..d74482f 100644 (file)
@@ -46,6 +46,7 @@
                #include <LUFA/Drivers/Board/Joystick.h>
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Buttons.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
index b994422..20c89cc 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index 247eeea..d3eca33 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Keyboard and Mouse HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.keyboard_mouse.example">\r
+       <project caption="Keyboard and Mouse HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.keyboard_mouse.example.avr8">\r
                <require idref="lufa.demos.device.lowlevel.keyboard_mouse"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Keyboard and Mouse HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.keyboard_mouse.example.xmega">\r
+               <require idref="lufa.demos.device.lowlevel.keyboard_mouse"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.lowlevel.keyboard_mouse" caption="Keyboard and Mouse HID Device Demo (Low Level APIs)">\r
index 3244d3b..a4ca343 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               2
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index deb0561..15e0839 100644 (file)
@@ -56,12 +56,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
index b97678a..fd07f62 100644 (file)
@@ -49,6 +49,7 @@
                #include <LUFA/Drivers/Board/Joystick.h>
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Buttons.h>
+               #include <LUFA/Platform/Platform.h>
 
    /* Macros: */
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
index 362250c..9ac3d9e 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index 652d51a..de8a016 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="MIDI Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.midi.example">\r
+       <project caption="MIDI Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.midi.example.avr8">\r
                <require idref="lufa.demos.device.lowlevel.midi"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="MIDI Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.midi.example.xmega">\r
+               <require idref="lufa.demos.device.lowlevel.midi"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.lowlevel.midi" caption="MIDI Device Demo (Low Level APIs)">\r
index 3b33e2d..da728ec 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               4
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 7e8bcc4..cfb1686 100644 (file)
@@ -67,12 +67,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        LEDs_Init();
index edb3b85..634ed09 100644 (file)
@@ -51,6 +51,7 @@
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Dataflash.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
index b5f9f9c..528dbe7 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index a859733..46f25cc 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Mass Storage Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.mass_storage.example">\r
+       <project caption="Mass Storage Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.mass_storage.example.avr8">\r
                <require idref="lufa.demos.device.lowlevel.mass_storage"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Mass Storage Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.mass_storage.example.xmega">\r
+               <require idref="lufa.demos.device.lowlevel.mass_storage"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.lowlevel.mass_storage" caption="Mass Storage Device Demo (Low Level APIs)">\r
index 3244d3b..3871759 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               1
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 7575a81..601eebe 100644 (file)
@@ -73,12 +73,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
index e11b1fa..23cf133 100644 (file)
                #include <string.h>
 
                #include "Descriptors.h"
-               
+
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Board/Joystick.h>
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Buttons.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
index 0664cba..7f1c384 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index ed0c537..0f471ff 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Mouse HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.mouse.example">\r
+       <project caption="Mouse HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.mouse.example.avr8">\r
                <require idref="lufa.demos.device.lowlevel.mouse"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Mouse HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.mouse.example.xmega">\r
+               <require idref="lufa.demos.device.lowlevel.mouse"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.lowlevel.mouse" caption="Mouse HID Device Demo (Low Level APIs)">\r
index 3244d3b..4873f80 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               3
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 52085f8..2837a10 100644 (file)
@@ -62,12 +62,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        LEDs_Init();
index ec53e7b..37affda 100644 (file)
                #include "Lib/ARP.h"
                #include "Lib/Webserver.h"
                #include "Config/AppConfig.h"
-               
+
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Peripheral/Serial.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** Notification value to indicate that a frame is ready to be read by the host. */
index ac72d4a..aafa3cc 100644 (file)
@@ -12,6 +12,9 @@
  *
  *  \li Series 7 USB AVRs (AT90USBxxx7)
  *  \li Series 6 USB AVRs (AT90USBxxx6)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index 59c373a..12fc761 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="RNDIS Ethernet Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.rndis.example">\r
+       <project caption="RNDIS Ethernet Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.rndis.example.avr8">\r
                <require idref="lufa.demos.device.lowlevel.rndis"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="RNDIS Ethernet Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.rndis.example.xmega">\r
+               <require idref="lufa.demos.device.lowlevel.rndis"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.lowlevel.rndis" caption="RNDIS Ethernet Device Demo (Low Level APIs)">\r
index 3244d3b..7b4e026 100644 (file)
 //             #define NO_AUTO_VBUS_MANAGEMENT
 //             #define INVERTED_VBUS_ENABLE_LINE
 
+       #elif (ARCH == ARCH_XMEGA)
+
+               /* Non-USB Related Configuration Tokens: */
+//             #define DISABLE_TERMINAL_CODES
+
+               /* USB Class Driver Related Tokens: */
+//             #define HID_HOST_BOOT_PROTOCOL_ONLY
+//             #define HID_STATETABLE_STACK_DEPTH       {Insert Value Here}
+//             #define HID_USAGE_STACK_DEPTH            {Insert Value Here}
+//             #define HID_MAX_COLLECTIONS              {Insert Value Here}
+//             #define HID_MAX_REPORTITEMS              {Insert Value Here}
+//             #define HID_MAX_REPORT_IDS               {Insert Value Here}
+//             #define NO_CLASS_DRIVER_AUTOFLUSH
+
+               /* General USB Driver Related Tokens: */
+               #define USE_STATIC_OPTIONS               (USB_DEVICE_OPT_FULLSPEED | USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH)
+//             #define USB_STREAM_TIMEOUT_MS            {Insert Value Here}
+//             #define NO_LIMITED_CONTROLLER_CONNECT
+//             #define NO_SOF_EVENTS
+
+               /* USB Device Mode Driver Related Tokens: */
+//             #define USE_RAM_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
+//             #define USE_EEPROM_DESCRIPTORS
+//             #define NO_INTERNAL_SERIAL
+               #define FIXED_CONTROL_ENDPOINT_SIZE      8
+//             #define DEVICE_STATE_AS_GPIOR            {Insert Value Here}
+               #define FIXED_NUM_CONFIGURATIONS         1
+//             #define CONTROL_ONLY_DEVICE
+               #define MAX_ENDPOINT_INDEX               4
+//             #define NO_DEVICE_REMOTE_WAKEUP
+//             #define NO_DEVICE_SELF_POWER
+
        #else
 
                #error Unsupported architecture for this LUFA configuration file.
index 998aede..3c005f7 100644 (file)
@@ -70,12 +70,24 @@ 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);
+#elif (ARCH == ARCH_XMEGA)
+       /* Start the PLL to multiply the 2MHz RC oscillator to 32MHz and switch the CPU core to run from it */
+       XMEGACLK_StartPLL(CLOCK_SRC_INT_RC2MHZ, 2000000, F_CPU);
+       XMEGACLK_SetCPUClockSource(CLOCK_SRC_PLL);
+
+       /* Start the 32MHz internal RC oscillator and start the DFLL to increase it to 48MHz using the USB SOF as a reference */
+       XMEGACLK_StartInternalOscillator(CLOCK_SRC_INT_RC32MHZ);
+       XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);
+
+       PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
+#endif
 
        /* Hardware Initialization */
        Joystick_Init();
index 5b985ce..db5fe9d 100644 (file)
@@ -48,6 +48,7 @@
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Board/Joystick.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
index e0a3291..61b6656 100644 (file)
@@ -14,6 +14,9 @@
  *  \li Series 6 USB AVRs (AT90USBxxx6)
  *  \li Series 4 USB AVRs (ATMEGAxxU4)
  *  \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
+ *  \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
+ *  \li Series B XMEGA AVRs (ATXMEGAxxxBxU)
+ *  \li Series C XMEGA AVRs (ATXMEGAxxxCxU)
  *
  *  \section Sec_Info USB Information:
  *
index bb2c0fc..091bb1d 100644 (file)
@@ -1,14 +1,26 @@
 <asf xmlversion="1.0">\r
-       <project caption="Virtual Serial CDC Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.cdc.example">\r
+       <project caption="Virtual Serial CDC Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.cdc.example.avr8">\r
                <require idref="lufa.demos.device.lowlevel.cdc"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
+       </project>\r
+\r
+       <project caption="Virtual Serial CDC Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.cdc.example.xmega">\r
+               <require idref="lufa.demos.device.lowlevel.cdc"/>\r
+               <require idref="lufa.boards.dummy.xmega"/>\r
+               <generator value="as5_8"/>\r
+\r
+               <device-support value="atxmega128a1u"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
+\r
+               <build type="define" name="F_CPU" value="32000000UL"/>\r
+               <build type="define" name="F_USB" value="48000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.device.lowlevel.cdc" caption="Virtual Serial CDC Device Demo (Low Level APIs)">\r
index 620e809..f7c3c01 100644 (file)
@@ -68,12 +68,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);
index 48b6389..1269939 100644 (file)
@@ -50,6 +50,7 @@
                #include <LUFA/Drivers/Board/Joystick.h>
                #include <LUFA/Drivers/Board/Buttons.h>
                #include <LUFA/Drivers/USB/USB.h>
+               #include <LUFA/Platform/Platform.h>
 
                #include "Descriptors.h"
                #include "DeviceFunctions.h"
@@ -70,7 +71,7 @@
 
        /* Function Prototypes: */
                void SetupHardware(void);
-               
+
                void EVENT_USB_UIDChange(void);
 
 #endif
index d2b4214..19a0905 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Mouse HID Dual USB Mode Demo (Class Driver APIs)" id="lufa.demos.dualrole.class.mouse.example">\r
+       <project caption="Mouse HID Dual USB Mode Demo (Class Driver APIs)" id="lufa.demos.dualrole.class.mouse.example.avr8">\r
                <require idref="lufa.demos.dualrole.class.mouse"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.dualrole.class.mouse" caption="Mouse HID Dual USB Mode Demo (Class Driver APIs)">\r
index d103b5d..a4248e2 100644 (file)
@@ -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);
index d0abfef..58b18e9 100644 (file)
@@ -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. */
index 19c6348..c31e663 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Android Accessory Host Demo (Class Driver APIs)" id="lufa.demos.host.class.android.example">\r
+       <project caption="Android Accessory Host Demo (Class Driver APIs)" id="lufa.demos.host.class.android.example.avr8">\r
                <require idref="lufa.demos.host.class.android"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.class.android" caption="Android Accessory Host Demo (Class Driver APIs)">\r
index bc6ade8..fe02356 100644 (file)
@@ -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);
index b802a58..3da8d88 100644 (file)
@@ -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. */
index 5c28af9..ac0d067 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Audio Input Host Demo (Class Driver APIs)" id="lufa.demos.host.class.audio_input.example">\r
+       <project caption="Audio Input Host Demo (Class Driver APIs)" id="lufa.demos.host.class.audio_input.example.avr8">\r
                <require idref="lufa.demos.host.class.audio_input"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.class.audio_input" caption="Audio Input Host Demo (Class Driver APIs)">\r
index 30e60e5..6faa8fe 100644 (file)
@@ -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
index 35f881c..543f88d 100644 (file)
@@ -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: */
index 19f915c..5b53faf 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Audio Output Host Demo (Class Driver APIs)" id="lufa.demos.host.class.audio_output.example">\r
+       <project caption="Audio Output Host Demo (Class Driver APIs)" id="lufa.demos.host.class.audio_output.example.avr8">\r
                <require idref="lufa.demos.host.class.audio_output"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.class.audio_output" caption="Audio Output Host Demo (Class Driver APIs)">\r
index e2f49bc..dc0532e 100644 (file)
@@ -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);
index e290407..b66216e 100644 (file)
@@ -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. */
index 29eb917..54a5a2c 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Joystick HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.joystick_parser.example">\r
+       <project caption="Joystick HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.joystick_parser.example.avr8">\r
                <require idref="lufa.demos.host.class.joystick_parser"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.class.joystick_parser" caption="Joystick HID (with parser) Host Demo (Class Driver APIs)">\r
index 95b96cd..ee86cfc 100644 (file)
@@ -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);
index e890df4..aaf0477 100644 (file)
@@ -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. */
index 7676206..f9d6067 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Keyboard HID Host Demo (Class Driver APIs)" id="lufa.demos.host.class.keyboard.example">\r
+       <project caption="Keyboard HID Host Demo (Class Driver APIs)" id="lufa.demos.host.class.keyboard.example.avr8">\r
                <require idref="lufa.demos.host.class.keyboard"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.class.keyboard" caption="Keyboard HID Host Demo (Class Driver APIs)">\r
index 58c5029..c47d719 100644 (file)
@@ -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);
index 63078fb..643e2f3 100644 (file)
@@ -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. */
index c7352f6..fdd3e79 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Keyboard HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.keyboard_parser.example">\r
+       <project caption="Keyboard HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.keyboard_parser.example.avr8">\r
                <require idref="lufa.demos.host.class.keyboard_parser"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.class.keyboard_parser" caption="Keyboard HID (with parser) Host Demo (Class Driver APIs)">\r
index 6e8c3e2..1160f63 100644 (file)
@@ -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);
index 1b8619d..db1aaf6 100644 (file)
@@ -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. */
index 3ae82cb..b52521f 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="MIDI Host Demo (Class Driver APIs)" id="lufa.demos.host.class.midi.example">\r
+       <project caption="MIDI Host Demo (Class Driver APIs)" id="lufa.demos.host.class.midi.example.avr8">\r
                <require idref="lufa.demos.host.class.midi"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.class.midi" caption="MIDI Host Demo (Class Driver APIs)">\r
index a09ae54..ead53a8 100644 (file)
@@ -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);
index d3a906a..519aad7 100644 (file)
@@ -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. */
index 7eb2a6b..dbc871e 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Mass Storage Host Demo (Class Driver APIs)" id="lufa.demos.host.class.ms.example">\r
+       <project caption="Mass Storage Host Demo (Class Driver APIs)" id="lufa.demos.host.class.ms.example.avr8">\r
                <require idref="lufa.demos.host.class.ms"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.class.ms" caption="Mass Storage Host Demo (Class Driver APIs)">\r
index e565902..7b3d20b 100644 (file)
@@ -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);
index d6c50f9..b256641 100644 (file)
@@ -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. */
index 1bc0a31..ecc6218 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Mouse HID Host Demo (Class Driver APIs)" id="lufa.demos.host.class.mouse.example">\r
+       <project caption="Mouse HID Host Demo (Class Driver APIs)" id="lufa.demos.host.class.mouse.example.avr8">\r
                <require idref="lufa.demos.host.class.mouse"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.class.mouse" caption="Mouse HID Host Demo (Class Driver APIs)">\r
index 0ecab53..265a8f6 100644 (file)
@@ -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);
index cb5c313..d0dd9a9 100644 (file)
@@ -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. */
index c1a4755..a9ca34b 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Mouse HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.mouse_parser.example">\r
+       <project caption="Mouse HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.mouse_parser.example.avr8">\r
                <require idref="lufa.demos.host.class.mouse_parser"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.class.mouse_parser" caption="Mouse HID (with parser) Host Demo (Class Driver APIs)">\r
index 4c82291..3a19a7e 100644 (file)
@@ -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);
index 0bbec9f..6d289d1 100644 (file)
@@ -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. */
index 69b4e13..fa704ff 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Printer Host Demo (Class Driver APIs)" id="lufa.demos.host.class.printer.example">\r
+       <project caption="Printer Host Demo (Class Driver APIs)" id="lufa.demos.host.class.printer.example.avr8">\r
                <require idref="lufa.demos.host.class.printer"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.class.printer" caption="Printer Host Demo (Class Driver APIs)">\r
index b512735..50e2e50 100644 (file)
@@ -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);
index 602421c..965ff44 100644 (file)
@@ -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. */
index 5c55c5a..8199f2d 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="RNDIS Ethernet Host Demo (Class Driver APIs)" id="lufa.demos.host.class.rndis.example">\r
+       <project caption="RNDIS Ethernet Host Demo (Class Driver APIs)" id="lufa.demos.host.class.rndis.example.avr8">\r
                <require idref="lufa.demos.host.class.rndis"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.class.rndis" caption="RNDIS Ethernet Host Demo (Class Driver APIs)">\r
index 35a98eb..a08be21 100644 (file)
@@ -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);
index abe0e05..e8110a6 100644 (file)
@@ -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. */
index 3703164..9471782 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Still Image Host Demo (Class Driver APIs)" id="lufa.demos.host.class.si.example">\r
+       <project caption="Still Image Host Demo (Class Driver APIs)" id="lufa.demos.host.class.si.example.avr8">\r
                <require idref="lufa.demos.host.class.si"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.class.si" caption="Still Image Host Demo (Class Driver APIs)">\r
index 13c8018..c20a7de 100644 (file)
@@ -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"));
index 4aec830..1c63166 100644 (file)
@@ -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. */
index 67eb347..4d0ebb0 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Virtual Serial CDC Host Demo (Class Driver APIs)" id="lufa.demos.host.class.cdc.example">\r
+       <project caption="Virtual Serial CDC Host Demo (Class Driver APIs)" id="lufa.demos.host.class.cdc.example.avr8">\r
                <require idref="lufa.demos.host.class.cdc"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.class.cdc" caption="Virtual Serial CDC Host Demo (Class Driver APIs)">\r
index 72190a4..e84b877 100644 (file)
@@ -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);
index 5383d86..395206d 100644 (file)
@@ -52,6 +52,7 @@
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Peripheral/Serial.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
index 0100f60..9d95cb5 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Android Accessory Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.android.example">\r
+       <project caption="Android Accessory Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.android.example.avr8">\r
                <require idref="lufa.demos.host.lowlevel.android"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.lowlevel.android" caption="Android Accessory Host Demo (Low Level APIs)">\r
index 9e6ddd3..a4d083b 100644 (file)
@@ -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);
index febd6ea..abf1973 100644 (file)
@@ -48,6 +48,7 @@
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Peripheral/Serial.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
                #include "ConfigDescriptor.h"
 
index f043fb9..6c565b3 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Audio Input Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.audio_input.example">\r
+       <project caption="Audio Input Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.audio_input.example.avr8">\r
                <require idref="lufa.demos.host.lowlevel.audio_input"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.lowlevel.audio_input" caption="Audio Input Host Demo (Low Level APIs)">\r
index dfe0609..5d62508 100644 (file)
@@ -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
index 58655ba..3c4ef5b 100644 (file)
@@ -50,6 +50,7 @@
                #include <LUFA/Drivers/Peripheral/ADC.h>
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Buttons.h>
+               #include <LUFA/Platform/Platform.h>
 
                #include "ConfigDescriptor.h"
                #include "Config/AppConfig.h"
index 2008324..a56c84d 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Audio Output Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.audio_output.example">\r
+       <project caption="Audio Output Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.audio_output.example.avr8">\r
                <require idref="lufa.demos.host.lowlevel.audio_output"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.lowlevel.audio_output" caption="Audio Output Host Demo (Low Level APIs)">\r
index 3926204..35794df 100644 (file)
@@ -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);
index ac9cd24..8c05d30 100644 (file)
@@ -48,6 +48,7 @@
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Peripheral/Serial.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
                #include "ConfigDescriptor.h"
 
index 17cc78a..12df51f 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Generic HID Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.generic_hid.example">\r
+       <project caption="Generic HID Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.generic_hid.example.avr8">\r
                <require idref="lufa.demos.host.lowlevel.generic_hid"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.lowlevel.generic_hid" caption="Generic HID Host Demo (Low Level APIs)">\r
index bc5a457..35e3469 100644 (file)
@@ -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);
index a6acd1a..90bc70f 100644 (file)
@@ -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>
 
                #include "ConfigDescriptor.h"
                #include "HIDReport.h"
index 2450519..cf87706 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Joystick HID (with parser) Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.joystick_parser.example">\r
+       <project caption="Joystick HID (with parser) Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.joystick_parser.example.avr8">\r
                <require idref="lufa.demos.host.lowlevel.joystick_parser"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.lowlevel.joystick_parser" caption="Joystick HID (with parser) Host Demo (Low Level APIs)">\r
index a5a24ab..f10191a 100644 (file)
@@ -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);
index 0f38db7..e11e63f 100644 (file)
@@ -48,6 +48,7 @@
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Peripheral/Serial.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
                #include "ConfigDescriptor.h"
 
index db3efd1..32a88af 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Keyboard HID Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.keyboard.example">\r
+       <project caption="Keyboard HID Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.keyboard.example.avr8">\r
                <require idref="lufa.demos.host.lowlevel.keyboard"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.lowlevel.keyboard" caption="Keyboard HID Host Demo (Low Level APIs)">\r
index 9587d71..e02d583 100644 (file)
@@ -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);
index 7d384d6..14a5693 100644 (file)
@@ -43,6 +43,7 @@
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Peripheral/Serial.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
                #include "ConfigDescriptor.h"
                #include "HIDReport.h"
index e6f343d..1b78197 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Keyboard HID (with parser) Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.keyboard_parser.example">\r
+       <project caption="Keyboard HID (with parser) Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.keyboard_parser.example.avr8">\r
                <require idref="lufa.demos.host.lowlevel.keyboard_parser"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.lowlevel.keyboard_parser" caption="Keyboard HID (with parser) Host Demo (Low Level APIs)">\r
index 7cef442..620cbc9 100644 (file)
@@ -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);
index 73933c0..fd25001 100644 (file)
@@ -50,6 +50,7 @@
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Buttons.h>
                #include <LUFA/Drivers/Board/Joystick.h>
+               #include <LUFA/Platform/Platform.h>
 
                #include "ConfigDescriptor.h"
 
index 1ecde00..862f719 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="MIDI Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.midi.example">\r
+       <project caption="MIDI Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.midi.example.avr8">\r
                <require idref="lufa.demos.host.lowlevel.midi"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.lowlevel.midi" caption="MIDI Host Demo (Low Level APIs)">\r
index b375798..ff32da5 100644 (file)
@@ -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);
index 2229ff3..429193d 100644 (file)
@@ -55,6 +55,7 @@
                #include <LUFA/Drivers/Peripheral/Serial.h>
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Buttons.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
index fd93fc6..1ee5870 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Mass Storage Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.ms.example">\r
+       <project caption="Mass Storage Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.ms.example.avr8">\r
                <require idref="lufa.demos.host.lowlevel.ms"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.lowlevel.ms" caption="Mass Storage Host Demo (Low Level APIs)">\r
index b24d1ae..a9225a1 100644 (file)
@@ -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);
index 6bbb71a..4dddd20 100644 (file)
@@ -48,6 +48,7 @@
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Peripheral/Serial.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
                #include "ConfigDescriptor.h"
 
index 8fca686..30aa33d 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Mouse HID Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.mouse.example">\r
+       <project caption="Mouse HID Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.mouse.example.avr8">\r
                <require idref="lufa.demos.host.lowlevel.mouse"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.lowlevel.mouse" caption="Mouse HID Host Demo (Low Level APIs)">\r
index 81c7343..438c6fe 100644 (file)
@@ -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);
index 8d907d7..d0744e5 100644 (file)
@@ -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>
 
                #include "ConfigDescriptor.h"
                #include "HIDReport.h"
index afc321a..f5a76a3 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Mouse HID (with parser) Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.mouse_parser.example">\r
+       <project caption="Mouse HID (with parser) Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.mouse_parser.example.avr8">\r
                <require idref="lufa.demos.host.lowlevel.mouse_parser"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.lowlevel.mouse_parser" caption="Mouse HID (with parser) Host Demo (Low Level APIs)">\r
index 31b0145..c028f28 100644 (file)
@@ -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);
index 7998b98..69cfb91 100644 (file)
@@ -52,6 +52,7 @@
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Peripheral/Serial.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
index abe73c5..f24a1e1 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Printer Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.printer.example">\r
+       <project caption="Printer Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.printer.example.avr8">\r
                <require idref="lufa.demos.host.lowlevel.printer"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.lowlevel.printer" caption="Printer Host Demo (Low Level APIs)">\r
index e92b314..d01bc3a 100644 (file)
@@ -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);
index cb77075..9843b64 100644 (file)
@@ -48,6 +48,7 @@
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Peripheral/Serial.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
                #include "Lib/RNDISCommands.h"
 
index fafffbf..7f64c84 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="RNDIS Ethernet Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.rndis.example">\r
+       <project caption="RNDIS Ethernet Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.rndis.example.avr8">\r
                <require idref="lufa.demos.host.lowlevel.rndis"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.lowlevel.rndis" caption="RNDIS Ethernet Host Demo (Low Level APIs)">\r
index 779827a..89e7996 100644 (file)
@@ -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);
index 8ce267d..2d2181c 100644 (file)
@@ -51,6 +51,7 @@
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Peripheral/Serial.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
index 5645c29..6592bf3 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Still Image Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.si.example">\r
+       <project caption="Still Image Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.si.example.avr8">\r
                <require idref="lufa.demos.host.lowlevel.si"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.lowlevel.si" caption="Still Image Host Demo (Low Level APIs)">\r
index 73a5b9c..59bd2b4 100644 (file)
@@ -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);
index 05d94a8..486aed1 100644 (file)
@@ -48,6 +48,7 @@
                #include <LUFA/Drivers/USB/USB.h>
                #include <LUFA/Drivers/Peripheral/Serial.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
                #include "ConfigDescriptor.h"
 
index 783862d..cfe4e2f 100644 (file)
@@ -1,14 +1,14 @@
 <asf xmlversion="1.0">\r
-       <project caption="Virtual Serial CDC Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.cdc.example">\r
+       <project caption="Virtual Serial CDC Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.cdc.example.avr8">\r
                <require idref="lufa.demos.host.lowlevel.cdc"/>\r
                <require idref="lufa.boards.dummy.avr8"/>\r
                <generator value="as5_8"/>\r
 \r
                <device-support value="at90usb1287"/>\r
-               <config name="lufa.drivers.board.name" value="usbkey"/>\r
+               <config name="lufa.drivers.board.name" value="none"/>\r
 \r
-               <build type="define" name="F_CPU" value="8000000UL"/>\r
-               <build type="define" name="F_USB" value="8000000UL"/>\r
+               <build type="define" name="F_CPU" value="16000000UL"/>\r
+               <build type="define" name="F_USB" value="16000000UL"/>\r
        </project>\r
 \r
        <module type="application" id="lufa.demos.host.lowlevel.cdc" caption="Virtual Serial CDC Host Demo (Low Level APIs)">\r
index b147384..aec199c 100644 (file)
   *  - Library Applications:
   *   - Added new Printer class bootloader
   *   - Added new Mass Storage class bootloader
+  *   - Added XMEGA support for class driver device demos (where applicable)
   *
   *  <b>Changed:</b>
   *  - Core:
   *   - Updated the BUILD build system module to produce binary BIN files in addition to Intel HEX files
   *   - Updated the Android Accessory Class to accept version 2 protocol devices (with version 1 functionality)
+  *   - All board drivers now implement dummy functions and constants when BOARD is set to NONE
   *
   *  <b>Fixed:</b>
   *  - Core:
index 8727507..395d790 100644 (file)
@@ -92,7 +92,9 @@
                #include "../../Common/Common.h"
 
                #if (BOARD == BOARD_NONE)
-                       #error The Board Buttons driver cannot be used if the makefile BOARD option is not set.
+                       #define BUTTONS_BUTTON1  0
+                       static inline void       Buttons_Init(void) {};
+                       static inline uint_reg_t Buttons_GetStatus(void) { return 0; };
                #elif (BOARD == BOARD_USBKEY)
                        #include "AVR8/USBKEY/Buttons.h"
                #elif (BOARD == BOARD_STK525)
index cc4aa2e..7b99371 100644 (file)
 
                /* Includes: */
                        #if (BOARD == BOARD_NONE)
-                               #error The Board Dataflash driver cannot be used if the makefile BOARD option is not set.
+                               #define DATAFLASH_TOTALCHIPS  0
+                               #define DATAFLASH_NO_CHIP     0
+                               #define DATAFLASH_CHIP1       0
+                               #define DATAFLASH_PAGE_SIZE   0
+                               #define DATAFLASH_PAGES       0
+                               static inline void    Dataflash_Init(void) {};
+                               static inline uint8_t Dataflash_TransferByte(const uint8_t Byte) { return 0; };
+                               static inline void    Dataflash_SendByte(const uint8_t Byte) {};
+                               static inline uint8_t Dataflash_ReceiveByte(void) { return 0; };
+                               static inline uint8_t Dataflash_GetSelectedChip(void) { return 0; };
+                               static inline void    Dataflash_SelectChip(const uint8_t ChipMask) {};
+                               static inline void    Dataflash_DeselectChip(void) {};
+                               static inline void    Dataflash_SelectChipFromPage(const uint16_t PageAddress) {};
+                               static inline void    Dataflash_ToggleSelectedChipCS(void) {};
+                               static inline void    Dataflash_WaitWhileBusy(void) {};
+                               static inline void    Dataflash_SendAddressBytes(uint16_t PageAddress,
+                                                                                const uint16_t BufferByte) {};
                        #elif (BOARD == BOARD_USBKEY)
                                #include "AVR8/USBKEY/Dataflash.h"
                        #elif (BOARD == BOARD_STK525)
index e39c225..c3b306e 100644 (file)
  *  \code
  *      // Initialize the board Joystick driver before first use
  *      Joystick_Init();
- *      
+ *
  *      printf("Waiting for joystick movement...\r\n");
- *      
+ *
  *      // Loop until a the joystick has been moved
  *      uint8_t JoystickMovement;
  *      while (!(JoystickMovement = Joystick_GetStatus())) {};
- *      
+ *
  *      // Display which direction the joystick was moved in
  *      printf("Joystick moved:\r\n");
- *      
+ *
  *      if (JoystickMovement & (JOY_UP | JOY_DOWN))
  *        printf("%s ", (JoystickMovement & JOY_UP) ? "Up" : "Down");
- *      
+ *
  *      if (JoystickMovement & (JOY_LEFT | JOY_RIGHT))
  *        printf("%s ", (JoystickMovement & JOY_LEFT) ? "Left" : "Right");
- *      
+ *
  *      if (JoystickMovement & JOY_PRESS)
  *        printf("Pressed");
  *  \endcode
                #include "../../Common/Common.h"
 
                #if (BOARD == BOARD_NONE)
-                       #error The Board Joystick driver cannot be used if the makefile BOARD option is not set.
+                       #define JOY_UP           0
+                       #define JOY_DOWN         0
+                       #define JOY_LEFT         0
+                       #define JOY_RIGHT        0
+                       #define JOY_PRESS        0
+                       static inline void       Joystick_Init(void) {};
+                       static inline uint_reg_t Joystick_GetStatus(void) { return 0; };
                #elif (BOARD == BOARD_USBKEY)
                        #include "AVR8/USBKEY/Joystick.h"
                #elif (BOARD == BOARD_STK525)
index 24b14b8..685d7c6 100644 (file)
@@ -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 */
        LEDs_Init();
index 0418f21..138947a 100644 (file)
@@ -44,6 +44,7 @@
 
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/USB/USB.h>
+               #include <LUFA/Platform/Platform.h>
 
                #if defined(ADC)
                        #include <LUFA/Drivers/Peripheral/ADC.h>
                void EVENT_USB_Device_Connect(void);
                void EVENT_USB_Device_Disconnect(void);
                void EVENT_USB_Device_ConfigurationChanged(void);
-               
+
                uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
                                                    const uint8_t wIndex,
                                                    const void** const DescriptorAddress,
                                                    uint8_t* const DescriptorMemorySpace)
-                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3) ATTR_NON_NULL_PTR_ARG(4);          
+                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3) ATTR_NON_NULL_PTR_ARG(4);
 
 #endif
 
index 7f5d507..a89e6ca 100644 (file)
@@ -171,10 +171,15 @@ 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 */
        LEDs_Init();
        USB_Init();
index 938680b..beac29f 100644 (file)
@@ -48,6 +48,7 @@
                #include <LUFA/Drivers/Peripheral/Serial.h>
                #include <LUFA/Drivers/Misc/RingBuffer.h>
                #include <LUFA/Drivers/USB/USB.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** LED mask for the library LED driver, to indicate TX activity. */
index 70b2f9e..6ca33e5 100644 (file)
@@ -202,12 +202,14 @@ void OutputCollectionPath(const HID_CollectionPath_t* const CollectionPath)
 /** 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);
index 781cfb0..ffe4e00 100644 (file)
@@ -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. */
index 886bf53..d6a8fdc 100644 (file)
@@ -142,12 +142,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 */
        LEDs_Init();
index 4bb9c04..0b8579f 100644 (file)
@@ -48,6 +48,7 @@
 
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/USB/USB.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Function Prototypes: */
                void SetupHardware(void);
index 2505a3e..662c815 100644 (file)
@@ -185,12 +185,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 */
        LEDs_Init();
index 27ee34b..ab434f3 100644 (file)
@@ -49,6 +49,7 @@
 
                #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. */
index 85df8b5..8dba737 100644 (file)
@@ -94,12 +94,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 */
        Magstripe_Init();
index 6d349df..1291f3d 100644 (file)
@@ -49,6 +49,7 @@
                #include "Config/AppConfig.h"
 
                #include <LUFA/Drivers/USB/USB.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                /** Total number of tracks which can be read from the card, between 1 and 3. */
index f1bf649..d12a21a 100644 (file)
@@ -80,12 +80,14 @@ int main(void)
 /** Configures the board hardware and chip peripherals for the demo's functionality. */
 void SetupHardware()
 {
+#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 */
        Joystick_Init();
index 99f0e12..d68e276 100644 (file)
@@ -50,6 +50,7 @@
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Buttons.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. */
index 14134d7..6294f2d 100644 (file)
@@ -112,12 +112,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 */
        LEDs_Init();
index 5b51b6e..4e72829 100644 (file)
@@ -49,6 +49,7 @@
                #include <LUFA/Drivers/Board/Buttons.h>
                #include <LUFA/Drivers/Board/Joystick.h>
                #include <LUFA/Drivers/Board/LEDs.h>
+               #include <LUFA/Platform/Platform.h>
 
                #include "ConfigDescriptor.h"
 
index 2c236de..f2ba464 100644 (file)
@@ -54,12 +54,14 @@ int main(void)
 /** Configures the board hardware and chip peripherals for the project'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 */
        USB_Init();
index e43eb2b..149685a 100644 (file)
@@ -47,6 +47,7 @@
 
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/USB/USB.h>
+               #include <LUFA/Platform/Platform.h>
 
        /* Macros: */
                #define RELAY1      (1 << 7)
index 385bcde..aac4fad 100644 (file)
@@ -29,7 +29,7 @@
   this software.
 */
 
-/** \file 
+/** \file
  *
  *  Main source file for the SerialToLCD program. This file contains the main tasks of
  *  the project and is responsible for the initial application hardware configuration.
@@ -101,7 +101,7 @@ int main(void)
                {
                        static uint8_t EscapePending = 0;
                        int16_t HD44780Byte = RingBuffer_Remove(&FromHost_Buffer);
-                       
+
                        if (HD44780Byte == COMMAND_ESCAPE)
                        {
                                if (EscapePending)
@@ -137,12 +137,14 @@ int main(void)
 /** Configures the board hardware and chip peripherals for the application'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 */
        USB_Init();
@@ -150,7 +152,7 @@ void SetupHardware(void)
        /* Power up the HD44780 Interface */
        HD44780_Initialize();
        HD44780_WriteCommand(CMD_DISPLAY_ON);
-       
+
        /* Start the flush timer so that overflows occur rapidly to push received bytes to the USB interface */
        TCCR0B = (1 << CS02);
 }
index b67b84c..22537d6 100644 (file)
@@ -49,7 +49,8 @@
         #include <LUFA/Version.h>
         #include <LUFA/Drivers/Misc/RingBuffer.h>
         #include <LUFA/Drivers/USB/USB.h>
-               
+               #include <LUFA/Platform/Platform.h>
+
        /* Macros: */
                #define COMMAND_ESCAPE     0x1B
 
index 415ad9f..7590aee 100644 (file)
@@ -190,12 +190,14 @@ void CloseLogFile(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 */
        LEDs_Init();
index 21373f4..86364f4 100644 (file)
                #include "Lib/FATFs/ff.h"
                #include "Lib/DS1307.h"
                #include "Config/AppConfig.h"
-               
+
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Board/Temperature.h>
                #include <LUFA/Drivers/Peripheral/ADC.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. */
index 76e3cb8..6df9063 100644 (file)
@@ -145,12 +145,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 */
        LEDs_Init();
index d37a540..220500f 100644 (file)
@@ -48,6 +48,7 @@
                #include <LUFA/Drivers/Peripheral/Serial.h>
                #include <LUFA/Drivers/Misc/RingBuffer.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. */
index be53032..173b52e 100644 (file)
@@ -60,12 +60,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 */
        SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_SCK_LEAD_FALLING | SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
index 1dfa830..a828e89 100644 (file)
@@ -47,6 +47,7 @@
                #include <LUFA/Drivers/Board/Dataflash.h>
                #include <LUFA/Drivers/Peripheral/SPI.h>
                #include <LUFA/Drivers/USB/USB.h>
+               #include <LUFA/Platform/Platform.h>
 
                #include "USBDeviceMode.h"
                #include "USBHostMode.h"
index 79145a1..2ef1d20 100644 (file)
@@ -169,12 +169,14 @@ void UARTBridge_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
 
        /* Disable JTAG debugging */
        MCUCR |= (1 << JTD);
@@ -197,8 +199,8 @@ void SetupHardware(void)
        #if defined(RESET_TOGGLES_LIBUSB_COMPAT)
        UpdateCurrentCompatibilityMode();
        #endif
-       
-       /* USB Stack Initialization */  
+
+       /* USB Stack Initialization */
        USB_Init();
 }
 
index 1f08b2a..55921d8 100644 (file)
@@ -45,7 +45,7 @@
 
                #include "USARTDescriptors.h"
 
-               #include "AVRISPDescriptors.h"          
+               #include "AVRISPDescriptors.h"
                #include "Lib/V2Protocol.h"
                #include "Lib/SoftUART.h"
                #include "Config/AppConfig.h"
@@ -53,6 +53,7 @@
                #include <LUFA/Drivers/Board/LEDs.h>
                #include <LUFA/Drivers/Misc/RingBuffer.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. */
@@ -97,7 +98,7 @@
                                                    const uint8_t wIndex,
                                                    const void** const DescriptorAddress,
                                                    uint8_t* const DescriptorMemorySpace)
-                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3) ATTR_NON_NULL_PTR_ARG(4);          
+                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3) ATTR_NON_NULL_PTR_ARG(4);
 
 #endif