diff --git a/Demos/Device/ClassDriver/AudioInput/asf.xml b/Demos/Device/ClassDriver/AudioInput/asf.xml index 71f1cdcc27..87a117a085 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 dae49c74eb..0dbc88146e 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 eb9560b597..eb06e8ad02 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 2c50f4d353..2c09cc4589 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 aab03316d2..ccb653e038 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 4f462c5692..8010c30983 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 e2704b416e..92ddb871a7 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 6db30d6daf..cf11fe737d 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 22402076fc..4d2600c9f1 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 dd8bd84186..bcd3b7ec1d 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 4e44c30caf..fb1256ec87 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 a1827b9fec..ea43b22f6e 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 c960ea9f34..526ece60fa 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 5a533a410b..87d6520585 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 94e5898868..f02759736d 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 8cb230ca59..07e21a5354 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 4c48439f88..3b62f83f2f 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 b94807f5da..522f1d0e54 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 ad4dee5f40..b04ce5913b 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 33de16eecb..436e7b4d97 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 43dbd9baa2..101dc05bac 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 605c0ef754..9da57ae779 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 2f1dfaa6e8..ebf8055d65 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 0ab2095c6d..92ea6f05bb 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 1667ac6a77..6ffa794379 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 a596b7a520..660f878af2 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 6a2a697e10..b33bf8238a 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 dff598dd49..0525dc5be1 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 1e6dc14616..10d397f606 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 c354004763..a4332efb29 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 d5d4f47fe1..b127a6355a 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 9d1d36f905..c09757fed9 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 d7d1680b88..7cd2e5762d 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 e11ec49c46..f9633f0a51 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 af84bc6f24..67411594c4 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 492a120998..5129fa4343 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 7b07416c76..2d57c745b7 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 523ace6f63..fb7d261418 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 e8f8369d82..943dc28ebc 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 d72a86c86f..14c92eb5b3 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 83d1295f6b..c684b3677b 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 6548a38fc7..1be92f33c6 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 ca9aaa01f4..fa464e43d5 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 e145ce3b94..f34a078e51 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 1608f50f63..299c4a483e 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 b821eb1044..0f9f4efde7 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 fb3dd0a0a3..ea0388f3cb 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 60e92a1ec4..261ee3b78d 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 1da831500d..c56258a550 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 f230ca28b1..6313775e42 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 0bd2da7c81..aa0a5f343d 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 6393a218b6..a6ef8fe53a 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 46200fd221..bde2295fb1 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 765c10ad5a..eefac26074 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 e6c15440fd..320bdd21b4 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 19c7bc22fe..319bac0ccc 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 e7c2b05e67..0d1db42b04 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 23d0f22952..22af311c2a 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 893c733a6e..e107c86801 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(); - - /* Disable clock division */ - clock_prescale_set(clock_div_1); - - /* Hardware Initialization */ - USB_Init(USB_MODE_Device, USB_DEVICE_OPT_FULLSPEED | USB_OPT_AUTO_PLL); + #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); + + /* 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 9dac556a16..bc6875bccd 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 0cceef9f0e..cdb4c605a9 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 0c20c4b12e..9acef597ee 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 89b9151836..2e2908e15f 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 8212096187..87ba21d946 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 426818d375..44be0aa7ec 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 dab72ae523..8d29e9457e 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 fa748a0769..7999f33487 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 ee334efddb..98d4f917e0 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 2307c7fc80..55d4a5d3ed 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 249d697efd..edb03751a1 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 0f020f452f..64bd504a45 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 77366d193c..cb35c18467 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 259bca42f9..3ad1c71ee7 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 6af93804b2..5d38daaddf 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 c2039003fb..6e5528b1ce 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 b6b4c0a1d8..d4d90a6639 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 3505f73057..abb30fe653 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 3936f31724..f410b6f2ef 100644 --- a/Projects/XPLAINBridge/asf.xml +++ b/Projects/XPLAINBridge/asf.xml @@ -1,7 +1,7 @@ - +