aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2013-05-20 16:40:26 +0200
committerDean Camera <dean@fourwalledcubicle.com>2013-05-20 16:40:26 +0200
commitf8353236821c2194f3fffd38c26f77d056e66555 (patch)
treea17706597917aa8ea3f5b22ce93dc4b1afa3fced
parentb37bde56753fc19bcab04ab4e24d5922b65026a4 (diff)
parent10448970e5c4c5ad374f0887532fedc0daf97c42 (diff)
downloadlufa-f8353236821c2194f3fffd38c26f77d056e66555.tar.gz
lufa-f8353236821c2194f3fffd38c26f77d056e66555.tar.bz2
lufa-f8353236821c2194f3fffd38c26f77d056e66555.zip
Merge branch 'XMEGA-Demo-Ports-ClockOnly'
-rw-r--r--Bootloaders/CDC/BootloaderCDC.h1
-rw-r--r--Bootloaders/CDC/asf.xml20
-rw-r--r--Bootloaders/DFU/BootloaderDFU.h1
-rw-r--r--Bootloaders/DFU/asf.xml20
-rw-r--r--Bootloaders/HID/BootloaderHID.h1
-rw-r--r--Bootloaders/HID/asf.xml20
-rw-r--r--Bootloaders/MassStorage/BootloaderMassStorage.h1
-rw-r--r--Bootloaders/MassStorage/asf.xml16
-rw-r--r--Bootloaders/Printer/BootloaderPrinter.h3
-rw-r--r--Bootloaders/Printer/asf.xml20
-rw-r--r--Demos/Device/ClassDriver/AudioInput/AudioInput.c4
-rw-r--r--Demos/Device/ClassDriver/AudioInput/AudioInput.h3
-rw-r--r--Demos/Device/ClassDriver/AudioInput/asf.xml8
-rw-r--r--Demos/Device/ClassDriver/AudioOutput/AudioOutput.c4
-rw-r--r--Demos/Device/ClassDriver/AudioOutput/AudioOutput.h3
-rw-r--r--Demos/Device/ClassDriver/AudioOutput/asf.xml9
-rw-r--r--Demos/Device/ClassDriver/DualVirtualSerial/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c12
-rw-r--r--Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.h1
-rw-r--r--Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.txt3
-rw-r--r--Demos/Device/ClassDriver/DualVirtualSerial/asf.xml20
-rw-r--r--Demos/Device/ClassDriver/GenericHID/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/ClassDriver/GenericHID/GenericHID.c12
-rw-r--r--Demos/Device/ClassDriver/GenericHID/GenericHID.h3
-rw-r--r--Demos/Device/ClassDriver/GenericHID/GenericHID.txt5
-rw-r--r--Demos/Device/ClassDriver/GenericHID/asf.xml20
-rw-r--r--Demos/Device/ClassDriver/Joystick/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/ClassDriver/Joystick/Joystick.c12
-rw-r--r--Demos/Device/ClassDriver/Joystick/Joystick.h1
-rw-r--r--Demos/Device/ClassDriver/Joystick/Joystick.txt3
-rw-r--r--Demos/Device/ClassDriver/Joystick/asf.xml21
-rw-r--r--Demos/Device/ClassDriver/Keyboard/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/ClassDriver/Keyboard/Keyboard.c12
-rw-r--r--Demos/Device/ClassDriver/Keyboard/Keyboard.h1
-rw-r--r--Demos/Device/ClassDriver/Keyboard/Keyboard.txt3
-rw-r--r--Demos/Device/ClassDriver/Keyboard/asf.xml20
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouse/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c12
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h1
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.txt3
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouse/asf.xml20
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouseMultiReport/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c12
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.h1
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.txt3
-rw-r--r--Demos/Device/ClassDriver/KeyboardMouseMultiReport/asf.xml20
-rw-r--r--Demos/Device/ClassDriver/MIDI/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/ClassDriver/MIDI/MIDI.c12
-rw-r--r--Demos/Device/ClassDriver/MIDI/MIDI.h1
-rw-r--r--Demos/Device/ClassDriver/MIDI/MIDI.txt3
-rw-r--r--Demos/Device/ClassDriver/MIDI/asf.xml20
-rw-r--r--Demos/Device/ClassDriver/MassStorage/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/ClassDriver/MassStorage/MassStorage.c12
-rw-r--r--Demos/Device/ClassDriver/MassStorage/MassStorage.h1
-rw-r--r--Demos/Device/ClassDriver/MassStorage/MassStorage.txt3
-rw-r--r--Demos/Device/ClassDriver/MassStorage/asf.xml20
-rw-r--r--Demos/Device/ClassDriver/MassStorageKeyboard/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c12
-rw-r--r--Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h1
-rw-r--r--Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.txt3
-rw-r--r--Demos/Device/ClassDriver/MassStorageKeyboard/asf.xml20
-rw-r--r--Demos/Device/ClassDriver/Mouse/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/ClassDriver/Mouse/Mouse.c12
-rw-r--r--Demos/Device/ClassDriver/Mouse/Mouse.h1
-rw-r--r--Demos/Device/ClassDriver/Mouse/Mouse.txt3
-rw-r--r--Demos/Device/ClassDriver/Mouse/asf.xml20
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c12
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h3
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.txt3
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/asf.xml20
-rw-r--r--Demos/Device/ClassDriver/VirtualSerial/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c12
-rw-r--r--Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.h1
-rw-r--r--Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.txt3
-rw-r--r--Demos/Device/ClassDriver/VirtualSerial/asf.xml20
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMassStorage/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c12
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.h1
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.txt3
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMassStorage/asf.xml20
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMouse/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c12
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.h1
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.txt3
-rw-r--r--Demos/Device/ClassDriver/VirtualSerialMouse/asf.xml20
-rw-r--r--Demos/Device/Incomplete/TestAndMeasurement/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c12
-rw-r--r--Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.h33
-rw-r--r--Demos/Device/LowLevel/AudioInput/AudioInput.c2
-rw-r--r--Demos/Device/LowLevel/AudioInput/AudioInput.h1
-rw-r--r--Demos/Device/LowLevel/AudioInput/asf.xml8
-rw-r--r--Demos/Device/LowLevel/AudioOutput/AudioOutput.c2
-rw-r--r--Demos/Device/LowLevel/AudioOutput/AudioOutput.h1
-rw-r--r--Demos/Device/LowLevel/AudioOutput/asf.xml8
-rw-r--r--Demos/Device/LowLevel/DualVirtualSerial/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h2
-rw-r--r--Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c12
-rw-r--r--Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h1
-rw-r--r--Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.txt3
-rw-r--r--Demos/Device/LowLevel/DualVirtualSerial/asf.xml20
-rw-r--r--Demos/Device/LowLevel/GenericHID/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/LowLevel/GenericHID/GenericHID.c12
-rw-r--r--Demos/Device/LowLevel/GenericHID/GenericHID.h3
-rw-r--r--Demos/Device/LowLevel/GenericHID/GenericHID.txt5
-rw-r--r--Demos/Device/LowLevel/GenericHID/asf.xml20
-rw-r--r--Demos/Device/LowLevel/Joystick/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/LowLevel/Joystick/Joystick.c12
-rw-r--r--Demos/Device/LowLevel/Joystick/Joystick.h1
-rw-r--r--Demos/Device/LowLevel/Joystick/Joystick.txt3
-rw-r--r--Demos/Device/LowLevel/Joystick/asf.xml21
-rw-r--r--Demos/Device/LowLevel/Keyboard/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/LowLevel/Keyboard/Keyboard.c14
-rw-r--r--Demos/Device/LowLevel/Keyboard/Keyboard.h1
-rw-r--r--Demos/Device/LowLevel/Keyboard/Keyboard.txt3
-rw-r--r--Demos/Device/LowLevel/Keyboard/asf.xml20
-rw-r--r--Demos/Device/LowLevel/KeyboardMouse/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c12
-rw-r--r--Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h1
-rw-r--r--Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.txt3
-rw-r--r--Demos/Device/LowLevel/KeyboardMouse/asf.xml20
-rw-r--r--Demos/Device/LowLevel/MIDI/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/LowLevel/MIDI/MIDI.c12
-rw-r--r--Demos/Device/LowLevel/MIDI/MIDI.h1
-rw-r--r--Demos/Device/LowLevel/MIDI/MIDI.txt3
-rw-r--r--Demos/Device/LowLevel/MIDI/asf.xml20
-rw-r--r--Demos/Device/LowLevel/MassStorage/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/LowLevel/MassStorage/MassStorage.c12
-rw-r--r--Demos/Device/LowLevel/MassStorage/MassStorage.h1
-rw-r--r--Demos/Device/LowLevel/MassStorage/MassStorage.txt3
-rw-r--r--Demos/Device/LowLevel/MassStorage/asf.xml20
-rw-r--r--Demos/Device/LowLevel/Mouse/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/LowLevel/Mouse/Mouse.c12
-rw-r--r--Demos/Device/LowLevel/Mouse/Mouse.h3
-rw-r--r--Demos/Device/LowLevel/Mouse/Mouse.txt3
-rw-r--r--Demos/Device/LowLevel/Mouse/asf.xml20
-rw-r--r--Demos/Device/LowLevel/RNDISEthernet/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c12
-rw-r--r--Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h3
-rw-r--r--Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.txt3
-rw-r--r--Demos/Device/LowLevel/RNDISEthernet/asf.xml20
-rw-r--r--Demos/Device/LowLevel/VirtualSerial/Config/LUFAConfig.h33
-rw-r--r--Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c12
-rw-r--r--Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h1
-rw-r--r--Demos/Device/LowLevel/VirtualSerial/VirtualSerial.txt3
-rw-r--r--Demos/Device/LowLevel/VirtualSerial/asf.xml20
-rw-r--r--Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c2
-rw-r--r--Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.h3
-rw-r--r--Demos/DualRole/ClassDriver/MouseHostDevice/asf.xml8
-rw-r--r--Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c2
-rw-r--r--Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h1
-rw-r--r--Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml8
-rw-r--r--Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c2
-rw-r--r--Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.h1
-rw-r--r--Demos/Host/ClassDriver/AudioInputHost/asf.xml8
-rw-r--r--Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c6
-rw-r--r--Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.h3
-rw-r--r--Demos/Host/ClassDriver/AudioOutputHost/asf.xml8
-rw-r--r--Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c2
-rw-r--r--Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h1
-rw-r--r--Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml8
-rw-r--r--Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c2
-rw-r--r--Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h1
-rw-r--r--Demos/Host/ClassDriver/KeyboardHost/asf.xml8
-rw-r--r--Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c2
-rw-r--r--Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h1
-rw-r--r--Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml8
-rw-r--r--Demos/Host/ClassDriver/MIDIHost/MIDIHost.c2
-rw-r--r--Demos/Host/ClassDriver/MIDIHost/MIDIHost.h1
-rw-r--r--Demos/Host/ClassDriver/MIDIHost/asf.xml8
-rw-r--r--Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c2
-rw-r--r--Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h1
-rw-r--r--Demos/Host/ClassDriver/MassStorageHost/asf.xml8
-rw-r--r--Demos/Host/ClassDriver/MouseHost/MouseHost.c2
-rw-r--r--Demos/Host/ClassDriver/MouseHost/MouseHost.h1
-rw-r--r--Demos/Host/ClassDriver/MouseHost/asf.xml8
-rw-r--r--Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c2
-rw-r--r--Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h1
-rw-r--r--Demos/Host/ClassDriver/MouseHostWithParser/asf.xml8
-rw-r--r--Demos/Host/ClassDriver/PrinterHost/PrinterHost.c2
-rw-r--r--Demos/Host/ClassDriver/PrinterHost/PrinterHost.h1
-rw-r--r--Demos/Host/ClassDriver/PrinterHost/asf.xml8
-rw-r--r--Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c2
-rw-r--r--Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h1
-rw-r--r--Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml8
-rw-r--r--Demos/Host/ClassDriver/StillImageHost/StillImageHost.c2
-rw-r--r--Demos/Host/ClassDriver/StillImageHost/StillImageHost.h1
-rw-r--r--Demos/Host/ClassDriver/StillImageHost/asf.xml8
-rw-r--r--Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c8
-rw-r--r--Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h1
-rw-r--r--Demos/Host/ClassDriver/VirtualSerialHost/asf.xml8
-rw-r--r--Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c2
-rw-r--r--Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h1
-rw-r--r--Demos/Host/LowLevel/AndroidAccessoryHost/asf.xml8
-rw-r--r--Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c2
-rw-r--r--Demos/Host/LowLevel/AudioInputHost/AudioInputHost.h1
-rw-r--r--Demos/Host/LowLevel/AudioInputHost/asf.xml8
-rw-r--r--Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c4
-rw-r--r--Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h1
-rw-r--r--Demos/Host/LowLevel/AudioOutputHost/asf.xml8
-rw-r--r--Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c2
-rw-r--r--Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h1
-rw-r--r--Demos/Host/LowLevel/GenericHIDHost/asf.xml8
-rw-r--r--Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c2
-rw-r--r--Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h1
-rw-r--r--Demos/Host/LowLevel/JoystickHostWithParser/asf.xml8
-rw-r--r--Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c2
-rw-r--r--Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h1
-rw-r--r--Demos/Host/LowLevel/KeyboardHost/asf.xml8
-rw-r--r--Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c2
-rw-r--r--Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h1
-rw-r--r--Demos/Host/LowLevel/KeyboardHostWithParser/asf.xml8
-rw-r--r--Demos/Host/LowLevel/MIDIHost/MIDIHost.c4
-rw-r--r--Demos/Host/LowLevel/MIDIHost/MIDIHost.h1
-rw-r--r--Demos/Host/LowLevel/MIDIHost/asf.xml8
-rw-r--r--Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c2
-rw-r--r--Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h1
-rw-r--r--Demos/Host/LowLevel/MassStorageHost/asf.xml8
-rw-r--r--Demos/Host/LowLevel/MouseHost/MouseHost.c2
-rw-r--r--Demos/Host/LowLevel/MouseHost/MouseHost.h1
-rw-r--r--Demos/Host/LowLevel/MouseHost/asf.xml8
-rw-r--r--Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c2
-rw-r--r--Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h1
-rw-r--r--Demos/Host/LowLevel/MouseHostWithParser/asf.xml8
-rw-r--r--Demos/Host/LowLevel/PrinterHost/PrinterHost.c2
-rw-r--r--Demos/Host/LowLevel/PrinterHost/PrinterHost.h1
-rw-r--r--Demos/Host/LowLevel/PrinterHost/asf.xml8
-rw-r--r--Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c2
-rw-r--r--Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h1
-rw-r--r--Demos/Host/LowLevel/RNDISEthernetHost/asf.xml8
-rw-r--r--Demos/Host/LowLevel/StillImageHost/StillImageHost.c7
-rw-r--r--Demos/Host/LowLevel/StillImageHost/StillImageHost.h1
-rw-r--r--Demos/Host/LowLevel/StillImageHost/asf.xml8
-rw-r--r--Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c2
-rw-r--r--Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h1
-rw-r--r--Demos/Host/LowLevel/VirtualSerialHost/asf.xml8
-rw-r--r--LUFA/DoxygenPages/ChangeLog.txt2
-rw-r--r--LUFA/Drivers/Board/Buttons.h4
-rw-r--r--LUFA/Drivers/Board/Dataflash.h18
-rw-r--r--LUFA/Drivers/Board/Joystick.h20
-rw-r--r--Projects/AVRISP-MKII/AVRISP-MKII.c2
-rw-r--r--Projects/AVRISP-MKII/AVRISP-MKII.h5
-rw-r--r--Projects/Benito/Benito.c5
-rw-r--r--Projects/Benito/Benito.h1
-rw-r--r--Projects/HIDReportViewer/HIDReportViewer.c2
-rw-r--r--Projects/HIDReportViewer/HIDReportViewer.h1
-rw-r--r--Projects/LEDNotifier/LEDNotifier.c2
-rw-r--r--Projects/LEDNotifier/LEDNotifier.h1
-rw-r--r--Projects/MIDIToneGenerator/MIDIToneGenerator.c2
-rw-r--r--Projects/MIDIToneGenerator/MIDIToneGenerator.h1
-rw-r--r--Projects/Magstripe/Magstripe.c2
-rw-r--r--Projects/Magstripe/Magstripe.h1
-rw-r--r--Projects/MediaController/MediaController.c2
-rw-r--r--Projects/MediaController/MediaController.h1
-rw-r--r--Projects/MissileLauncher/MissileLauncher.c2
-rw-r--r--Projects/MissileLauncher/MissileLauncher.h1
-rw-r--r--Projects/RelayBoard/RelayBoard.c2
-rw-r--r--Projects/RelayBoard/RelayBoard.h1
-rw-r--r--Projects/SerialToLCD/SerialToLCD.c8
-rw-r--r--Projects/SerialToLCD/SerialToLCD.h3
-rw-r--r--Projects/TempDataLogger/TempDataLogger.c2
-rw-r--r--Projects/TempDataLogger/TempDataLogger.h3
-rw-r--r--Projects/USBtoSerial/USBtoSerial.c2
-rw-r--r--Projects/USBtoSerial/USBtoSerial.h1
-rw-r--r--Projects/Webserver/Webserver.c2
-rw-r--r--Projects/Webserver/Webserver.h1
-rw-r--r--Projects/XPLAINBridge/XPLAINBridge.c6
-rw-r--r--Projects/XPLAINBridge/XPLAINBridge.h5
268 files changed, 2031 insertions, 343 deletions
diff --git a/Bootloaders/CDC/BootloaderCDC.h b/Bootloaders/CDC/BootloaderCDC.h
index b0d08d880..89f90a6a2 100644
--- a/Bootloaders/CDC/BootloaderCDC.h
+++ b/Bootloaders/CDC/BootloaderCDC.h
@@ -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__)
diff --git a/Bootloaders/CDC/asf.xml b/Bootloaders/CDC/asf.xml
index 6f0fa643c..bddbcffc2 100644
--- a/Bootloaders/CDC/asf.xml
+++ b/Bootloaders/CDC/asf.xml
@@ -9,8 +9,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x1F000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>
@@ -33,8 +33,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0xF000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>
@@ -57,8 +57,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
@@ -81,8 +81,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x3000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>
@@ -105,8 +105,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x1000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/>
diff --git a/Bootloaders/DFU/BootloaderDFU.h b/Bootloaders/DFU/BootloaderDFU.h
index 72bb691d4..3d6d90649 100644
--- a/Bootloaders/DFU/BootloaderDFU.h
+++ b/Bootloaders/DFU/BootloaderDFU.h
@@ -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__)
diff --git a/Bootloaders/DFU/asf.xml b/Bootloaders/DFU/asf.xml
index 746dca72f..0a547c336 100644
--- a/Bootloaders/DFU/asf.xml
+++ b/Bootloaders/DFU/asf.xml
@@ -9,8 +9,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x1F000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>
@@ -33,8 +33,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0xF000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>
@@ -57,8 +57,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
@@ -79,8 +79,8 @@
<device-support value="atmega16u2"/>
<config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x3000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>
@@ -101,8 +101,8 @@
<device-support value="atmega8u2"/>
<config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x1000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/>
diff --git a/Bootloaders/HID/BootloaderHID.h b/Bootloaders/HID/BootloaderHID.h
index df9e39e37..92304dc8d 100644
--- a/Bootloaders/HID/BootloaderHID.h
+++ b/Bootloaders/HID/BootloaderHID.h
@@ -47,6 +47,7 @@
#include "Descriptors.h"
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
/* Preprocessor Checks: */
#if !defined(__OPTIMIZE_SIZE__)
diff --git a/Bootloaders/HID/asf.xml b/Bootloaders/HID/asf.xml
index 793b3e55d..91fb35ebf 100644
--- a/Bootloaders/HID/asf.xml
+++ b/Bootloaders/HID/asf.xml
@@ -9,8 +9,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x1F000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>
@@ -26,8 +26,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0xF000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>
@@ -43,8 +43,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
@@ -60,8 +60,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x3800"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x3800"/>
@@ -77,8 +77,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x1800"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x1800"/>
diff --git a/Bootloaders/MassStorage/BootloaderMassStorage.h b/Bootloaders/MassStorage/BootloaderMassStorage.h
index ec66d940e..1fcce9063 100644
--- a/Bootloaders/MassStorage/BootloaderMassStorage.h
+++ b/Bootloaders/MassStorage/BootloaderMassStorage.h
@@ -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__)
diff --git a/Bootloaders/MassStorage/asf.xml b/Bootloaders/MassStorage/asf.xml
index 07a6f8007..11633dc5a 100644
--- a/Bootloaders/MassStorage/asf.xml
+++ b/Bootloaders/MassStorage/asf.xml
@@ -9,8 +9,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x1E000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x1E000"/>
@@ -35,8 +35,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0xE000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0xE000"/>
@@ -61,8 +61,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
@@ -90,8 +90,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x3000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>
diff --git a/Bootloaders/Printer/BootloaderPrinter.h b/Bootloaders/Printer/BootloaderPrinter.h
index 67789de0c..1e9128858 100644
--- a/Bootloaders/Printer/BootloaderPrinter.h
+++ b/Bootloaders/Printer/BootloaderPrinter.h
@@ -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__)
diff --git a/Bootloaders/Printer/asf.xml b/Bootloaders/Printer/asf.xml
index 5773bf6ea..b7621ac1b 100644
--- a/Bootloaders/Printer/asf.xml
+++ b/Bootloaders/Printer/asf.xml
@@ -9,8 +9,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x1F000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x1F000"/>
@@ -33,8 +33,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0xF000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0xF000"/>
@@ -57,8 +57,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x7000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x7000"/>
@@ -81,8 +81,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x3000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x3000"/>
@@ -105,8 +105,8 @@
<config name="config.compiler.optimization.level" value="size"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
<build type="define" name="BOOT_START_ADDR" value="0x1000"/>
<build type="linker-config" subtype="flags" value="--section-start=.text=0x1000"/>
diff --git a/Demos/Device/ClassDriver/AudioInput/AudioInput.c b/Demos/Device/ClassDriver/AudioInput/AudioInput.c
index c5ba9bca1..9eec39ca2 100644
--- a/Demos/Device/ClassDriver/AudioInput/AudioInput.c
+++ b/Demos/Device/ClassDriver/AudioInput/AudioInput.c
@@ -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;
diff --git a/Demos/Device/ClassDriver/AudioInput/AudioInput.h b/Demos/Device/ClassDriver/AudioInput/AudioInput.h
index 093f3eefa..14bbd2ea0 100644
--- a/Demos/Device/ClassDriver/AudioInput/AudioInput.h
+++ b/Demos/Device/ClassDriver/AudioInput/AudioInput.h
@@ -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,
diff --git a/Demos/Device/ClassDriver/AudioInput/asf.xml b/Demos/Device/ClassDriver/AudioInput/asf.xml
index b61714e9f..2a60a1eb1 100644
--- a/Demos/Device/ClassDriver/AudioInput/asf.xml
+++ b/Demos/Device/ClassDriver/AudioInput/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Audio Input Device Demo (Class Driver APIs)" id="lufa.demos.device.class.audio_input.example">
+ <project caption="Audio Input Device Demo (Class Driver APIs)" id="lufa.demos.device.class.audio_input.example.avr8">
<require idref="lufa.demos.device.class.audio_input"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.audio_input" caption="Audio Input Device Demo (Class Driver APIs)">
diff --git a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
index 22d19a4d5..81fd95b16 100644
--- a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
+++ b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c
@@ -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;
diff --git a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h
index 802bec924..bf2d3c8a7 100644
--- a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h
+++ b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h
@@ -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
diff --git a/Demos/Device/ClassDriver/AudioOutput/asf.xml b/Demos/Device/ClassDriver/AudioOutput/asf.xml
index dacdbd5c6..c7b0768ed 100644
--- a/Demos/Device/ClassDriver/AudioOutput/asf.xml
+++ b/Demos/Device/ClassDriver/AudioOutput/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Audio Output Device Demo (Class Driver APIs)" id="lufa.demos.device.class.audio_output.example">
+ <project caption="Audio Output Device Demo (Class Driver APIs)" id="lufa.demos.device.class.audio_output.example.avr8">
<require idref="lufa.demos.device.class.audio_output"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.audio_output" caption="Audio Output Device Demo (Class Driver APIs)">
@@ -45,6 +45,5 @@
<require idref="lufa.drivers.usb"/>
<require idref="lufa.drivers.board"/>
<require idref="lufa.drivers.board.leds"/>
- <require idref="lufa.drivers.board.buttons"/>
</module>
</asf>
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/Config/LUFAConfig.h b/Demos/Device/ClassDriver/DualVirtualSerial/Config/LUFAConfig.h
index 3b33e2d04..d2f780a0b 100644
--- a/Demos/Device/ClassDriver/DualVirtualSerial/Config/LUFAConfig.h
+++ b/Demos/Device/ClassDriver/DualVirtualSerial/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c
index b7d045505..eaba6185a 100644
--- a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c
+++ b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c
@@ -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();
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.h b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.h
index 0f4ae5892..c0447af8e 100644
--- a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.h
+++ b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.h
@@ -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. */
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.txt b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.txt
index 70e95ad51..1e8d3c531 100644
--- a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.txt
+++ b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.txt
@@ -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:
*
diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/asf.xml b/Demos/Device/ClassDriver/DualVirtualSerial/asf.xml
index 11a23eb21..78ca488ca 100644
--- a/Demos/Device/ClassDriver/DualVirtualSerial/asf.xml
+++ b/Demos/Device/ClassDriver/DualVirtualSerial/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Dual Virtual Serial Device Demo (Class Driver APIs)" id="lufa.demos.device.class.dual_cdc.example">
+ <project caption="Dual Virtual Serial Device Demo (Class Driver APIs)" id="lufa.demos.device.class.dual_cdc.example.avr8">
<require idref="lufa.demos.device.class.dual_cdc"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Dual Virtual Serial Device Demo (Class Driver APIs)" id="lufa.demos.device.class.dual_cdc.example.xmega">
+ <require idref="lufa.demos.device.class.dual_cdc"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.dual_cdc" caption="Dual Virtual Serial Device Demo (Class Driver APIs)">
diff --git a/Demos/Device/ClassDriver/GenericHID/Config/LUFAConfig.h b/Demos/Device/ClassDriver/GenericHID/Config/LUFAConfig.h
index 3244d3bb7..3871759b6 100644
--- a/Demos/Device/ClassDriver/GenericHID/Config/LUFAConfig.h
+++ b/Demos/Device/ClassDriver/GenericHID/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/ClassDriver/GenericHID/GenericHID.c b/Demos/Device/ClassDriver/GenericHID/GenericHID.c
index 95dd44d16..aae3ea75a 100644
--- a/Demos/Device/ClassDriver/GenericHID/GenericHID.c
+++ b/Demos/Device/ClassDriver/GenericHID/GenericHID.c
@@ -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();
diff --git a/Demos/Device/ClassDriver/GenericHID/GenericHID.h b/Demos/Device/ClassDriver/GenericHID/GenericHID.h
index bb0a6cc7e..7b7ac9cb5 100644
--- a/Demos/Device/ClassDriver/GenericHID/GenericHID.h
+++ b/Demos/Device/ClassDriver/GenericHID/GenericHID.h
@@ -45,9 +45,10 @@
#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. */
diff --git a/Demos/Device/ClassDriver/GenericHID/GenericHID.txt b/Demos/Device/ClassDriver/GenericHID/GenericHID.txt
index 3d72345f3..140274039 100644
--- a/Demos/Device/ClassDriver/GenericHID/GenericHID.txt
+++ b/Demos/Device/ClassDriver/GenericHID/GenericHID.txt
@@ -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>
diff --git a/Demos/Device/ClassDriver/GenericHID/asf.xml b/Demos/Device/ClassDriver/GenericHID/asf.xml
index 2b1ee5f8a..f64c7da3d 100644
--- a/Demos/Device/ClassDriver/GenericHID/asf.xml
+++ b/Demos/Device/ClassDriver/GenericHID/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Generic HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.generic_hid.example">
+ <project caption="Generic HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.generic_hid.example.avr8">
<require idref="lufa.demos.device.class.generic_hid"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Generic HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.generic_hid.example.xmega">
+ <require idref="lufa.demos.device.class.generic_hid"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.generic_hid" caption="Generic HID Device Demo (Class Driver APIs)">
diff --git a/Demos/Device/ClassDriver/Joystick/Config/LUFAConfig.h b/Demos/Device/ClassDriver/Joystick/Config/LUFAConfig.h
index 3244d3bb7..3871759b6 100644
--- a/Demos/Device/ClassDriver/Joystick/Config/LUFAConfig.h
+++ b/Demos/Device/ClassDriver/Joystick/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/ClassDriver/Joystick/Joystick.c b/Demos/Device/ClassDriver/Joystick/Joystick.c
index c4576ba00..809c41060 100644
--- a/Demos/Device/ClassDriver/Joystick/Joystick.c
+++ b/Demos/Device/ClassDriver/Joystick/Joystick.c
@@ -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();
diff --git a/Demos/Device/ClassDriver/Joystick/Joystick.h b/Demos/Device/ClassDriver/Joystick/Joystick.h
index 5eafa616d..037e03dff 100644
--- a/Demos/Device/ClassDriver/Joystick/Joystick.h
+++ b/Demos/Device/ClassDriver/Joystick/Joystick.h
@@ -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.
diff --git a/Demos/Device/ClassDriver/Joystick/Joystick.txt b/Demos/Device/ClassDriver/Joystick/Joystick.txt
index 55be2c300..e3aec3d70 100644
--- a/Demos/Device/ClassDriver/Joystick/Joystick.txt
+++ b/Demos/Device/ClassDriver/Joystick/Joystick.txt
@@ -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:
*
diff --git a/Demos/Device/ClassDriver/Joystick/asf.xml b/Demos/Device/ClassDriver/Joystick/asf.xml
index 2cae1e5be..e43b1c607 100644
--- a/Demos/Device/ClassDriver/Joystick/asf.xml
+++ b/Demos/Device/ClassDriver/Joystick/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Joystick HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.joystick.example">
+ <project caption="Joystick HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.joystick.example.avr8">
<require idref="lufa.demos.device.class.joystick"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Joystick HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.joystick.example.xmega">
+ <require idref="lufa.demos.device.class.joystick"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.joystick" caption="Joystick HID Device Demo (Class Driver APIs)">
@@ -43,6 +55,7 @@
<require idref="lufa.drivers.usb"/>
<require idref="lufa.drivers.board"/>
<require idref="lufa.drivers.board.leds"/>
+ <require idref="lufa.drivers.board.buttons"/>
<require idref="lufa.drivers.board.joystick"/>
</module>
</asf>
diff --git a/Demos/Device/ClassDriver/Keyboard/Config/LUFAConfig.h b/Demos/Device/ClassDriver/Keyboard/Config/LUFAConfig.h
index 3244d3bb7..3871759b6 100644
--- a/Demos/Device/ClassDriver/Keyboard/Config/LUFAConfig.h
+++ b/Demos/Device/ClassDriver/Keyboard/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.c b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
index 5c7a6f141..b3cc67e1e 100644
--- a/Demos/Device/ClassDriver/Keyboard/Keyboard.c
+++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.c
@@ -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();
diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.h b/Demos/Device/ClassDriver/Keyboard/Keyboard.h
index 853430a7e..38f50d11d 100644
--- a/Demos/Device/ClassDriver/Keyboard/Keyboard.h
+++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.h
@@ -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. */
diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.txt b/Demos/Device/ClassDriver/Keyboard/Keyboard.txt
index 3e7ff88ed..9b4375b2e 100644
--- a/Demos/Device/ClassDriver/Keyboard/Keyboard.txt
+++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.txt
@@ -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:
*
diff --git a/Demos/Device/ClassDriver/Keyboard/asf.xml b/Demos/Device/ClassDriver/Keyboard/asf.xml
index f2989105b..5defbeec4 100644
--- a/Demos/Device/ClassDriver/Keyboard/asf.xml
+++ b/Demos/Device/ClassDriver/Keyboard/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Keyboard HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard.example">
+ <project caption="Keyboard HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard.example.avr8">
<require idref="lufa.demos.device.class.keyboard"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Keyboard HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard.example.xmega">
+ <require idref="lufa.demos.device.class.keyboard"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.keyboard" caption="Keyboard HID Device Demo (Class Driver APIs)">
diff --git a/Demos/Device/ClassDriver/KeyboardMouse/Config/LUFAConfig.h b/Demos/Device/ClassDriver/KeyboardMouse/Config/LUFAConfig.h
index 3244d3bb7..4873f8031 100644
--- a/Demos/Device/ClassDriver/KeyboardMouse/Config/LUFAConfig.h
+++ b/Demos/Device/ClassDriver/KeyboardMouse/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
index 6b2e9bb40..f663f1683 100644
--- a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
+++ b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c
@@ -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();
diff --git a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h
index 701984901..2f1d01b04 100644
--- a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h
+++ b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h
@@ -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. */
diff --git a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.txt b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.txt
index b994422a8..20c89cc80 100644
--- a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.txt
+++ b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.txt
@@ -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:
*
diff --git a/Demos/Device/ClassDriver/KeyboardMouse/asf.xml b/Demos/Device/ClassDriver/KeyboardMouse/asf.xml
index a530eed6d..9e3bd4956 100644
--- a/Demos/Device/ClassDriver/KeyboardMouse/asf.xml
+++ b/Demos/Device/ClassDriver/KeyboardMouse/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Keyboard and Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard_mouse.example">
+ <project caption="Keyboard and Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard_mouse.example.avr8">
<require idref="lufa.demos.device.class.keyboard_mouse"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Keyboard and Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard_mouse.example.xmega">
+ <require idref="lufa.demos.device.class.keyboard_mouse"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.keyboard_mouse" caption="Keyboard and Mouse HID Device Demo (Class Driver APIs)">
diff --git a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Config/LUFAConfig.h b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Config/LUFAConfig.h
index 3244d3bb7..3871759b6 100644
--- a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Config/LUFAConfig.h
+++ b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
index b37104197..f15d134ff 100644
--- a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
+++ b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.c
@@ -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();
diff --git a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.h b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.h
index 701984901..2f1d01b04 100644
--- a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.h
+++ b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.h
@@ -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. */
diff --git a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.txt b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.txt
index e99a7dc74..6ff910e16 100644
--- a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.txt
+++ b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/KeyboardMouseMultiReport.txt
@@ -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:
*
diff --git a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/asf.xml b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/asf.xml
index 7c6d76dfd..65858aa26 100644
--- a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/asf.xml
+++ b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Keyboard and Mouse HID (Multi Report) Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard_mouse_mr.example">
+ <project caption="Keyboard and Mouse HID (Multi Report) Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard_mouse_mr.example.avr8">
<require idref="lufa.demos.device.class.keyboard_mouse_mr"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Keyboard and Mouse HID (Multi Report) Device Demo (Class Driver APIs)" id="lufa.demos.device.class.keyboard_mouse_mr.example.xmega">
+ <require idref="lufa.demos.device.class.keyboard_mouse_mr"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.keyboard_mouse_mr" caption="Keyboard and Mouse HID (Multi Report) Device Demo (Class Driver APIs)">
diff --git a/Demos/Device/ClassDriver/MIDI/Config/LUFAConfig.h b/Demos/Device/ClassDriver/MIDI/Config/LUFAConfig.h
index 3244d3bb7..a4ca3437f 100644
--- a/Demos/Device/ClassDriver/MIDI/Config/LUFAConfig.h
+++ b/Demos/Device/ClassDriver/MIDI/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/ClassDriver/MIDI/MIDI.c b/Demos/Device/ClassDriver/MIDI/MIDI.c
index 139c65e34..bec442883 100644
--- a/Demos/Device/ClassDriver/MIDI/MIDI.c
+++ b/Demos/Device/ClassDriver/MIDI/MIDI.c
@@ -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();
diff --git a/Demos/Device/ClassDriver/MIDI/MIDI.h b/Demos/Device/ClassDriver/MIDI/MIDI.h
index 54dbef2ab..ca4fa3b8a 100644
--- a/Demos/Device/ClassDriver/MIDI/MIDI.h
+++ b/Demos/Device/ClassDriver/MIDI/MIDI.h
@@ -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. */
diff --git a/Demos/Device/ClassDriver/MIDI/MIDI.txt b/Demos/Device/ClassDriver/MIDI/MIDI.txt
index 362250c41..9ac3d9ea8 100644
--- a/Demos/Device/ClassDriver/MIDI/MIDI.txt
+++ b/Demos/Device/ClassDriver/MIDI/MIDI.txt
@@ -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:
*
diff --git a/Demos/Device/ClassDriver/MIDI/asf.xml b/Demos/Device/ClassDriver/MIDI/asf.xml
index 6212b482a..8a7479d00 100644
--- a/Demos/Device/ClassDriver/MIDI/asf.xml
+++ b/Demos/Device/ClassDriver/MIDI/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="MIDI Device Demo (Class Driver APIs)" id="lufa.demos.device.class.midi.example">
+ <project caption="MIDI Device Demo (Class Driver APIs)" id="lufa.demos.device.class.midi.example.avr8">
<require idref="lufa.demos.device.class.midi"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="MIDI Device Demo (Class Driver APIs)" id="lufa.demos.device.class.midi.example.xmega">
+ <require idref="lufa.demos.device.class.midi"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.midi" caption="MIDI Device Demo (Class Driver APIs)">
diff --git a/Demos/Device/ClassDriver/MassStorage/Config/LUFAConfig.h b/Demos/Device/ClassDriver/MassStorage/Config/LUFAConfig.h
index 3b33e2d04..da728ec29 100644
--- a/Demos/Device/ClassDriver/MassStorage/Config/LUFAConfig.h
+++ b/Demos/Device/ClassDriver/MassStorage/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/ClassDriver/MassStorage/MassStorage.c b/Demos/Device/ClassDriver/MassStorage/MassStorage.c
index 598698a19..a0fa7a2a9 100644
--- a/Demos/Device/ClassDriver/MassStorage/MassStorage.c
+++ b/Demos/Device/ClassDriver/MassStorage/MassStorage.c
@@ -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();
diff --git a/Demos/Device/ClassDriver/MassStorage/MassStorage.h b/Demos/Device/ClassDriver/MassStorage/MassStorage.h
index cfeea8032..55e179666 100644
--- a/Demos/Device/ClassDriver/MassStorage/MassStorage.h
+++ b/Demos/Device/ClassDriver/MassStorage/MassStorage.h
@@ -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. */
diff --git a/Demos/Device/ClassDriver/MassStorage/MassStorage.txt b/Demos/Device/ClassDriver/MassStorage/MassStorage.txt
index 5bf7c5570..dd71e3bcd 100644
--- a/Demos/Device/ClassDriver/MassStorage/MassStorage.txt
+++ b/Demos/Device/ClassDriver/MassStorage/MassStorage.txt
@@ -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:
*
diff --git a/Demos/Device/ClassDriver/MassStorage/asf.xml b/Demos/Device/ClassDriver/MassStorage/asf.xml
index 4d10f3cd7..26152739c 100644
--- a/Demos/Device/ClassDriver/MassStorage/asf.xml
+++ b/Demos/Device/ClassDriver/MassStorage/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Mass Storage Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mass_storage.example">
+ <project caption="Mass Storage Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mass_storage.example.avr8">
<require idref="lufa.demos.device.class.mass_storage"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Mass Storage Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mass_storage.example.xmega">
+ <require idref="lufa.demos.device.class.mass_storage"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.mass_storage" caption="Mass Storage Device Demo (Class Driver APIs)">
diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/Config/LUFAConfig.h b/Demos/Device/ClassDriver/MassStorageKeyboard/Config/LUFAConfig.h
index 3b33e2d04..9d358ed62 100644
--- a/Demos/Device/ClassDriver/MassStorageKeyboard/Config/LUFAConfig.h
+++ b/Demos/Device/ClassDriver/MassStorageKeyboard/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
index 00761785c..05fdfbe0c 100644
--- a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
+++ b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c
@@ -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();
diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h
index 2e213c942..05b5a8457 100644
--- a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h
+++ b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h
@@ -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. */
diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.txt b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.txt
index 7cdb47279..d9affad83 100644
--- a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.txt
+++ b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.txt
@@ -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:
*
diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/asf.xml b/Demos/Device/ClassDriver/MassStorageKeyboard/asf.xml
index 3b53aec2f..cd0a10114 100644
--- a/Demos/Device/ClassDriver/MassStorageKeyboard/asf.xml
+++ b/Demos/Device/ClassDriver/MassStorageKeyboard/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Mass Storage and HID Keyboard Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mass_storage_keyboard.example">
+ <project caption="Mass Storage and HID Keyboard Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mass_storage_keyboard.example.avr8">
<require idref="lufa.demos.device.class.mass_storage_keyboard"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Mass Storage and HID Keyboard Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mass_storage_keyboard.example.xmega">
+ <require idref="lufa.demos.device.class.mass_storage_keyboard"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.mass_storage_keyboard" caption="Mass Storage and HID Keyboard Device Demo (Class Driver APIs)">
diff --git a/Demos/Device/ClassDriver/Mouse/Config/LUFAConfig.h b/Demos/Device/ClassDriver/Mouse/Config/LUFAConfig.h
index 3244d3bb7..3871759b6 100644
--- a/Demos/Device/ClassDriver/Mouse/Config/LUFAConfig.h
+++ b/Demos/Device/ClassDriver/Mouse/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/ClassDriver/Mouse/Mouse.c b/Demos/Device/ClassDriver/Mouse/Mouse.c
index c9caa1cff..8432b65a9 100644
--- a/Demos/Device/ClassDriver/Mouse/Mouse.c
+++ b/Demos/Device/ClassDriver/Mouse/Mouse.c
@@ -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();
diff --git a/Demos/Device/ClassDriver/Mouse/Mouse.h b/Demos/Device/ClassDriver/Mouse/Mouse.h
index 371ef6c3c..e63c9351c 100644
--- a/Demos/Device/ClassDriver/Mouse/Mouse.h
+++ b/Demos/Device/ClassDriver/Mouse/Mouse.h
@@ -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. */
diff --git a/Demos/Device/ClassDriver/Mouse/Mouse.txt b/Demos/Device/ClassDriver/Mouse/Mouse.txt
index d1277a2d6..e4673aeaa 100644
--- a/Demos/Device/ClassDriver/Mouse/Mouse.txt
+++ b/Demos/Device/ClassDriver/Mouse/Mouse.txt
@@ -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:
*
diff --git a/Demos/Device/ClassDriver/Mouse/asf.xml b/Demos/Device/ClassDriver/Mouse/asf.xml
index f501963c4..7ad6b9479 100644
--- a/Demos/Device/ClassDriver/Mouse/asf.xml
+++ b/Demos/Device/ClassDriver/Mouse/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mouse.example">
+ <project caption="Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mouse.example.avr8">
<require idref="lufa.demos.device.class.mouse"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.mouse.example.xmega">
+ <require idref="lufa.demos.device.class.mouse"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.mouse" caption="Mouse HID Device Demo (Class Driver APIs)">
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Config/LUFAConfig.h b/Demos/Device/ClassDriver/RNDISEthernet/Config/LUFAConfig.h
index 3244d3bb7..4873f8031 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Config/LUFAConfig.h
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
index ef643a82e..54d551142 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c
@@ -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();
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h
index 57fdc4ec7..839a53bdd 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h
+++ b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h
@@ -50,10 +50,11 @@
#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. */
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.txt b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.txt
index ac72d4ae7..aafa3cc43 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.txt
+++ b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.txt
@@ -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:
*
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/asf.xml b/Demos/Device/ClassDriver/RNDISEthernet/asf.xml
index 9aef2735e..3084f41fc 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/asf.xml
+++ b/Demos/Device/ClassDriver/RNDISEthernet/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="RNDIS Ethernet Device Demo (Class Driver APIs)" id="lufa.demos.device.class.rndis.example">
+ <project caption="RNDIS Ethernet Device Demo (Class Driver APIs)" id="lufa.demos.device.class.rndis.example.avr8">
<require idref="lufa.demos.device.class.rndis"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="RNDIS Ethernet Device Demo (Class Driver APIs)" id="lufa.demos.device.class.rndis.example.xmega">
+ <require idref="lufa.demos.device.class.rndis"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.rndis" caption="RNDIS Ethernet Device Demo (Class Driver APIs)">
diff --git a/Demos/Device/ClassDriver/VirtualSerial/Config/LUFAConfig.h b/Demos/Device/ClassDriver/VirtualSerial/Config/LUFAConfig.h
index 3b33e2d04..da728ec29 100644
--- a/Demos/Device/ClassDriver/VirtualSerial/Config/LUFAConfig.h
+++ b/Demos/Device/ClassDriver/VirtualSerial/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c
index 07bb84295..0079acbfa 100644
--- a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c
+++ b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c
@@ -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();
diff --git a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.h b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.h
index 335399642..2e10366fd 100644
--- a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.h
+++ b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.h
@@ -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. */
diff --git a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.txt b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.txt
index e0a3291b4..61b665674 100644
--- a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.txt
+++ b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.txt
@@ -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:
*
diff --git a/Demos/Device/ClassDriver/VirtualSerial/asf.xml b/Demos/Device/ClassDriver/VirtualSerial/asf.xml
index c71946806..64ce25fd2 100644
--- a/Demos/Device/ClassDriver/VirtualSerial/asf.xml
+++ b/Demos/Device/ClassDriver/VirtualSerial/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Virtual Serial CDC Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc.example">
+ <project caption="Virtual Serial CDC Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc.example.avr8">
<require idref="lufa.demos.device.class.cdc"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Virtual Serial CDC Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc.example.xmega">
+ <require idref="lufa.demos.device.class.cdc"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.cdc" caption="Virtual Serial CDC Device Demo (Class Driver APIs)">
diff --git a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Config/LUFAConfig.h b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Config/LUFAConfig.h
index 3b33e2d04..9d358ed62 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMassStorage/Config/LUFAConfig.h
+++ b/Demos/Device/ClassDriver/VirtualSerialMassStorage/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c b/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
index cc146a9b7..f1dc04992 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
+++ b/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.c
@@ -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();
diff --git a/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.h b/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.h
index 413164df2..c191f098f 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.h
+++ b/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.h
@@ -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. */
diff --git a/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.txt b/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.txt
index 042244119..62a7c3da6 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.txt
+++ b/Demos/Device/ClassDriver/VirtualSerialMassStorage/VirtualSerialMassStorage.txt
@@ -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:
*
diff --git a/Demos/Device/ClassDriver/VirtualSerialMassStorage/asf.xml b/Demos/Device/ClassDriver/VirtualSerialMassStorage/asf.xml
index beae95627..6a21768fb 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMassStorage/asf.xml
+++ b/Demos/Device/ClassDriver/VirtualSerialMassStorage/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Virtual Serial CDC and Mass Storage Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc_ms.example">
+ <project caption="Virtual Serial CDC and Mass Storage Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc_ms.example.avr8">
<require idref="lufa.demos.device.class.cdc_ms"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Virtual Serial CDC and Mass Storage Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc_ms.example.xmega">
+ <require idref="lufa.demos.device.class.cdc_ms"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.cdc_ms" caption="Virtual Serial CDC and Mass Storage Device Demo (Class Driver APIs)">
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/Config/LUFAConfig.h b/Demos/Device/ClassDriver/VirtualSerialMouse/Config/LUFAConfig.h
index 3b33e2d04..da728ec29 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMouse/Config/LUFAConfig.h
+++ b/Demos/Device/ClassDriver/VirtualSerialMouse/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
index 54b8534d9..73f9e3875 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
+++ b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c
@@ -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();
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.h b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.h
index b4db43342..0e9a72192 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.h
+++ b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.h
@@ -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. */
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.txt b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.txt
index fe6328b73..96b317855 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.txt
+++ b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.txt
@@ -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:
*
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/asf.xml b/Demos/Device/ClassDriver/VirtualSerialMouse/asf.xml
index 61bb17fab..e555710c5 100644
--- a/Demos/Device/ClassDriver/VirtualSerialMouse/asf.xml
+++ b/Demos/Device/ClassDriver/VirtualSerialMouse/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Virtual Serial CDC and Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc_mouse.example">
+ <project caption="Virtual Serial CDC and Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc_mouse.example.avr8">
<require idref="lufa.demos.device.class.cdc_mouse"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Virtual Serial CDC and Mouse HID Device Demo (Class Driver APIs)" id="lufa.demos.device.class.cdc_mouse.example.xmega">
+ <require idref="lufa.demos.device.class.cdc_mouse"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.class.cdc_mouse" caption="Virtual Serial CDC and Mouse HID Device Demo (Class Driver APIs)">
diff --git a/Demos/Device/Incomplete/TestAndMeasurement/Config/LUFAConfig.h b/Demos/Device/Incomplete/TestAndMeasurement/Config/LUFAConfig.h
index 3b33e2d04..da728ec29 100644
--- a/Demos/Device/Incomplete/TestAndMeasurement/Config/LUFAConfig.h
+++ b/Demos/Device/Incomplete/TestAndMeasurement/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c b/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
index bd972e27f..4bd702701 100644
--- a/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
+++ b/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.c
@@ -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();
diff --git a/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.h b/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.h
index ed0203343..0c86cc882 100644
--- a/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.h
+++ b/Demos/Device/Incomplete/TestAndMeasurement/TestAndMeasurement.h
@@ -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
@@ -66,14 +67,14 @@
#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;
@@ -94,17 +95,17 @@
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;
@@ -125,7 +126,7 @@
uint8_t InverseTag;
uint8_t Reserved;
uint32_t TransferSize;
-
+
union
{
TMC_DevOUTMessageHeader_t DeviceOUT;
diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.c b/Demos/Device/LowLevel/AudioInput/AudioInput.c
index 1544f0964..6c7bd1df4 100644
--- a/Demos/Device/LowLevel/AudioInput/AudioInput.c
+++ b/Demos/Device/LowLevel/AudioInput/AudioInput.c
@@ -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();
diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.h b/Demos/Device/LowLevel/AudioInput/AudioInput.h
index b7727a81b..6701f8ee5 100644
--- a/Demos/Device/LowLevel/AudioInput/AudioInput.h
+++ b/Demos/Device/LowLevel/AudioInput/AudioInput.h
@@ -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. */
diff --git a/Demos/Device/LowLevel/AudioInput/asf.xml b/Demos/Device/LowLevel/AudioInput/asf.xml
index 767b3fd4a..3fdfb657a 100644
--- a/Demos/Device/LowLevel/AudioInput/asf.xml
+++ b/Demos/Device/LowLevel/AudioInput/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Audio Input Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.audio_input.example">
+ <project caption="Audio Input Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.audio_input.example.avr8">
<require idref="lufa.demos.device.lowlevel.audio_input"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.device.lowlevel.audio_input" caption="Audio Input Device Demo (Low Level APIs)">
diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c
index e77b041bd..d47381d54 100644
--- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c
+++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c
@@ -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();
diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.h b/Demos/Device/LowLevel/AudioOutput/AudioOutput.h
index 209409035..45f0d4ab6 100644
--- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.h
+++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.h
@@ -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. */
diff --git a/Demos/Device/LowLevel/AudioOutput/asf.xml b/Demos/Device/LowLevel/AudioOutput/asf.xml
index 458a8b974..19c15c3cb 100644
--- a/Demos/Device/LowLevel/AudioOutput/asf.xml
+++ b/Demos/Device/LowLevel/AudioOutput/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Audio Output Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.audio_output.example">
+ <project caption="Audio Output Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.audio_output.example.avr8">
<require idref="lufa.demos.device.lowlevel.audio_output"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.device.lowlevel.audio_output" caption="Audio Output Device Demo (Low Level APIs)">
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/Config/LUFAConfig.h b/Demos/Device/LowLevel/DualVirtualSerial/Config/LUFAConfig.h
index 3b33e2d04..d2f780a0b 100644
--- a/Demos/Device/LowLevel/DualVirtualSerial/Config/LUFAConfig.h
+++ b/Demos/Device/LowLevel/DualVirtualSerial/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h b/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h
index 154ed0c09..a5a87dc3d 100644
--- a/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h
+++ b/Demos/Device/LowLevel/DualVirtualSerial/Descriptors.h
@@ -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
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c
index a803b4142..45790b1e3 100644
--- a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c
+++ b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c
@@ -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();
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h
index 6e7c73d79..63f1f0809 100644
--- a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h
+++ b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h
@@ -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. */
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.txt b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.txt
index 0897bf90b..af263cc75 100644
--- a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.txt
+++ b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.txt
@@ -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:
*
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/asf.xml b/Demos/Device/LowLevel/DualVirtualSerial/asf.xml
index d3045683b..4628f4b61 100644
--- a/Demos/Device/LowLevel/DualVirtualSerial/asf.xml
+++ b/Demos/Device/LowLevel/DualVirtualSerial/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Dual Virtual Serial Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.dual_cdc.example">
+ <project caption="Dual Virtual Serial Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.dual_cdc.example.avr8">
<require idref="lufa.demos.device.lowlevel.dual_cdc"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Dual Virtual Serial Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.dual_cdc.example.xmega">
+ <require idref="lufa.demos.device.lowlevel.dual_cdc"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.lowlevel.dual_cdc" caption="Dual Virtual Serial Device Demo (Low Level APIs)">
diff --git a/Demos/Device/LowLevel/GenericHID/Config/LUFAConfig.h b/Demos/Device/LowLevel/GenericHID/Config/LUFAConfig.h
index 3244d3bb7..a4ca3437f 100644
--- a/Demos/Device/LowLevel/GenericHID/Config/LUFAConfig.h
+++ b/Demos/Device/LowLevel/GenericHID/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/LowLevel/GenericHID/GenericHID.c b/Demos/Device/LowLevel/GenericHID/GenericHID.c
index 10b344f7d..2c5519603 100644
--- a/Demos/Device/LowLevel/GenericHID/GenericHID.c
+++ b/Demos/Device/LowLevel/GenericHID/GenericHID.c
@@ -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();
diff --git a/Demos/Device/LowLevel/GenericHID/GenericHID.h b/Demos/Device/LowLevel/GenericHID/GenericHID.h
index 806eda0df..3a3c86cd6 100644
--- a/Demos/Device/LowLevel/GenericHID/GenericHID.h
+++ b/Demos/Device/LowLevel/GenericHID/GenericHID.h
@@ -46,9 +46,10 @@
#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. */
diff --git a/Demos/Device/LowLevel/GenericHID/GenericHID.txt b/Demos/Device/LowLevel/GenericHID/GenericHID.txt
index 3d72345f3..140274039 100644
--- a/Demos/Device/LowLevel/GenericHID/GenericHID.txt
+++ b/Demos/Device/LowLevel/GenericHID/GenericHID.txt
@@ -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>
diff --git a/Demos/Device/LowLevel/GenericHID/asf.xml b/Demos/Device/LowLevel/GenericHID/asf.xml
index 27e09ca17..44fa5cf29 100644
--- a/Demos/Device/LowLevel/GenericHID/asf.xml
+++ b/Demos/Device/LowLevel/GenericHID/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Generic HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.generic_hid.example">
+ <project caption="Generic HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.generic_hid.example.avr8">
<require idref="lufa.demos.device.lowlevel.generic_hid"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Generic HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.generic_hid.example.xmega">
+ <require idref="lufa.demos.device.lowlevel.generic_hid"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.lowlevel.generic_hid" caption="Generic HID Device Demo (Low Level APIs)">
diff --git a/Demos/Device/LowLevel/Joystick/Config/LUFAConfig.h b/Demos/Device/LowLevel/Joystick/Config/LUFAConfig.h
index 3244d3bb7..3871759b6 100644
--- a/Demos/Device/LowLevel/Joystick/Config/LUFAConfig.h
+++ b/Demos/Device/LowLevel/Joystick/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/LowLevel/Joystick/Joystick.c b/Demos/Device/LowLevel/Joystick/Joystick.c
index 4e5af8d2c..2af5e285d 100644
--- a/Demos/Device/LowLevel/Joystick/Joystick.c
+++ b/Demos/Device/LowLevel/Joystick/Joystick.c
@@ -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();
diff --git a/Demos/Device/LowLevel/Joystick/Joystick.h b/Demos/Device/LowLevel/Joystick/Joystick.h
index 02a85f564..0cc17a59d 100644
--- a/Demos/Device/LowLevel/Joystick/Joystick.h
+++ b/Demos/Device/LowLevel/Joystick/Joystick.h
@@ -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. */
diff --git a/Demos/Device/LowLevel/Joystick/Joystick.txt b/Demos/Device/LowLevel/Joystick/Joystick.txt
index 55be2c300..e3aec3d70 100644
--- a/Demos/Device/LowLevel/Joystick/Joystick.txt
+++ b/Demos/Device/LowLevel/Joystick/Joystick.txt
@@ -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:
*
diff --git a/Demos/Device/LowLevel/Joystick/asf.xml b/Demos/Device/LowLevel/Joystick/asf.xml
index 05cc1576b..e7df49927 100644
--- a/Demos/Device/LowLevel/Joystick/asf.xml
+++ b/Demos/Device/LowLevel/Joystick/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Joystick HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.joystick.example">
+ <project caption="Joystick HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.joystick.example.avr8">
<require idref="lufa.demos.device.lowlevel.joystick"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Joystick HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.joystick.example.xmega">
+ <require idref="lufa.demos.device.lowlevel.joystick"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.lowlevel.joystick" caption="Joystick HID Device Demo (Low Level APIs)">
@@ -43,6 +55,7 @@
<require idref="lufa.drivers.usb"/>
<require idref="lufa.drivers.board"/>
<require idref="lufa.drivers.board.leds"/>
+ <require idref="lufa.drivers.board.buttons"/>
<require idref="lufa.drivers.board.joystick"/>
</module>
</asf>
diff --git a/Demos/Device/LowLevel/Keyboard/Config/LUFAConfig.h b/Demos/Device/LowLevel/Keyboard/Config/LUFAConfig.h
index 3244d3bb7..a4ca3437f 100644
--- a/Demos/Device/LowLevel/Keyboard/Config/LUFAConfig.h
+++ b/Demos/Device/LowLevel/Keyboard/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/LowLevel/Keyboard/Keyboard.c b/Demos/Device/LowLevel/Keyboard/Keyboard.c
index 5ffe72f21..18fde65dd 100644
--- a/Demos/Device/LowLevel/Keyboard/Keyboard.c
+++ b/Demos/Device/LowLevel/Keyboard/Keyboard.c
@@ -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 */
diff --git a/Demos/Device/LowLevel/Keyboard/Keyboard.h b/Demos/Device/LowLevel/Keyboard/Keyboard.h
index 4b25e34bc..a2fcf5aa6 100644
--- a/Demos/Device/LowLevel/Keyboard/Keyboard.h
+++ b/Demos/Device/LowLevel/Keyboard/Keyboard.h
@@ -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. */
diff --git a/Demos/Device/LowLevel/Keyboard/Keyboard.txt b/Demos/Device/LowLevel/Keyboard/Keyboard.txt
index f7e282961..a1582a8f9 100644
--- a/Demos/Device/LowLevel/Keyboard/Keyboard.txt
+++ b/Demos/Device/LowLevel/Keyboard/Keyboard.txt
@@ -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:
*
diff --git a/Demos/Device/LowLevel/Keyboard/asf.xml b/Demos/Device/LowLevel/Keyboard/asf.xml
index bae98489e..d242754fe 100644
--- a/Demos/Device/LowLevel/Keyboard/asf.xml
+++ b/Demos/Device/LowLevel/Keyboard/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Keyboard HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.keyboard.example">
+ <project caption="Keyboard HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.keyboard.example.avr8">
<require idref="lufa.demos.device.lowlevel.keyboard"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Keyboard HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.keyboard.example.xmega">
+ <require idref="lufa.demos.device.lowlevel.keyboard"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.lowlevel.keyboard" caption="Keyboard HID Device Demo (Low Level APIs)">
diff --git a/Demos/Device/LowLevel/KeyboardMouse/Config/LUFAConfig.h b/Demos/Device/LowLevel/KeyboardMouse/Config/LUFAConfig.h
index 3244d3bb7..4873f8031 100644
--- a/Demos/Device/LowLevel/KeyboardMouse/Config/LUFAConfig.h
+++ b/Demos/Device/LowLevel/KeyboardMouse/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c
index 3eba6c383..c924bacb7 100644
--- a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c
+++ b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c
@@ -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();
diff --git a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h
index ac42b346e..d74482fba 100644
--- a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h
+++ b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h
@@ -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. */
diff --git a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.txt b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.txt
index b994422a8..20c89cc80 100644
--- a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.txt
+++ b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.txt
@@ -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:
*
diff --git a/Demos/Device/LowLevel/KeyboardMouse/asf.xml b/Demos/Device/LowLevel/KeyboardMouse/asf.xml
index 247eeea7f..d3eca33a4 100644
--- a/Demos/Device/LowLevel/KeyboardMouse/asf.xml
+++ b/Demos/Device/LowLevel/KeyboardMouse/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Keyboard and Mouse HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.keyboard_mouse.example">
+ <project caption="Keyboard and Mouse HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.keyboard_mouse.example.avr8">
<require idref="lufa.demos.device.lowlevel.keyboard_mouse"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Keyboard and Mouse HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.keyboard_mouse.example.xmega">
+ <require idref="lufa.demos.device.lowlevel.keyboard_mouse"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.lowlevel.keyboard_mouse" caption="Keyboard and Mouse HID Device Demo (Low Level APIs)">
diff --git a/Demos/Device/LowLevel/MIDI/Config/LUFAConfig.h b/Demos/Device/LowLevel/MIDI/Config/LUFAConfig.h
index 3244d3bb7..a4ca3437f 100644
--- a/Demos/Device/LowLevel/MIDI/Config/LUFAConfig.h
+++ b/Demos/Device/LowLevel/MIDI/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/LowLevel/MIDI/MIDI.c b/Demos/Device/LowLevel/MIDI/MIDI.c
index deb05614f..15e08392b 100644
--- a/Demos/Device/LowLevel/MIDI/MIDI.c
+++ b/Demos/Device/LowLevel/MIDI/MIDI.c
@@ -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();
diff --git a/Demos/Device/LowLevel/MIDI/MIDI.h b/Demos/Device/LowLevel/MIDI/MIDI.h
index b97678a2f..fd07f62f7 100644
--- a/Demos/Device/LowLevel/MIDI/MIDI.h
+++ b/Demos/Device/LowLevel/MIDI/MIDI.h
@@ -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. */
diff --git a/Demos/Device/LowLevel/MIDI/MIDI.txt b/Demos/Device/LowLevel/MIDI/MIDI.txt
index 362250c41..9ac3d9ea8 100644
--- a/Demos/Device/LowLevel/MIDI/MIDI.txt
+++ b/Demos/Device/LowLevel/MIDI/MIDI.txt
@@ -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:
*
diff --git a/Demos/Device/LowLevel/MIDI/asf.xml b/Demos/Device/LowLevel/MIDI/asf.xml
index 652d51acd..de8a016a9 100644
--- a/Demos/Device/LowLevel/MIDI/asf.xml
+++ b/Demos/Device/LowLevel/MIDI/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="MIDI Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.midi.example">
+ <project caption="MIDI Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.midi.example.avr8">
<require idref="lufa.demos.device.lowlevel.midi"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="MIDI Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.midi.example.xmega">
+ <require idref="lufa.demos.device.lowlevel.midi"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.lowlevel.midi" caption="MIDI Device Demo (Low Level APIs)">
diff --git a/Demos/Device/LowLevel/MassStorage/Config/LUFAConfig.h b/Demos/Device/LowLevel/MassStorage/Config/LUFAConfig.h
index 3b33e2d04..da728ec29 100644
--- a/Demos/Device/LowLevel/MassStorage/Config/LUFAConfig.h
+++ b/Demos/Device/LowLevel/MassStorage/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.c b/Demos/Device/LowLevel/MassStorage/MassStorage.c
index 7e8bcc4e5..cfb1686fd 100644
--- a/Demos/Device/LowLevel/MassStorage/MassStorage.c
+++ b/Demos/Device/LowLevel/MassStorage/MassStorage.c
@@ -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();
diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.h b/Demos/Device/LowLevel/MassStorage/MassStorage.h
index edb3b855e..634ed09c7 100644
--- a/Demos/Device/LowLevel/MassStorage/MassStorage.h
+++ b/Demos/Device/LowLevel/MassStorage/MassStorage.h
@@ -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. */
diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.txt b/Demos/Device/LowLevel/MassStorage/MassStorage.txt
index b5f9f9cef..528dbe753 100644
--- a/Demos/Device/LowLevel/MassStorage/MassStorage.txt
+++ b/Demos/Device/LowLevel/MassStorage/MassStorage.txt
@@ -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:
*
diff --git a/Demos/Device/LowLevel/MassStorage/asf.xml b/Demos/Device/LowLevel/MassStorage/asf.xml
index a859733f5..46f25cca5 100644
--- a/Demos/Device/LowLevel/MassStorage/asf.xml
+++ b/Demos/Device/LowLevel/MassStorage/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Mass Storage Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.mass_storage.example">
+ <project caption="Mass Storage Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.mass_storage.example.avr8">
<require idref="lufa.demos.device.lowlevel.mass_storage"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Mass Storage Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.mass_storage.example.xmega">
+ <require idref="lufa.demos.device.lowlevel.mass_storage"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.lowlevel.mass_storage" caption="Mass Storage Device Demo (Low Level APIs)">
diff --git a/Demos/Device/LowLevel/Mouse/Config/LUFAConfig.h b/Demos/Device/LowLevel/Mouse/Config/LUFAConfig.h
index 3244d3bb7..3871759b6 100644
--- a/Demos/Device/LowLevel/Mouse/Config/LUFAConfig.h
+++ b/Demos/Device/LowLevel/Mouse/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/LowLevel/Mouse/Mouse.c b/Demos/Device/LowLevel/Mouse/Mouse.c
index 7575a81f5..601eebec5 100644
--- a/Demos/Device/LowLevel/Mouse/Mouse.c
+++ b/Demos/Device/LowLevel/Mouse/Mouse.c
@@ -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();
diff --git a/Demos/Device/LowLevel/Mouse/Mouse.h b/Demos/Device/LowLevel/Mouse/Mouse.h
index e11b1fac8..23cf1335c 100644
--- a/Demos/Device/LowLevel/Mouse/Mouse.h
+++ b/Demos/Device/LowLevel/Mouse/Mouse.h
@@ -45,11 +45,12 @@
#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. */
diff --git a/Demos/Device/LowLevel/Mouse/Mouse.txt b/Demos/Device/LowLevel/Mouse/Mouse.txt
index 0664cba63..7f1c38430 100644
--- a/Demos/Device/LowLevel/Mouse/Mouse.txt
+++ b/Demos/Device/LowLevel/Mouse/Mouse.txt
@@ -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:
*
diff --git a/Demos/Device/LowLevel/Mouse/asf.xml b/Demos/Device/LowLevel/Mouse/asf.xml
index ed0c537c8..0f471ff08 100644
--- a/Demos/Device/LowLevel/Mouse/asf.xml
+++ b/Demos/Device/LowLevel/Mouse/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Mouse HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.mouse.example">
+ <project caption="Mouse HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.mouse.example.avr8">
<require idref="lufa.demos.device.lowlevel.mouse"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Mouse HID Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.mouse.example.xmega">
+ <require idref="lufa.demos.device.lowlevel.mouse"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.lowlevel.mouse" caption="Mouse HID Device Demo (Low Level APIs)">
diff --git a/Demos/Device/LowLevel/RNDISEthernet/Config/LUFAConfig.h b/Demos/Device/LowLevel/RNDISEthernet/Config/LUFAConfig.h
index 3244d3bb7..4873f8031 100644
--- a/Demos/Device/LowLevel/RNDISEthernet/Config/LUFAConfig.h
+++ b/Demos/Device/LowLevel/RNDISEthernet/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c
index 52085f89c..2837a1088 100644
--- a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c
+++ b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c
@@ -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();
diff --git a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h
index ec53e7bca..37affda8d 100644
--- a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h
+++ b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h
@@ -51,10 +51,11 @@
#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. */
diff --git a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.txt b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.txt
index ac72d4ae7..aafa3cc43 100644
--- a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.txt
+++ b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.txt
@@ -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:
*
diff --git a/Demos/Device/LowLevel/RNDISEthernet/asf.xml b/Demos/Device/LowLevel/RNDISEthernet/asf.xml
index 59c373a0e..12fc761f8 100644
--- a/Demos/Device/LowLevel/RNDISEthernet/asf.xml
+++ b/Demos/Device/LowLevel/RNDISEthernet/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="RNDIS Ethernet Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.rndis.example">
+ <project caption="RNDIS Ethernet Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.rndis.example.avr8">
<require idref="lufa.demos.device.lowlevel.rndis"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="RNDIS Ethernet Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.rndis.example.xmega">
+ <require idref="lufa.demos.device.lowlevel.rndis"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.lowlevel.rndis" caption="RNDIS Ethernet Device Demo (Low Level APIs)">
diff --git a/Demos/Device/LowLevel/VirtualSerial/Config/LUFAConfig.h b/Demos/Device/LowLevel/VirtualSerial/Config/LUFAConfig.h
index 3244d3bb7..7b4e026a1 100644
--- a/Demos/Device/LowLevel/VirtualSerial/Config/LUFAConfig.h
+++ b/Demos/Device/LowLevel/VirtualSerial/Config/LUFAConfig.h
@@ -85,6 +85,39 @@
// #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.
diff --git a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c
index 998aede8a..3c005f7d3 100644
--- a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c
+++ b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c
@@ -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();
diff --git a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h
index 5b985ced5..db5fe9d04 100644
--- a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h
+++ b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h
@@ -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. */
diff --git a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.txt b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.txt
index e0a3291b4..61b665674 100644
--- a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.txt
+++ b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.txt
@@ -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:
*
diff --git a/Demos/Device/LowLevel/VirtualSerial/asf.xml b/Demos/Device/LowLevel/VirtualSerial/asf.xml
index bb2c0fcc8..091bb1dd0 100644
--- a/Demos/Device/LowLevel/VirtualSerial/asf.xml
+++ b/Demos/Device/LowLevel/VirtualSerial/asf.xml
@@ -1,14 +1,26 @@
<asf xmlversion="1.0">
- <project caption="Virtual Serial CDC Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.cdc.example">
+ <project caption="Virtual Serial CDC Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.cdc.example.avr8">
<require idref="lufa.demos.device.lowlevel.cdc"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
+ </project>
+
+ <project caption="Virtual Serial CDC Device Demo (Low Level APIs)" id="lufa.demos.device.lowlevel.cdc.example.xmega">
+ <require idref="lufa.demos.device.lowlevel.cdc"/>
+ <require idref="lufa.boards.dummy.xmega"/>
+ <generator value="as5_8"/>
+
+ <device-support value="atxmega128a1u"/>
+ <config name="lufa.drivers.board.name" value="none"/>
+
+ <build type="define" name="F_CPU" value="32000000UL"/>
+ <build type="define" name="F_USB" value="48000000UL"/>
</project>
<module type="application" id="lufa.demos.device.lowlevel.cdc" caption="Virtual Serial CDC Device Demo (Low Level APIs)">
diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c b/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c
index 620e809b4..f7c3c01ce 100644
--- a/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c
+++ b/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c
@@ -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);
diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.h b/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.h
index 48b6389ee..12699398a 100644
--- a/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.h
+++ b/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.h
@@ -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
diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/asf.xml b/Demos/DualRole/ClassDriver/MouseHostDevice/asf.xml
index d2b4214bd..19a0905f0 100644
--- a/Demos/DualRole/ClassDriver/MouseHostDevice/asf.xml
+++ b/Demos/DualRole/ClassDriver/MouseHostDevice/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Mouse HID Dual USB Mode Demo (Class Driver APIs)" id="lufa.demos.dualrole.class.mouse.example">
+ <project caption="Mouse HID Dual USB Mode Demo (Class Driver APIs)" id="lufa.demos.dualrole.class.mouse.example.avr8">
<require idref="lufa.demos.dualrole.class.mouse"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.dualrole.class.mouse" caption="Mouse HID Dual USB Mode Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c
index d103b5d33..a4248e201 100644
--- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c
+++ b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.c
@@ -91,12 +91,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h
index d0abfeff6..58b18e94c 100644
--- a/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h
+++ b/Demos/Host/ClassDriver/AndroidAccessoryHost/AndroidAccessoryHost.h
@@ -48,6 +48,7 @@
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml b/Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml
index 19c6348c2..c31e66320 100644
--- a/Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml
+++ b/Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Android Accessory Host Demo (Class Driver APIs)" id="lufa.demos.host.class.android.example">
+ <project caption="Android Accessory Host Demo (Class Driver APIs)" id="lufa.demos.host.class.android.example.avr8">
<require idref="lufa.demos.host.class.android"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.class.android" caption="Android Accessory Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c
index bc6ade835..fe0235688 100644
--- a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c
+++ b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.c
@@ -106,12 +106,14 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.h b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.h
index b802a58ac..3da8d88f4 100644
--- a/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.h
+++ b/Demos/Host/ClassDriver/AudioInputHost/AudioInputHost.h
@@ -48,6 +48,7 @@
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
diff --git a/Demos/Host/ClassDriver/AudioInputHost/asf.xml b/Demos/Host/ClassDriver/AudioInputHost/asf.xml
index 5c28af91c..ac0d067fb 100644
--- a/Demos/Host/ClassDriver/AudioInputHost/asf.xml
+++ b/Demos/Host/ClassDriver/AudioInputHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Audio Input Host Demo (Class Driver APIs)" id="lufa.demos.host.class.audio_input.example">
+ <project caption="Audio Input Host Demo (Class Driver APIs)" id="lufa.demos.host.class.audio_input.example.avr8">
<require idref="lufa.demos.host.class.audio_input"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.class.audio_input" caption="Audio Input Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c
index 30e60e5da..6faa8fe30 100644
--- a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c
+++ b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.c
@@ -111,12 +111,14 @@ ISR(TIMER0_COMPA_vect, ISR_BLOCK)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
@@ -128,9 +130,9 @@ void SetupHardware(void)
/* Create a stdio stream for the serial port for stdin and stdout */
Serial_CreateStream(NULL);
-
+
/* Start the ADC conversion in free running mode */
- ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_GET_CHANNEL_MASK(MIC_IN_ADC_CHANNEL));
+ ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_GET_CHANNEL_MASK(MIC_IN_ADC_CHANNEL));
}
/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
diff --git a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.h b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.h
index 35f881cd5..543f88ddc 100644
--- a/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.h
+++ b/Demos/Host/ClassDriver/AudioOutputHost/AudioOutputHost.h
@@ -50,7 +50,8 @@
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/Board/Buttons.h>
#include <LUFA/Drivers/USB/USB.h>
-
+ #include <LUFA/Platform/Platform.h>
+
#include "Config/AppConfig.h"
/* Macros: */
diff --git a/Demos/Host/ClassDriver/AudioOutputHost/asf.xml b/Demos/Host/ClassDriver/AudioOutputHost/asf.xml
index 19f915c01..5b53faffd 100644
--- a/Demos/Host/ClassDriver/AudioOutputHost/asf.xml
+++ b/Demos/Host/ClassDriver/AudioOutputHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Audio Output Host Demo (Class Driver APIs)" id="lufa.demos.host.class.audio_output.example">
+ <project caption="Audio Output Host Demo (Class Driver APIs)" id="lufa.demos.host.class.audio_output.example.avr8">
<require idref="lufa.demos.host.class.audio_output"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.class.audio_output" caption="Audio Output Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
index e2f49bcd6..dc0532e6a 100644
--- a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
+++ b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
@@ -87,12 +87,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h
index e29040790..b66216e1b 100644
--- a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h
+++ b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h
@@ -48,6 +48,7 @@
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
diff --git a/Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml b/Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml
index 29eb91764..54a5a2ce5 100644
--- a/Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml
+++ b/Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Joystick HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.joystick_parser.example">
+ <project caption="Joystick HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.joystick_parser.example.avr8">
<require idref="lufa.demos.host.class.joystick_parser"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.class.joystick_parser" caption="Joystick HID (with parser) Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
index 95b96cd3f..ee86cfcdd 100644
--- a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
+++ b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
@@ -83,12 +83,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h
index e890df455..aaf0477a2 100644
--- a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h
+++ b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h
@@ -48,6 +48,7 @@
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
diff --git a/Demos/Host/ClassDriver/KeyboardHost/asf.xml b/Demos/Host/ClassDriver/KeyboardHost/asf.xml
index 76762067f..f9d6067e0 100644
--- a/Demos/Host/ClassDriver/KeyboardHost/asf.xml
+++ b/Demos/Host/ClassDriver/KeyboardHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Keyboard HID Host Demo (Class Driver APIs)" id="lufa.demos.host.class.keyboard.example">
+ <project caption="Keyboard HID Host Demo (Class Driver APIs)" id="lufa.demos.host.class.keyboard.example.avr8">
<require idref="lufa.demos.host.class.keyboard"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.class.keyboard" caption="Keyboard HID Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
index 58c5029f6..c47d719ee 100644
--- a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
+++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
@@ -87,12 +87,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h
index 63078fb0f..643e2f3af 100644
--- a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h
+++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h
@@ -48,6 +48,7 @@
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml b/Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml
index c7352f641..fdd3e7997 100644
--- a/Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml
+++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Keyboard HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.keyboard_parser.example">
+ <project caption="Keyboard HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.keyboard_parser.example.avr8">
<require idref="lufa.demos.host.class.keyboard_parser"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.class.keyboard_parser" caption="Keyboard HID (with parser) Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
index 6e8c3e244..1160f6319 100644
--- a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
+++ b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
@@ -82,12 +82,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.h b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.h
index 1b8619d7e..db1aaf612 100644
--- a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.h
+++ b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.h
@@ -50,6 +50,7 @@
#include <LUFA/Drivers/Board/Buttons.h>
#include <LUFA/Drivers/Board/Joystick.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
diff --git a/Demos/Host/ClassDriver/MIDIHost/asf.xml b/Demos/Host/ClassDriver/MIDIHost/asf.xml
index 3ae82cbf8..b52521f47 100644
--- a/Demos/Host/ClassDriver/MIDIHost/asf.xml
+++ b/Demos/Host/ClassDriver/MIDIHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="MIDI Host Demo (Class Driver APIs)" id="lufa.demos.host.class.midi.example">
+ <project caption="MIDI Host Demo (Class Driver APIs)" id="lufa.demos.host.class.midi.example.avr8">
<require idref="lufa.demos.host.class.midi"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.class.midi" caption="MIDI Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
index a09ae54e9..ead53a801 100644
--- a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
+++ b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
@@ -82,12 +82,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h
index d3a906a61..519aad713 100644
--- a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h
+++ b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h
@@ -49,6 +49,7 @@
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
diff --git a/Demos/Host/ClassDriver/MassStorageHost/asf.xml b/Demos/Host/ClassDriver/MassStorageHost/asf.xml
index 7eb2a6b54..dbc871e9d 100644
--- a/Demos/Host/ClassDriver/MassStorageHost/asf.xml
+++ b/Demos/Host/ClassDriver/MassStorageHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Mass Storage Host Demo (Class Driver APIs)" id="lufa.demos.host.class.ms.example">
+ <project caption="Mass Storage Host Demo (Class Driver APIs)" id="lufa.demos.host.class.ms.example.avr8">
<require idref="lufa.demos.host.class.ms"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.class.ms" caption="Mass Storage Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/MouseHost/MouseHost.c b/Demos/Host/ClassDriver/MouseHost/MouseHost.c
index e56590262..7b3d20b54 100644
--- a/Demos/Host/ClassDriver/MouseHost/MouseHost.c
+++ b/Demos/Host/ClassDriver/MouseHost/MouseHost.c
@@ -83,12 +83,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/ClassDriver/MouseHost/MouseHost.h b/Demos/Host/ClassDriver/MouseHost/MouseHost.h
index d6c50f9e5..b25664174 100644
--- a/Demos/Host/ClassDriver/MouseHost/MouseHost.h
+++ b/Demos/Host/ClassDriver/MouseHost/MouseHost.h
@@ -48,6 +48,7 @@
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
diff --git a/Demos/Host/ClassDriver/MouseHost/asf.xml b/Demos/Host/ClassDriver/MouseHost/asf.xml
index 1bc0a3104..ecc621854 100644
--- a/Demos/Host/ClassDriver/MouseHost/asf.xml
+++ b/Demos/Host/ClassDriver/MouseHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Mouse HID Host Demo (Class Driver APIs)" id="lufa.demos.host.class.mouse.example">
+ <project caption="Mouse HID Host Demo (Class Driver APIs)" id="lufa.demos.host.class.mouse.example.avr8">
<require idref="lufa.demos.host.class.mouse"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.class.mouse" caption="Mouse HID Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
index 0ecab535f..265a8f66c 100644
--- a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
+++ b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
@@ -87,12 +87,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h
index cb5c3130f..d0dd9a9ff 100644
--- a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h
+++ b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h
@@ -48,6 +48,7 @@
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/asf.xml b/Demos/Host/ClassDriver/MouseHostWithParser/asf.xml
index c1a475578..a9ca34bff 100644
--- a/Demos/Host/ClassDriver/MouseHostWithParser/asf.xml
+++ b/Demos/Host/ClassDriver/MouseHostWithParser/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Mouse HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.mouse_parser.example">
+ <project caption="Mouse HID (with parser) Host Demo (Class Driver APIs)" id="lufa.demos.host.class.mouse_parser.example.avr8">
<require idref="lufa.demos.host.class.mouse_parser"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.class.mouse_parser" caption="Mouse HID (with parser) Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c
index 4c8229190..3a19a7efd 100644
--- a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c
+++ b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c
@@ -82,12 +82,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.h b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.h
index 0bbec9ff1..6d289d18a 100644
--- a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.h
+++ b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.h
@@ -48,6 +48,7 @@
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
diff --git a/Demos/Host/ClassDriver/PrinterHost/asf.xml b/Demos/Host/ClassDriver/PrinterHost/asf.xml
index 69b4e1314..fa704ff5e 100644
--- a/Demos/Host/ClassDriver/PrinterHost/asf.xml
+++ b/Demos/Host/ClassDriver/PrinterHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Printer Host Demo (Class Driver APIs)" id="lufa.demos.host.class.printer.example">
+ <project caption="Printer Host Demo (Class Driver APIs)" id="lufa.demos.host.class.printer.example.avr8">
<require idref="lufa.demos.host.class.printer"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.class.printer" caption="Printer Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
index b512735d1..50e2e50b3 100644
--- a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
+++ b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
@@ -117,12 +117,14 @@ void RNDISHost_Task(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h
index 602421c80..965ff447a 100644
--- a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h
+++ b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h
@@ -48,6 +48,7 @@
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
diff --git a/Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml b/Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml
index 5c55c5a70..8199f2d92 100644
--- a/Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml
+++ b/Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="RNDIS Ethernet Host Demo (Class Driver APIs)" id="lufa.demos.host.class.rndis.example">
+ <project caption="RNDIS Ethernet Host Demo (Class Driver APIs)" id="lufa.demos.host.class.rndis.example.avr8">
<require idref="lufa.demos.host.class.rndis"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.class.rndis" caption="RNDIS Ethernet Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
index 35a98eb23..a08be2115 100644
--- a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
+++ b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
@@ -87,12 +87,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.h b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.h
index abe0e0581..e8110a6d9 100644
--- a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.h
+++ b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.h
@@ -48,6 +48,7 @@
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
diff --git a/Demos/Host/ClassDriver/StillImageHost/asf.xml b/Demos/Host/ClassDriver/StillImageHost/asf.xml
index 3703164f4..947178288 100644
--- a/Demos/Host/ClassDriver/StillImageHost/asf.xml
+++ b/Demos/Host/ClassDriver/StillImageHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Still Image Host Demo (Class Driver APIs)" id="lufa.demos.host.class.si.example">
+ <project caption="Still Image Host Demo (Class Driver APIs)" id="lufa.demos.host.class.si.example.avr8">
<require idref="lufa.demos.host.class.si"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.class.si" caption="Still Image Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
index 13c8018ed..c20a7dead 100644
--- a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
+++ b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
@@ -87,12 +87,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
@@ -170,17 +172,17 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
return;
}
-
+
VirtualSerial_CDC_Interface.State.LineEncoding.BaudRateBPS = 9600;
VirtualSerial_CDC_Interface.State.LineEncoding.CharFormat = CDC_LINEENCODING_OneStopBit;
VirtualSerial_CDC_Interface.State.LineEncoding.ParityType = CDC_PARITY_None;
VirtualSerial_CDC_Interface.State.LineEncoding.DataBits = 8;
-
+
if (CDC_Host_SetLineEncoding(&VirtualSerial_CDC_Interface))
{
puts_P(PSTR("Error Setting Device Line Encoding.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
- return;
+ return;
}
puts_P(PSTR("CDC Device Enumerated.\r\n"));
diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h
index 4aec83051..1c63166ec 100644
--- a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h
+++ b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h
@@ -48,6 +48,7 @@
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/asf.xml b/Demos/Host/ClassDriver/VirtualSerialHost/asf.xml
index 67eb347cd..4d0ebb0f8 100644
--- a/Demos/Host/ClassDriver/VirtualSerialHost/asf.xml
+++ b/Demos/Host/ClassDriver/VirtualSerialHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Virtual Serial CDC Host Demo (Class Driver APIs)" id="lufa.demos.host.class.cdc.example">
+ <project caption="Virtual Serial CDC Host Demo (Class Driver APIs)" id="lufa.demos.host.class.cdc.example.avr8">
<require idref="lufa.demos.host.class.cdc"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.class.cdc" caption="Virtual Serial CDC Host Demo (Class Driver APIs)">
diff --git a/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c b/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c
index 72190a42b..e84b877b8 100644
--- a/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c
+++ b/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.c
@@ -58,12 +58,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h b/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h
index 5383d86c4..395206d40 100644
--- a/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h
+++ b/Demos/Host/LowLevel/AndroidAccessoryHost/AndroidAccessoryHost.h
@@ -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. */
diff --git a/Demos/Host/LowLevel/AndroidAccessoryHost/asf.xml b/Demos/Host/LowLevel/AndroidAccessoryHost/asf.xml
index 0100f60ee..9d95cb5d2 100644
--- a/Demos/Host/LowLevel/AndroidAccessoryHost/asf.xml
+++ b/Demos/Host/LowLevel/AndroidAccessoryHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Android Accessory Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.android.example">
+ <project caption="Android Accessory Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.android.example.avr8">
<require idref="lufa.demos.host.lowlevel.android"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.lowlevel.android" caption="Android Accessory Host Demo (Low Level APIs)">
diff --git a/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c b/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c
index 9e6ddd360..a4d083b9f 100644
--- a/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c
+++ b/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.c
@@ -57,12 +57,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.h b/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.h
index febd6eae7..abf19732c 100644
--- a/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.h
+++ b/Demos/Host/LowLevel/AudioInputHost/AudioInputHost.h
@@ -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"
diff --git a/Demos/Host/LowLevel/AudioInputHost/asf.xml b/Demos/Host/LowLevel/AudioInputHost/asf.xml
index f043fb9ed..6c565b3bc 100644
--- a/Demos/Host/LowLevel/AudioInputHost/asf.xml
+++ b/Demos/Host/LowLevel/AudioInputHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Audio Input Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.audio_input.example">
+ <project caption="Audio Input Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.audio_input.example.avr8">
<require idref="lufa.demos.host.lowlevel.audio_input"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.lowlevel.audio_input" caption="Audio Input Host Demo (Low Level APIs)">
diff --git a/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c b/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c
index dfe0609a8..5d6250882 100644
--- a/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c
+++ b/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.c
@@ -57,12 +57,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
@@ -76,7 +78,7 @@ void SetupHardware(void)
Serial_CreateStream(NULL);
/* Start the ADC conversion in free running mode */
- ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_GET_CHANNEL_MASK(MIC_IN_ADC_CHANNEL));
+ ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_GET_CHANNEL_MASK(MIC_IN_ADC_CHANNEL));
}
/** Event handler for the USB_DeviceAttached event. This indicates that a device has been attached to the host, and
diff --git a/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h b/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h
index 58655ba28..3c4ef5b80 100644
--- a/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h
+++ b/Demos/Host/LowLevel/AudioOutputHost/AudioOutputHost.h
@@ -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"
diff --git a/Demos/Host/LowLevel/AudioOutputHost/asf.xml b/Demos/Host/LowLevel/AudioOutputHost/asf.xml
index 200832452..a56c84d09 100644
--- a/Demos/Host/LowLevel/AudioOutputHost/asf.xml
+++ b/Demos/Host/LowLevel/AudioOutputHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Audio Output Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.audio_output.example">
+ <project caption="Audio Output Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.audio_output.example.avr8">
<require idref="lufa.demos.host.lowlevel.audio_output"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.lowlevel.audio_output" caption="Audio Output Host Demo (Low Level APIs)">
diff --git a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
index 392620461..35794df0e 100644
--- a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
+++ b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
@@ -59,12 +59,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h
index ac9cd24bc..8c05d301e 100644
--- a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h
+++ b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.h
@@ -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"
diff --git a/Demos/Host/LowLevel/GenericHIDHost/asf.xml b/Demos/Host/LowLevel/GenericHIDHost/asf.xml
index 17cc78aa0..12df51faa 100644
--- a/Demos/Host/LowLevel/GenericHIDHost/asf.xml
+++ b/Demos/Host/LowLevel/GenericHIDHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Generic HID Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.generic_hid.example">
+ <project caption="Generic HID Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.generic_hid.example.avr8">
<require idref="lufa.demos.host.lowlevel.generic_hid"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.lowlevel.generic_hid" caption="Generic HID Host Demo (Low Level APIs)">
diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
index bc5a457da..35e34692b 100644
--- a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
+++ b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
@@ -59,12 +59,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h
index a6acd1a24..90bc70f41 100644
--- a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h
+++ b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h
@@ -48,6 +48,7 @@
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
#include "ConfigDescriptor.h"
#include "HIDReport.h"
diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/asf.xml b/Demos/Host/LowLevel/JoystickHostWithParser/asf.xml
index 245051995..cf877064d 100644
--- a/Demos/Host/LowLevel/JoystickHostWithParser/asf.xml
+++ b/Demos/Host/LowLevel/JoystickHostWithParser/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Joystick HID (with parser) Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.joystick_parser.example">
+ <project caption="Joystick HID (with parser) Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.joystick_parser.example.avr8">
<require idref="lufa.demos.host.lowlevel.joystick_parser"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.lowlevel.joystick_parser" caption="Joystick HID (with parser) Host Demo (Low Level APIs)">
diff --git a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
index a5a24aba9..f10191a0e 100644
--- a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
+++ b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
@@ -59,12 +59,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h
index 0f38db74f..e11e63f7f 100644
--- a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h
+++ b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.h
@@ -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"
diff --git a/Demos/Host/LowLevel/KeyboardHost/asf.xml b/Demos/Host/LowLevel/KeyboardHost/asf.xml
index db3efd16b..32a88aff8 100644
--- a/Demos/Host/LowLevel/KeyboardHost/asf.xml
+++ b/Demos/Host/LowLevel/KeyboardHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Keyboard HID Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.keyboard.example">
+ <project caption="Keyboard HID Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.keyboard.example.avr8">
<require idref="lufa.demos.host.lowlevel.keyboard"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.lowlevel.keyboard" caption="Keyboard HID Host Demo (Low Level APIs)">
diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
index 9587d7108..e02d583e5 100644
--- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
+++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
@@ -59,12 +59,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h
index 7d384d6d2..14a56931a 100644
--- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h
+++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h
@@ -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"
diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/asf.xml b/Demos/Host/LowLevel/KeyboardHostWithParser/asf.xml
index e6f343deb..1b781972c 100644
--- a/Demos/Host/LowLevel/KeyboardHostWithParser/asf.xml
+++ b/Demos/Host/LowLevel/KeyboardHostWithParser/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Keyboard HID (with parser) Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.keyboard_parser.example">
+ <project caption="Keyboard HID (with parser) Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.keyboard_parser.example.avr8">
<require idref="lufa.demos.host.lowlevel.keyboard_parser"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.lowlevel.keyboard_parser" caption="Keyboard HID (with parser) Host Demo (Low Level APIs)">
diff --git a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c
index 7cef4427d..620cbc988 100644
--- a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c
+++ b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c
@@ -59,12 +59,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
@@ -188,7 +190,7 @@ void MIDIHost_Task(void)
MIDIEvent.Data2, MIDIEvent.Data3);
}
}
-
+
Pipe_Freeze();
Pipe_SelectPipe(MIDI_DATA_OUT_PIPE);
diff --git a/Demos/Host/LowLevel/MIDIHost/MIDIHost.h b/Demos/Host/LowLevel/MIDIHost/MIDIHost.h
index 73933c03a..fd250016c 100644
--- a/Demos/Host/LowLevel/MIDIHost/MIDIHost.h
+++ b/Demos/Host/LowLevel/MIDIHost/MIDIHost.h
@@ -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"
diff --git a/Demos/Host/LowLevel/MIDIHost/asf.xml b/Demos/Host/LowLevel/MIDIHost/asf.xml
index 1ecde005a..862f71928 100644
--- a/Demos/Host/LowLevel/MIDIHost/asf.xml
+++ b/Demos/Host/LowLevel/MIDIHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="MIDI Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.midi.example">
+ <project caption="MIDI Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.midi.example.avr8">
<require idref="lufa.demos.host.lowlevel.midi"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.lowlevel.midi" caption="MIDI Host Demo (Low Level APIs)">
diff --git a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
index b3757981c..ff32da5bf 100644
--- a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
+++ b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
@@ -63,12 +63,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h
index 2229ff3b9..429193dd6 100644
--- a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h
+++ b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h
@@ -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. */
diff --git a/Demos/Host/LowLevel/MassStorageHost/asf.xml b/Demos/Host/LowLevel/MassStorageHost/asf.xml
index fd93fc644..1ee5870ba 100644
--- a/Demos/Host/LowLevel/MassStorageHost/asf.xml
+++ b/Demos/Host/LowLevel/MassStorageHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Mass Storage Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.ms.example">
+ <project caption="Mass Storage Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.ms.example.avr8">
<require idref="lufa.demos.host.lowlevel.ms"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.lowlevel.ms" caption="Mass Storage Host Demo (Low Level APIs)">
diff --git a/Demos/Host/LowLevel/MouseHost/MouseHost.c b/Demos/Host/LowLevel/MouseHost/MouseHost.c
index b24d1ae72..a9225a1df 100644
--- a/Demos/Host/LowLevel/MouseHost/MouseHost.c
+++ b/Demos/Host/LowLevel/MouseHost/MouseHost.c
@@ -59,12 +59,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/LowLevel/MouseHost/MouseHost.h b/Demos/Host/LowLevel/MouseHost/MouseHost.h
index 6bbb71a1e..4dddd2074 100644
--- a/Demos/Host/LowLevel/MouseHost/MouseHost.h
+++ b/Demos/Host/LowLevel/MouseHost/MouseHost.h
@@ -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"
diff --git a/Demos/Host/LowLevel/MouseHost/asf.xml b/Demos/Host/LowLevel/MouseHost/asf.xml
index 8fca686c1..30aa33dbc 100644
--- a/Demos/Host/LowLevel/MouseHost/asf.xml
+++ b/Demos/Host/LowLevel/MouseHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Mouse HID Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.mouse.example">
+ <project caption="Mouse HID Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.mouse.example.avr8">
<require idref="lufa.demos.host.lowlevel.mouse"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.lowlevel.mouse" caption="Mouse HID Host Demo (Low Level APIs)">
diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
index 81c734395..438c6fee9 100644
--- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
+++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
@@ -59,12 +59,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h
index 8d907d7df..d0744e522 100644
--- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h
+++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h
@@ -48,6 +48,7 @@
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
#include "ConfigDescriptor.h"
#include "HIDReport.h"
diff --git a/Demos/Host/LowLevel/MouseHostWithParser/asf.xml b/Demos/Host/LowLevel/MouseHostWithParser/asf.xml
index afc321afe..f5a76a365 100644
--- a/Demos/Host/LowLevel/MouseHostWithParser/asf.xml
+++ b/Demos/Host/LowLevel/MouseHostWithParser/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Mouse HID (with parser) Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.mouse_parser.example">
+ <project caption="Mouse HID (with parser) Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.mouse_parser.example.avr8">
<require idref="lufa.demos.host.lowlevel.mouse_parser"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.lowlevel.mouse_parser" caption="Mouse HID (with parser) Host Demo (Low Level APIs)">
diff --git a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c
index 31b0145b4..c028f2823 100644
--- a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c
+++ b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c
@@ -59,12 +59,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/LowLevel/PrinterHost/PrinterHost.h b/Demos/Host/LowLevel/PrinterHost/PrinterHost.h
index 7998b98a9..69cfb9129 100644
--- a/Demos/Host/LowLevel/PrinterHost/PrinterHost.h
+++ b/Demos/Host/LowLevel/PrinterHost/PrinterHost.h
@@ -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. */
diff --git a/Demos/Host/LowLevel/PrinterHost/asf.xml b/Demos/Host/LowLevel/PrinterHost/asf.xml
index abe73c5ae..f24a1e164 100644
--- a/Demos/Host/LowLevel/PrinterHost/asf.xml
+++ b/Demos/Host/LowLevel/PrinterHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Printer Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.printer.example">
+ <project caption="Printer Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.printer.example.avr8">
<require idref="lufa.demos.host.lowlevel.printer"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.lowlevel.printer" caption="Printer Host Demo (Low Level APIs)">
diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c
index e92b3146b..d01bc3a90 100644
--- a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c
+++ b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c
@@ -59,12 +59,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h
index cb77075f9..9843b64a2 100644
--- a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h
+++ b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h
@@ -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"
diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/asf.xml b/Demos/Host/LowLevel/RNDISEthernetHost/asf.xml
index fafffbf08..7f64c8415 100644
--- a/Demos/Host/LowLevel/RNDISEthernetHost/asf.xml
+++ b/Demos/Host/LowLevel/RNDISEthernetHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="RNDIS Ethernet Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.rndis.example">
+ <project caption="RNDIS Ethernet Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.rndis.example.avr8">
<require idref="lufa.demos.host.lowlevel.rndis"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.lowlevel.rndis" caption="RNDIS Ethernet Host Demo (Low Level APIs)">
diff --git a/Demos/Host/LowLevel/StillImageHost/StillImageHost.c b/Demos/Host/LowLevel/StillImageHost/StillImageHost.c
index 779827a9c..89e7996f7 100644
--- a/Demos/Host/LowLevel/StillImageHost/StillImageHost.c
+++ b/Demos/Host/LowLevel/StillImageHost/StillImageHost.c
@@ -59,13 +59,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
- /* Disable Clock Division */
- CLKPR = (1 << CLKPCE);
- CLKPR = 0;
+ /* Disable clock division */
+ clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/LowLevel/StillImageHost/StillImageHost.h b/Demos/Host/LowLevel/StillImageHost/StillImageHost.h
index 8ce267d0e..2d2181c94 100644
--- a/Demos/Host/LowLevel/StillImageHost/StillImageHost.h
+++ b/Demos/Host/LowLevel/StillImageHost/StillImageHost.h
@@ -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. */
diff --git a/Demos/Host/LowLevel/StillImageHost/asf.xml b/Demos/Host/LowLevel/StillImageHost/asf.xml
index 5645c292a..6592bf3b1 100644
--- a/Demos/Host/LowLevel/StillImageHost/asf.xml
+++ b/Demos/Host/LowLevel/StillImageHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Still Image Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.si.example">
+ <project caption="Still Image Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.si.example.avr8">
<require idref="lufa.demos.host.lowlevel.si"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.lowlevel.si" caption="Still Image Host Demo (Low Level APIs)">
diff --git a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c
index 73a5b9c74..59bd2b478 100644
--- a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c
+++ b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c
@@ -59,12 +59,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
Serial_Init(9600, false);
diff --git a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h
index 05d94a8d8..486aed188 100644
--- a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h
+++ b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h
@@ -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"
diff --git a/Demos/Host/LowLevel/VirtualSerialHost/asf.xml b/Demos/Host/LowLevel/VirtualSerialHost/asf.xml
index 783862d7b..cfe4e2f86 100644
--- a/Demos/Host/LowLevel/VirtualSerialHost/asf.xml
+++ b/Demos/Host/LowLevel/VirtualSerialHost/asf.xml
@@ -1,14 +1,14 @@
<asf xmlversion="1.0">
- <project caption="Virtual Serial CDC Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.cdc.example">
+ <project caption="Virtual Serial CDC Host Demo (Low Level APIs)" id="lufa.demos.host.lowlevel.cdc.example.avr8">
<require idref="lufa.demos.host.lowlevel.cdc"/>
<require idref="lufa.boards.dummy.avr8"/>
<generator value="as5_8"/>
<device-support value="at90usb1287"/>
- <config name="lufa.drivers.board.name" value="usbkey"/>
+ <config name="lufa.drivers.board.name" value="none"/>
- <build type="define" name="F_CPU" value="8000000UL"/>
- <build type="define" name="F_USB" value="8000000UL"/>
+ <build type="define" name="F_CPU" value="16000000UL"/>
+ <build type="define" name="F_USB" value="16000000UL"/>
</project>
<module type="application" id="lufa.demos.host.lowlevel.cdc" caption="Virtual Serial CDC Host Demo (Low Level APIs)">
diff --git a/LUFA/DoxygenPages/ChangeLog.txt b/LUFA/DoxygenPages/ChangeLog.txt
index b14738439..aec199cb0 100644
--- a/LUFA/DoxygenPages/ChangeLog.txt
+++ b/LUFA/DoxygenPages/ChangeLog.txt
@@ -16,11 +16,13 @@
* - 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:
diff --git a/LUFA/Drivers/Board/Buttons.h b/LUFA/Drivers/Board/Buttons.h
index 8727507da..395d7901a 100644
--- a/LUFA/Drivers/Board/Buttons.h
+++ b/LUFA/Drivers/Board/Buttons.h
@@ -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)
diff --git a/LUFA/Drivers/Board/Dataflash.h b/LUFA/Drivers/Board/Dataflash.h
index cc4aa2ee2..7b99371ed 100644
--- a/LUFA/Drivers/Board/Dataflash.h
+++ b/LUFA/Drivers/Board/Dataflash.h
@@ -220,7 +220,23 @@
/* 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)
diff --git a/LUFA/Drivers/Board/Joystick.h b/LUFA/Drivers/Board/Joystick.h
index e39c225e4..c3b306e06 100644
--- a/LUFA/Drivers/Board/Joystick.h
+++ b/LUFA/Drivers/Board/Joystick.h
@@ -67,22 +67,22 @@
* \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
@@ -100,7 +100,13 @@
#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)
diff --git a/Projects/AVRISP-MKII/AVRISP-MKII.c b/Projects/AVRISP-MKII/AVRISP-MKII.c
index 24b14b8ba..685d7c611 100644
--- a/Projects/AVRISP-MKII/AVRISP-MKII.c
+++ b/Projects/AVRISP-MKII/AVRISP-MKII.c
@@ -63,12 +63,14 @@ int main(void)
/** Configures the board hardware and chip peripherals for the demo's functionality. */
void SetupHardware(void)
{
+#if (ARCH == ARCH_AVR8)
/* Disable watchdog if enabled by bootloader/fuses */
MCUSR &= ~(1 << WDRF);
wdt_disable();
/* Disable clock division */
clock_prescale_set(clock_div_1);
+#endif
/* Hardware Initialization */
LEDs_Init();
diff --git a/Projects/AVRISP-MKII/AVRISP-MKII.h b/Projects/AVRISP-MKII/AVRISP-MKII.h
index 0418f213f..138947a48 100644
--- a/Projects/AVRISP-MKII/AVRISP-MKII.h
+++ b/Projects/AVRISP-MKII/AVRISP-MKII.h
@@ -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>
@@ -79,12 +80,12 @@
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
diff --git a/Projects/Benito/Benito.c b/Projects/Benito/Benito.c
index 7f5d507cf..a89e6caf6 100644
--- a/Projects/Benito/Benito.c
+++ b/Projects/Benito/Benito.c
@@ -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();
diff --git a/Projects/Benito/Benito.h b/Projects/Benito/Benito.h
index 938680bf7..beac29f93 100644
--- a/Projects/Benito/Benito.h
+++ b/Projects/Benito/Benito.h
@@ -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. */
diff --git a/Projects/HIDReportViewer/HIDReportViewer.c b/Projects/HIDReportViewer/HIDReportViewer.c
index 70b2f9e14..6ca33e572 100644
--- a/Projects/HIDReportViewer/HIDReportViewer.c
+++ b/Projects/HIDReportViewer/HIDReportViewer.c
@@ -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);
diff --git a/Projects/HIDReportViewer/HIDReportViewer.h b/Projects/HIDReportViewer/HIDReportViewer.h
index 781cfb074..ffe4e00a8 100644
--- a/Projects/HIDReportViewer/HIDReportViewer.h
+++ b/Projects/HIDReportViewer/HIDReportViewer.h
@@ -49,6 +49,7 @@
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/USB/USB.h>
+ #include <LUFA/Platform/Platform.h>
/* Macros: */
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
diff --git a/Projects/LEDNotifier/LEDNotifier.c b/Projects/LEDNotifier/LEDNotifier.c
index 886bf53c6..d6a8fdca3 100644
--- a/Projects/LEDNotifier/LEDNotifier.c
+++ b/Projects/LEDNotifier/LEDNotifier.c
@@ -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();
diff --git a/Projects/LEDNotifier/LEDNotifier.h b/Projects/LEDNotifier/LEDNotifier.h
index 4bb9c0492..0b8579f41 100644
--- a/Projects/LEDNotifier/LEDNotifier.h
+++ b/Projects/LEDNotifier/LEDNotifier.h
@@ -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);
diff --git a/Projects/MIDIToneGenerator/MIDIToneGenerator.c b/Projects/MIDIToneGenerator/MIDIToneGenerator.c
index 2505a3eeb..662c815bc 100644
--- a/Projects/MIDIToneGenerator/MIDIToneGenerator.c
+++ b/Projects/MIDIToneGenerator/MIDIToneGenerator.c
@@ -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();
diff --git a/Projects/MIDIToneGenerator/MIDIToneGenerator.h b/Projects/MIDIToneGenerator/MIDIToneGenerator.h
index 27ee34bed..ab434f30e 100644
--- a/Projects/MIDIToneGenerator/MIDIToneGenerator.h
+++ b/Projects/MIDIToneGenerator/MIDIToneGenerator.h
@@ -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. */
diff --git a/Projects/Magstripe/Magstripe.c b/Projects/Magstripe/Magstripe.c
index 85df8b5ea..8dba7370b 100644
--- a/Projects/Magstripe/Magstripe.c
+++ b/Projects/Magstripe/Magstripe.c
@@ -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();
diff --git a/Projects/Magstripe/Magstripe.h b/Projects/Magstripe/Magstripe.h
index 6d349dfe5..1291f3d62 100644
--- a/Projects/Magstripe/Magstripe.h
+++ b/Projects/Magstripe/Magstripe.h
@@ -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. */
diff --git a/Projects/MediaController/MediaController.c b/Projects/MediaController/MediaController.c
index f1bf649d2..d12a21aac 100644
--- a/Projects/MediaController/MediaController.c
+++ b/Projects/MediaController/MediaController.c
@@ -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();
diff --git a/Projects/MediaController/MediaController.h b/Projects/MediaController/MediaController.h
index 99f0e1274..d68e2764f 100644
--- a/Projects/MediaController/MediaController.h
+++ b/Projects/MediaController/MediaController.h
@@ -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. */
diff --git a/Projects/MissileLauncher/MissileLauncher.c b/Projects/MissileLauncher/MissileLauncher.c
index 14134d75c..6294f2dcf 100644
--- a/Projects/MissileLauncher/MissileLauncher.c
+++ b/Projects/MissileLauncher/MissileLauncher.c
@@ -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();
diff --git a/Projects/MissileLauncher/MissileLauncher.h b/Projects/MissileLauncher/MissileLauncher.h
index 5b51b6e79..4e728295b 100644
--- a/Projects/MissileLauncher/MissileLauncher.h
+++ b/Projects/MissileLauncher/MissileLauncher.h
@@ -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"
diff --git a/Projects/RelayBoard/RelayBoard.c b/Projects/RelayBoard/RelayBoard.c
index 2c236de97..f2ba464ec 100644
--- a/Projects/RelayBoard/RelayBoard.c
+++ b/Projects/RelayBoard/RelayBoard.c
@@ -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();
diff --git a/Projects/RelayBoard/RelayBoard.h b/Projects/RelayBoard/RelayBoard.h
index e43eb2b15..149685a68 100644
--- a/Projects/RelayBoard/RelayBoard.h
+++ b/Projects/RelayBoard/RelayBoard.h
@@ -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)
diff --git a/Projects/SerialToLCD/SerialToLCD.c b/Projects/SerialToLCD/SerialToLCD.c
index 385bcdee3..aac4fadfb 100644
--- a/Projects/SerialToLCD/SerialToLCD.c
+++ b/Projects/SerialToLCD/SerialToLCD.c
@@ -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);
}
diff --git a/Projects/SerialToLCD/SerialToLCD.h b/Projects/SerialToLCD/SerialToLCD.h
index b67b84cf7..22537d609 100644
--- a/Projects/SerialToLCD/SerialToLCD.h
+++ b/Projects/SerialToLCD/SerialToLCD.h
@@ -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
diff --git a/Projects/TempDataLogger/TempDataLogger.c b/Projects/TempDataLogger/TempDataLogger.c
index 415ad9f50..7590aeea3 100644
--- a/Projects/TempDataLogger/TempDataLogger.c
+++ b/Projects/TempDataLogger/TempDataLogger.c
@@ -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();
diff --git a/Projects/TempDataLogger/TempDataLogger.h b/Projects/TempDataLogger/TempDataLogger.h
index 21373f4a7..86364f4e3 100644
--- a/Projects/TempDataLogger/TempDataLogger.h
+++ b/Projects/TempDataLogger/TempDataLogger.h
@@ -50,11 +50,12 @@
#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. */
diff --git a/Projects/USBtoSerial/USBtoSerial.c b/Projects/USBtoSerial/USBtoSerial.c
index 76e3cb837..6df906340 100644
--- a/Projects/USBtoSerial/USBtoSerial.c
+++ b/Projects/USBtoSerial/USBtoSerial.c
@@ -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();
diff --git a/Projects/USBtoSerial/USBtoSerial.h b/Projects/USBtoSerial/USBtoSerial.h
index d37a5405c..220500f91 100644
--- a/Projects/USBtoSerial/USBtoSerial.h
+++ b/Projects/USBtoSerial/USBtoSerial.h
@@ -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. */
diff --git a/Projects/Webserver/Webserver.c b/Projects/Webserver/Webserver.c
index be53032d2..173b52e95 100644
--- a/Projects/Webserver/Webserver.c
+++ b/Projects/Webserver/Webserver.c
@@ -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);
diff --git a/Projects/Webserver/Webserver.h b/Projects/Webserver/Webserver.h
index 1dfa83036..a828e892e 100644
--- a/Projects/Webserver/Webserver.h
+++ b/Projects/Webserver/Webserver.h
@@ -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"
diff --git a/Projects/XPLAINBridge/XPLAINBridge.c b/Projects/XPLAINBridge/XPLAINBridge.c
index 79145a138..2ef1d20ee 100644
--- a/Projects/XPLAINBridge/XPLAINBridge.c
+++ b/Projects/XPLAINBridge/XPLAINBridge.c
@@ -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();
}
diff --git a/Projects/XPLAINBridge/XPLAINBridge.h b/Projects/XPLAINBridge/XPLAINBridge.h
index 1f08b2aba..55921d804 100644
--- a/Projects/XPLAINBridge/XPLAINBridge.h
+++ b/Projects/XPLAINBridge/XPLAINBridge.h
@@ -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