diff --git a/Demos/Device/ClassDriver/AudioInput/asf.xml b/Demos/Device/ClassDriver/AudioInput/asf.xml index 71f1cdcc279..87a117a0853 100644 --- a/Demos/Device/ClassDriver/AudioInput/asf.xml +++ b/Demos/Device/ClassDriver/AudioInput/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/ClassDriver/AudioOutput/asf.xml b/Demos/Device/ClassDriver/AudioOutput/asf.xml index dae49c74eb2..0dbc88146eb 100644 --- a/Demos/Device/ClassDriver/AudioOutput/asf.xml +++ b/Demos/Device/ClassDriver/AudioOutput/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/asf.xml b/Demos/Device/ClassDriver/DualVirtualSerial/asf.xml index eb9560b597c..eb06e8ad02a 100644 --- a/Demos/Device/ClassDriver/DualVirtualSerial/asf.xml +++ b/Demos/Device/ClassDriver/DualVirtualSerial/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/ClassDriver/GenericHID/asf.xml b/Demos/Device/ClassDriver/GenericHID/asf.xml index 2c50f4d3536..2c09cc4589b 100644 --- a/Demos/Device/ClassDriver/GenericHID/asf.xml +++ b/Demos/Device/ClassDriver/GenericHID/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/ClassDriver/Joystick/asf.xml b/Demos/Device/ClassDriver/Joystick/asf.xml index aab03316d2a..ccb653e0383 100644 --- a/Demos/Device/ClassDriver/Joystick/asf.xml +++ b/Demos/Device/ClassDriver/Joystick/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/ClassDriver/Keyboard/asf.xml b/Demos/Device/ClassDriver/Keyboard/asf.xml index 4f462c56921..8010c309830 100644 --- a/Demos/Device/ClassDriver/Keyboard/asf.xml +++ b/Demos/Device/ClassDriver/Keyboard/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/ClassDriver/KeyboardMouse/asf.xml b/Demos/Device/ClassDriver/KeyboardMouse/asf.xml index e2704b416ee..92ddb871a7e 100644 --- a/Demos/Device/ClassDriver/KeyboardMouse/asf.xml +++ b/Demos/Device/ClassDriver/KeyboardMouse/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/asf.xml b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/asf.xml index 6db30d6daf5..cf11fe737d4 100644 --- a/Demos/Device/ClassDriver/KeyboardMouseMultiReport/asf.xml +++ b/Demos/Device/ClassDriver/KeyboardMouseMultiReport/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/ClassDriver/MIDI/asf.xml b/Demos/Device/ClassDriver/MIDI/asf.xml index 22402076fcc..4d2600c9f1a 100644 --- a/Demos/Device/ClassDriver/MIDI/asf.xml +++ b/Demos/Device/ClassDriver/MIDI/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/ClassDriver/MassStorage/asf.xml b/Demos/Device/ClassDriver/MassStorage/asf.xml index dd8bd841868..bcd3b7ec1d2 100644 --- a/Demos/Device/ClassDriver/MassStorage/asf.xml +++ b/Demos/Device/ClassDriver/MassStorage/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/asf.xml b/Demos/Device/ClassDriver/MassStorageKeyboard/asf.xml index 4e44c30caf0..fb1256ec87c 100644 --- a/Demos/Device/ClassDriver/MassStorageKeyboard/asf.xml +++ b/Demos/Device/ClassDriver/MassStorageKeyboard/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/ClassDriver/Mouse/asf.xml b/Demos/Device/ClassDriver/Mouse/asf.xml index a1827b9fec4..ea43b22f6e2 100644 --- a/Demos/Device/ClassDriver/Mouse/asf.xml +++ b/Demos/Device/ClassDriver/Mouse/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/ClassDriver/RNDISEthernet/asf.xml b/Demos/Device/ClassDriver/RNDISEthernet/asf.xml index c960ea9f346..526ece60fa3 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/asf.xml +++ b/Demos/Device/ClassDriver/RNDISEthernet/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/ClassDriver/VirtualSerial/asf.xml b/Demos/Device/ClassDriver/VirtualSerial/asf.xml index 5a533a410bd..87d6520585b 100644 --- a/Demos/Device/ClassDriver/VirtualSerial/asf.xml +++ b/Demos/Device/ClassDriver/VirtualSerial/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/ClassDriver/VirtualSerialMassStorage/asf.xml b/Demos/Device/ClassDriver/VirtualSerialMassStorage/asf.xml index 94e58988680..f02759736d3 100644 --- a/Demos/Device/ClassDriver/VirtualSerialMassStorage/asf.xml +++ b/Demos/Device/ClassDriver/VirtualSerialMassStorage/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/asf.xml b/Demos/Device/ClassDriver/VirtualSerialMouse/asf.xml index 8cb230ca599..07e21a53547 100644 --- a/Demos/Device/ClassDriver/VirtualSerialMouse/asf.xml +++ b/Demos/Device/ClassDriver/VirtualSerialMouse/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/LowLevel/AudioInput/asf.xml b/Demos/Device/LowLevel/AudioInput/asf.xml index 4c48439f881..3b62f83f2f5 100644 --- a/Demos/Device/LowLevel/AudioInput/asf.xml +++ b/Demos/Device/LowLevel/AudioInput/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/LowLevel/AudioOutput/asf.xml b/Demos/Device/LowLevel/AudioOutput/asf.xml index b94807f5dad..522f1d0e548 100644 --- a/Demos/Device/LowLevel/AudioOutput/asf.xml +++ b/Demos/Device/LowLevel/AudioOutput/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/LowLevel/DualVirtualSerial/asf.xml b/Demos/Device/LowLevel/DualVirtualSerial/asf.xml index ad4dee5f40e..b04ce5913b8 100644 --- a/Demos/Device/LowLevel/DualVirtualSerial/asf.xml +++ b/Demos/Device/LowLevel/DualVirtualSerial/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/LowLevel/GenericHID/asf.xml b/Demos/Device/LowLevel/GenericHID/asf.xml index 33de16eecbd..436e7b4d97f 100644 --- a/Demos/Device/LowLevel/GenericHID/asf.xml +++ b/Demos/Device/LowLevel/GenericHID/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/LowLevel/Joystick/asf.xml b/Demos/Device/LowLevel/Joystick/asf.xml index 43dbd9baa25..101dc05bac7 100644 --- a/Demos/Device/LowLevel/Joystick/asf.xml +++ b/Demos/Device/LowLevel/Joystick/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/LowLevel/Keyboard/asf.xml b/Demos/Device/LowLevel/Keyboard/asf.xml index 605c0ef7548..9da57ae7795 100644 --- a/Demos/Device/LowLevel/Keyboard/asf.xml +++ b/Demos/Device/LowLevel/Keyboard/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/LowLevel/KeyboardMouse/asf.xml b/Demos/Device/LowLevel/KeyboardMouse/asf.xml index 2f1dfaa6e8a..ebf8055d65f 100644 --- a/Demos/Device/LowLevel/KeyboardMouse/asf.xml +++ b/Demos/Device/LowLevel/KeyboardMouse/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/LowLevel/MIDI/asf.xml b/Demos/Device/LowLevel/MIDI/asf.xml index 0ab2095c6d3..92ea6f05bb7 100644 --- a/Demos/Device/LowLevel/MIDI/asf.xml +++ b/Demos/Device/LowLevel/MIDI/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/LowLevel/MassStorage/asf.xml b/Demos/Device/LowLevel/MassStorage/asf.xml index 1667ac6a77f..6ffa794379a 100644 --- a/Demos/Device/LowLevel/MassStorage/asf.xml +++ b/Demos/Device/LowLevel/MassStorage/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/LowLevel/Mouse/asf.xml b/Demos/Device/LowLevel/Mouse/asf.xml index a596b7a5207..660f878af2c 100644 --- a/Demos/Device/LowLevel/Mouse/asf.xml +++ b/Demos/Device/LowLevel/Mouse/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/LowLevel/RNDISEthernet/asf.xml b/Demos/Device/LowLevel/RNDISEthernet/asf.xml index 6a2a697e100..b33bf8238af 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/asf.xml +++ b/Demos/Device/LowLevel/RNDISEthernet/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Device/LowLevel/VirtualSerial/asf.xml b/Demos/Device/LowLevel/VirtualSerial/asf.xml index dff598dd49f..0525dc5be11 100644 --- a/Demos/Device/LowLevel/VirtualSerial/asf.xml +++ b/Demos/Device/LowLevel/VirtualSerial/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/asf.xml b/Demos/DualRole/ClassDriver/MouseHostDevice/asf.xml index 1e6dc146163..10d397f606d 100644 --- a/Demos/DualRole/ClassDriver/MouseHostDevice/asf.xml +++ b/Demos/DualRole/ClassDriver/MouseHostDevice/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml b/Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml index c3540047631..a4332efb29e 100644 --- a/Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml +++ b/Demos/Host/ClassDriver/AndroidAccessoryHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/ClassDriver/AudioInputHost/asf.xml b/Demos/Host/ClassDriver/AudioInputHost/asf.xml index d5d4f47fe12..b127a6355a8 100644 --- a/Demos/Host/ClassDriver/AudioInputHost/asf.xml +++ b/Demos/Host/ClassDriver/AudioInputHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/ClassDriver/AudioOutputHost/asf.xml b/Demos/Host/ClassDriver/AudioOutputHost/asf.xml index 9d1d36f905a..c09757fed93 100644 --- a/Demos/Host/ClassDriver/AudioOutputHost/asf.xml +++ b/Demos/Host/ClassDriver/AudioOutputHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml b/Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml index d7d1680b886..7cd2e5762d3 100644 --- a/Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml +++ b/Demos/Host/ClassDriver/JoystickHostWithParser/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/ClassDriver/KeyboardHost/asf.xml b/Demos/Host/ClassDriver/KeyboardHost/asf.xml index e11ec49c46e..f9633f0a51a 100644 --- a/Demos/Host/ClassDriver/KeyboardHost/asf.xml +++ b/Demos/Host/ClassDriver/KeyboardHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml b/Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml index af84bc6f240..67411594c47 100644 --- a/Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml +++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/ClassDriver/MIDIHost/asf.xml b/Demos/Host/ClassDriver/MIDIHost/asf.xml index 492a1209980..5129fa4343d 100644 --- a/Demos/Host/ClassDriver/MIDIHost/asf.xml +++ b/Demos/Host/ClassDriver/MIDIHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/ClassDriver/MassStorageHost/asf.xml b/Demos/Host/ClassDriver/MassStorageHost/asf.xml index 7b07416c760..2d57c745b7a 100644 --- a/Demos/Host/ClassDriver/MassStorageHost/asf.xml +++ b/Demos/Host/ClassDriver/MassStorageHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/ClassDriver/MouseHost/asf.xml b/Demos/Host/ClassDriver/MouseHost/asf.xml index 523ace6f63e..fb7d261418f 100644 --- a/Demos/Host/ClassDriver/MouseHost/asf.xml +++ b/Demos/Host/ClassDriver/MouseHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/asf.xml b/Demos/Host/ClassDriver/MouseHostWithParser/asf.xml index e8f8369d825..943dc28ebc4 100644 --- a/Demos/Host/ClassDriver/MouseHostWithParser/asf.xml +++ b/Demos/Host/ClassDriver/MouseHostWithParser/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/ClassDriver/PrinterHost/asf.xml b/Demos/Host/ClassDriver/PrinterHost/asf.xml index d72a86c86f8..14c92eb5b3e 100644 --- a/Demos/Host/ClassDriver/PrinterHost/asf.xml +++ b/Demos/Host/ClassDriver/PrinterHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml b/Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml index 83d1295f6b6..c684b3677bd 100644 --- a/Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml +++ b/Demos/Host/ClassDriver/RNDISEthernetHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/ClassDriver/StillImageHost/asf.xml b/Demos/Host/ClassDriver/StillImageHost/asf.xml index 6548a38fc77..1be92f33c6b 100644 --- a/Demos/Host/ClassDriver/StillImageHost/asf.xml +++ b/Demos/Host/ClassDriver/StillImageHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/asf.xml b/Demos/Host/ClassDriver/VirtualSerialHost/asf.xml index ca9aaa01f4b..fa464e43d52 100644 --- a/Demos/Host/ClassDriver/VirtualSerialHost/asf.xml +++ b/Demos/Host/ClassDriver/VirtualSerialHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/LowLevel/AndroidAccessoryHost/asf.xml b/Demos/Host/LowLevel/AndroidAccessoryHost/asf.xml index e145ce3b943..f34a078e518 100644 --- a/Demos/Host/LowLevel/AndroidAccessoryHost/asf.xml +++ b/Demos/Host/LowLevel/AndroidAccessoryHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/LowLevel/AudioInputHost/asf.xml b/Demos/Host/LowLevel/AudioInputHost/asf.xml index 1608f50f634..299c4a483ee 100644 --- a/Demos/Host/LowLevel/AudioInputHost/asf.xml +++ b/Demos/Host/LowLevel/AudioInputHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/LowLevel/AudioOutputHost/asf.xml b/Demos/Host/LowLevel/AudioOutputHost/asf.xml index b821eb10447..0f9f4efde7a 100644 --- a/Demos/Host/LowLevel/AudioOutputHost/asf.xml +++ b/Demos/Host/LowLevel/AudioOutputHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/LowLevel/GenericHIDHost/asf.xml b/Demos/Host/LowLevel/GenericHIDHost/asf.xml index fb3dd0a0a30..ea0388f3cb0 100644 --- a/Demos/Host/LowLevel/GenericHIDHost/asf.xml +++ b/Demos/Host/LowLevel/GenericHIDHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/asf.xml b/Demos/Host/LowLevel/JoystickHostWithParser/asf.xml index 60e92a1ec41..261ee3b78d1 100644 --- a/Demos/Host/LowLevel/JoystickHostWithParser/asf.xml +++ b/Demos/Host/LowLevel/JoystickHostWithParser/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/LowLevel/KeyboardHost/asf.xml b/Demos/Host/LowLevel/KeyboardHost/asf.xml index 1da831500dd..c56258a550f 100644 --- a/Demos/Host/LowLevel/KeyboardHost/asf.xml +++ b/Demos/Host/LowLevel/KeyboardHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/asf.xml b/Demos/Host/LowLevel/KeyboardHostWithParser/asf.xml index f230ca28b16..6313775e426 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/asf.xml +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/LowLevel/MIDIHost/asf.xml b/Demos/Host/LowLevel/MIDIHost/asf.xml index 0bd2da7c813..aa0a5f343df 100644 --- a/Demos/Host/LowLevel/MIDIHost/asf.xml +++ b/Demos/Host/LowLevel/MIDIHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/LowLevel/MassStorageHost/asf.xml b/Demos/Host/LowLevel/MassStorageHost/asf.xml index 6393a218b6b..a6ef8fe53af 100644 --- a/Demos/Host/LowLevel/MassStorageHost/asf.xml +++ b/Demos/Host/LowLevel/MassStorageHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/LowLevel/MouseHost/asf.xml b/Demos/Host/LowLevel/MouseHost/asf.xml index 46200fd2214..bde2295fb19 100644 --- a/Demos/Host/LowLevel/MouseHost/asf.xml +++ b/Demos/Host/LowLevel/MouseHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/LowLevel/MouseHostWithParser/asf.xml b/Demos/Host/LowLevel/MouseHostWithParser/asf.xml index 765c10ad5a0..eefac26074c 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/asf.xml +++ b/Demos/Host/LowLevel/MouseHostWithParser/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/LowLevel/PrinterHost/asf.xml b/Demos/Host/LowLevel/PrinterHost/asf.xml index e6c15440fde..320bdd21b43 100644 --- a/Demos/Host/LowLevel/PrinterHost/asf.xml +++ b/Demos/Host/LowLevel/PrinterHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/asf.xml b/Demos/Host/LowLevel/RNDISEthernetHost/asf.xml index 19c7bc22fe2..319bac0ccc3 100644 --- a/Demos/Host/LowLevel/RNDISEthernetHost/asf.xml +++ b/Demos/Host/LowLevel/RNDISEthernetHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/LowLevel/StillImageHost/asf.xml b/Demos/Host/LowLevel/StillImageHost/asf.xml index e7c2b05e673..0d1db42b041 100644 --- a/Demos/Host/LowLevel/StillImageHost/asf.xml +++ b/Demos/Host/LowLevel/StillImageHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Demos/Host/LowLevel/VirtualSerialHost/asf.xml b/Demos/Host/LowLevel/VirtualSerialHost/asf.xml index 23d0f22952d..22af311c2a5 100644 --- a/Demos/Host/LowLevel/VirtualSerialHost/asf.xml +++ b/Demos/Host/LowLevel/VirtualSerialHost/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/LUFA/CodeTemplates/DeviceTemplate/DeviceApplication.c b/LUFA/CodeTemplates/DeviceTemplate/DeviceApplication.c index 893c733a6eb..e107c868013 100644 --- a/LUFA/CodeTemplates/DeviceTemplate/DeviceApplication.c +++ b/LUFA/CodeTemplates/DeviceTemplate/DeviceApplication.c @@ -55,15 +55,30 @@ int main(void) /** Configures the board hardware and chip peripherals for the demo's functionality. */ void SetupHardware(void) { - /* Disable watchdog if enabled by bootloader/fuses */ - MCUSR &= ~(1 << WDRF); - wdt_disable(); + #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); + /* Disable clock division */ + clock_prescale_set(clock_div_1); - /* Hardware Initialization */ - USB_Init(USB_MODE_Device, USB_DEVICE_OPT_FULLSPEED | USB_OPT_AUTO_PLL); + /* Hardware Initialization */ + USB_Init(USB_MODE_Device, USB_DEVICE_OPT_FULLSPEED | USB_OPT_AUTO_PLL); + #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; + + /* Hardware Initialization */ + USB_Init(USB_OPT_RC32MCLKSRC | USB_OPT_BUSEVENT_PRIHIGH); + #endif } /** Event handler for the library USB Connection event. */ diff --git a/LUFA/CodeTemplates/DeviceTemplate/DeviceApplication.h b/LUFA/CodeTemplates/DeviceTemplate/DeviceApplication.h index 9dac556a16d..bc6875bccd6 100644 --- a/LUFA/CodeTemplates/DeviceTemplate/DeviceApplication.h +++ b/LUFA/CodeTemplates/DeviceTemplate/DeviceApplication.h @@ -34,13 +34,14 @@ */ #ifndef _USB_DEVICE_APPLICATION_H_ -#define _USB_DEVICE_APPLICATION_ +#define _USB_DEVICE_APPLICATION_H_ /* Includes: */ #include #include #include + #include #include #include "Descriptors.h" diff --git a/LUFA/CodeTemplates/DeviceTemplate/asf.xml b/LUFA/CodeTemplates/DeviceTemplate/asf.xml index 0cceef9f0e2..cdb4c605a92 100644 --- a/LUFA/CodeTemplates/DeviceTemplate/asf.xml +++ b/LUFA/CodeTemplates/DeviceTemplate/asf.xml @@ -1,7 +1,7 @@ - + - + @@ -11,6 +11,18 @@ + + + + + + + + + + + + Template for a LUFA USB device mode application. diff --git a/LUFA/CodeTemplates/HostTemplate/asf.xml b/LUFA/CodeTemplates/HostTemplate/asf.xml index 0c20c4b12e7..9acef597ee5 100644 --- a/LUFA/CodeTemplates/HostTemplate/asf.xml +++ b/LUFA/CodeTemplates/HostTemplate/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/LUFA/StudioIntegration/lufa_drivers_board.xml b/LUFA/StudioIntegration/lufa_drivers_board.xml index 89b9151836c..2e2908e15f5 100644 --- a/LUFA/StudioIntegration/lufa_drivers_board.xml +++ b/LUFA/StudioIntegration/lufa_drivers_board.xml @@ -10,12 +10,40 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LUFA/StudioIntegration/lufa_drivers_board_names.xml b/LUFA/StudioIntegration/lufa_drivers_board_names.xml index 8212096187e..87ba21d9464 100644 --- a/LUFA/StudioIntegration/lufa_drivers_board_names.xml +++ b/LUFA/StudioIntegration/lufa_drivers_board_names.xml @@ -25,6 +25,9 @@ + + + @@ -32,6 +35,10 @@ + + + + @@ -40,6 +47,10 @@ + + + + @@ -48,6 +59,9 @@ + + + @@ -55,6 +69,9 @@ + + + @@ -62,6 +79,9 @@ + + + @@ -69,6 +89,11 @@ + + + + + @@ -78,6 +103,10 @@ + + + + @@ -86,6 +115,9 @@ + + + @@ -95,7 +127,12 @@ + + + + + @@ -106,6 +143,10 @@ + + + + @@ -114,6 +155,9 @@ + + + @@ -121,6 +165,9 @@ + + + @@ -128,6 +175,10 @@ + + + + @@ -136,6 +187,9 @@ + + + @@ -143,6 +197,9 @@ + + + @@ -150,6 +207,9 @@ + + + @@ -157,6 +217,9 @@ + + + @@ -164,6 +227,9 @@ + + + @@ -171,6 +237,9 @@ + + + @@ -178,6 +247,10 @@ + + + + @@ -186,6 +259,10 @@ + + + + @@ -194,6 +271,10 @@ + + + + @@ -202,6 +283,10 @@ + + + + @@ -210,6 +295,9 @@ + + + @@ -217,6 +305,10 @@ + + + + @@ -225,6 +317,10 @@ + + + + @@ -233,6 +329,10 @@ + + + + @@ -241,6 +341,10 @@ + + + + @@ -249,6 +353,9 @@ + + + @@ -256,6 +363,9 @@ + + + @@ -265,7 +375,12 @@ + + + + + @@ -278,7 +393,12 @@ + + + + + @@ -289,6 +409,9 @@ + + + @@ -296,6 +419,9 @@ + + + @@ -303,6 +429,10 @@ + + + + @@ -311,6 +441,10 @@ + + + + @@ -320,6 +454,9 @@ + + + @@ -327,6 +464,10 @@ + + + + @@ -335,6 +476,10 @@ + + + + @@ -343,6 +488,10 @@ + + + + @@ -351,6 +500,10 @@ + + + + @@ -362,6 +515,12 @@ + + + + + + @@ -372,6 +531,10 @@ + + + + @@ -381,7 +544,10 @@ + + + @@ -393,7 +559,10 @@ + + + @@ -406,6 +575,11 @@ + + + + + @@ -418,7 +592,11 @@ + + + + @@ -429,6 +607,11 @@ + + + + + @@ -439,6 +622,11 @@ + + + + + @@ -449,6 +637,10 @@ + + + + @@ -458,6 +650,10 @@ + + + + @@ -467,6 +663,10 @@ + + + + diff --git a/Projects/AVRISP-MKII/asf.xml b/Projects/AVRISP-MKII/asf.xml index 426818d3758..44be0aa7ec0 100644 --- a/Projects/AVRISP-MKII/asf.xml +++ b/Projects/AVRISP-MKII/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Projects/Benito/asf.xml b/Projects/Benito/asf.xml index dab72ae5237..8d29e9457ed 100644 --- a/Projects/Benito/asf.xml +++ b/Projects/Benito/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Projects/HIDReportViewer/asf.xml b/Projects/HIDReportViewer/asf.xml index fa748a0769a..7999f334875 100644 --- a/Projects/HIDReportViewer/asf.xml +++ b/Projects/HIDReportViewer/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Projects/LEDNotifier/asf.xml b/Projects/LEDNotifier/asf.xml index ee334efddb5..98d4f917e0e 100644 --- a/Projects/LEDNotifier/asf.xml +++ b/Projects/LEDNotifier/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Projects/MIDIToneGenerator/asf.xml b/Projects/MIDIToneGenerator/asf.xml index 2307c7fc80b..55d4a5d3ed7 100644 --- a/Projects/MIDIToneGenerator/asf.xml +++ b/Projects/MIDIToneGenerator/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Projects/Magstripe/asf.xml b/Projects/Magstripe/asf.xml index 249d697efd6..edb03751a18 100644 --- a/Projects/Magstripe/asf.xml +++ b/Projects/Magstripe/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Projects/MediaController/asf.xml b/Projects/MediaController/asf.xml index 0f020f452f4..64bd504a453 100644 --- a/Projects/MediaController/asf.xml +++ b/Projects/MediaController/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Projects/MissileLauncher/asf.xml b/Projects/MissileLauncher/asf.xml index 77366d193cd..cb35c184677 100644 --- a/Projects/MissileLauncher/asf.xml +++ b/Projects/MissileLauncher/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Projects/RelayBoard/asf.xml b/Projects/RelayBoard/asf.xml index 259bca42f98..3ad1c71ee7a 100644 --- a/Projects/RelayBoard/asf.xml +++ b/Projects/RelayBoard/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Projects/SerialToLCD/asf.xml b/Projects/SerialToLCD/asf.xml index 6af93804b28..5d38daaddfe 100644 --- a/Projects/SerialToLCD/asf.xml +++ b/Projects/SerialToLCD/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Projects/TempDataLogger/asf.xml b/Projects/TempDataLogger/asf.xml index c2039003fb0..6e5528b1ce1 100644 --- a/Projects/TempDataLogger/asf.xml +++ b/Projects/TempDataLogger/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Projects/USBtoSerial/asf.xml b/Projects/USBtoSerial/asf.xml index b6b4c0a1d85..d4d90a66393 100644 --- a/Projects/USBtoSerial/asf.xml +++ b/Projects/USBtoSerial/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Projects/Webserver/asf.xml b/Projects/Webserver/asf.xml index 3505f730572..abb30fe653c 100644 --- a/Projects/Webserver/asf.xml +++ b/Projects/Webserver/asf.xml @@ -1,7 +1,7 @@ - + diff --git a/Projects/XPLAINBridge/asf.xml b/Projects/XPLAINBridge/asf.xml index 3936f31724a..f410b6f2efc 100644 --- a/Projects/XPLAINBridge/asf.xml +++ b/Projects/XPLAINBridge/asf.xml @@ -1,7 +1,7 @@ - +