forked from mfulz_github/qmk_firmware
Port the device mode demos to the XMEGA architecture where applicable.
This commit is contained in:
parent
329629a316
commit
151a1c5888
|
@ -62,12 +62,14 @@ int main(void)
|
||||||
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
||||||
void SetupHardware(void)
|
void SetupHardware(void)
|
||||||
{
|
{
|
||||||
|
#if (ARCH == ARCH_AVR8)
|
||||||
/* Disable watchdog if enabled by bootloader/fuses */
|
/* Disable watchdog if enabled by bootloader/fuses */
|
||||||
MCUSR &= ~(1 << WDRF);
|
MCUSR &= ~(1 << WDRF);
|
||||||
wdt_disable();
|
wdt_disable();
|
||||||
|
|
||||||
/* Disable clock division */
|
/* Disable clock division */
|
||||||
clock_prescale_set(clock_div_1);
|
clock_prescale_set(clock_div_1);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Hardware Initialization */
|
/* Hardware Initialization */
|
||||||
LEDs_Init();
|
LEDs_Init();
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
#include <LUFA/Drivers/Board/LEDs.h>
|
#include <LUFA/Drivers/Board/LEDs.h>
|
||||||
#include <LUFA/Drivers/Board/Buttons.h>
|
#include <LUFA/Drivers/Board/Buttons.h>
|
||||||
#include <LUFA/Drivers/Peripheral/ADC.h>
|
#include <LUFA/Drivers/Peripheral/ADC.h>
|
||||||
|
#include <LUFA/Platform/Platform.h>
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
/** Maximum audio sample value for the microphone input. */
|
/** Maximum audio sample value for the microphone input. */
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<asf xmlversion="1.0">
|
<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.demos.device.lowlevel.audio_input"/>
|
||||||
<require idref="lufa.boards.dummy.avr8"/>
|
<require idref="lufa.boards.dummy.avr8"/>
|
||||||
<generator value="as5_8"/>
|
<generator value="as5_8"/>
|
||||||
|
|
||||||
<device-support value="at90usb1287"/>
|
<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_CPU" value="16000000UL"/>
|
||||||
<build type="define" name="F_USB" value="8000000UL"/>
|
<build type="define" name="F_USB" value="16000000UL"/>
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
<module type="application" id="lufa.demos.device.lowlevel.audio_input" caption="Audio Input Device Demo (Low Level APIs)">
|
<module type="application" id="lufa.demos.device.lowlevel.audio_input" caption="Audio Input Device Demo (Low Level APIs)">
|
||||||
|
|
|
@ -62,12 +62,14 @@ int main(void)
|
||||||
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
||||||
void SetupHardware(void)
|
void SetupHardware(void)
|
||||||
{
|
{
|
||||||
|
#if (ARCH == ARCH_AVR8)
|
||||||
/* Disable watchdog if enabled by bootloader/fuses */
|
/* Disable watchdog if enabled by bootloader/fuses */
|
||||||
MCUSR &= ~(1 << WDRF);
|
MCUSR &= ~(1 << WDRF);
|
||||||
wdt_disable();
|
wdt_disable();
|
||||||
|
|
||||||
/* Disable clock division */
|
/* Disable clock division */
|
||||||
clock_prescale_set(clock_div_1);
|
clock_prescale_set(clock_div_1);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Hardware Initialization */
|
/* Hardware Initialization */
|
||||||
LEDs_Init();
|
LEDs_Init();
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
|
|
||||||
#include <LUFA/Drivers/USB/USB.h>
|
#include <LUFA/Drivers/USB/USB.h>
|
||||||
#include <LUFA/Drivers/Board/LEDs.h>
|
#include <LUFA/Drivers/Board/LEDs.h>
|
||||||
|
#include <LUFA/Platform/Platform.h>
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<asf xmlversion="1.0">
|
<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.demos.device.lowlevel.audio_output"/>
|
||||||
<require idref="lufa.boards.dummy.avr8"/>
|
<require idref="lufa.boards.dummy.avr8"/>
|
||||||
<generator value="as5_8"/>
|
<generator value="as5_8"/>
|
||||||
|
|
||||||
<device-support value="at90usb1287"/>
|
<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_CPU" value="16000000UL"/>
|
||||||
<build type="define" name="F_USB" value="8000000UL"/>
|
<build type="define" name="F_USB" value="16000000UL"/>
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
<module type="application" id="lufa.demos.device.lowlevel.audio_output" caption="Audio Output Device Demo (Low Level APIs)">
|
<module type="application" id="lufa.demos.device.lowlevel.audio_output" caption="Audio Output Device Demo (Low Level APIs)">
|
||||||
|
|
|
@ -85,6 +85,39 @@
|
||||||
// #define NO_AUTO_VBUS_MANAGEMENT
|
// #define NO_AUTO_VBUS_MANAGEMENT
|
||||||
// #define INVERTED_VBUS_ENABLE_LINE
|
// #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
|
#else
|
||||||
|
|
||||||
#error Unsupported architecture for this LUFA configuration file.
|
#error Unsupported architecture for this LUFA configuration file.
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
#define CDC2_RX_EPADDR (ENDPOINT_DIR_OUT | 5)
|
#define CDC2_RX_EPADDR (ENDPOINT_DIR_OUT | 5)
|
||||||
|
|
||||||
/** Endpoint address of the second CDC interface's device-to-host notification IN endpoint. */
|
/** 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. */
|
/** Size in bytes of the CDC device-to-host notification IN endpoints. */
|
||||||
#define CDC_NOTIFICATION_EPSIZE 8
|
#define CDC_NOTIFICATION_EPSIZE 8
|
||||||
|
|
|
@ -84,12 +84,24 @@ int main(void)
|
||||||
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
||||||
void SetupHardware(void)
|
void SetupHardware(void)
|
||||||
{
|
{
|
||||||
|
#if (ARCH == ARCH_AVR8)
|
||||||
/* Disable watchdog if enabled by bootloader/fuses */
|
/* Disable watchdog if enabled by bootloader/fuses */
|
||||||
MCUSR &= ~(1 << WDRF);
|
MCUSR &= ~(1 << WDRF);
|
||||||
wdt_disable();
|
wdt_disable();
|
||||||
|
|
||||||
/* Disable clock division */
|
/* Disable clock division */
|
||||||
clock_prescale_set(clock_div_1);
|
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 */
|
/* Hardware Initialization */
|
||||||
Joystick_Init();
|
Joystick_Init();
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#include <LUFA/Drivers/USB/USB.h>
|
#include <LUFA/Drivers/USB/USB.h>
|
||||||
#include <LUFA/Drivers/Board/Joystick.h>
|
#include <LUFA/Drivers/Board/Joystick.h>
|
||||||
#include <LUFA/Drivers/Board/LEDs.h>
|
#include <LUFA/Drivers/Board/LEDs.h>
|
||||||
|
#include <LUFA/Platform/Platform.h>
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
||||||
|
|
|
@ -13,6 +13,9 @@
|
||||||
* \li Series 7 USB AVRs (AT90USBxxx7)
|
* \li Series 7 USB AVRs (AT90USBxxx7)
|
||||||
* \li Series 6 USB AVRs (AT90USBxxx6)
|
* \li Series 6 USB AVRs (AT90USBxxx6)
|
||||||
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
* \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:
|
* \section Sec_Info USB Information:
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
<asf xmlversion="1.0">
|
<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.demos.device.lowlevel.dual_cdc"/>
|
||||||
<require idref="lufa.boards.dummy.avr8"/>
|
<require idref="lufa.boards.dummy.avr8"/>
|
||||||
<generator value="as5_8"/>
|
<generator value="as5_8"/>
|
||||||
|
|
||||||
<device-support value="at90usb1287"/>
|
<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_CPU" value="16000000UL"/>
|
||||||
<build type="define" name="F_USB" value="8000000UL"/>
|
<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>
|
</project>
|
||||||
|
|
||||||
<module type="application" id="lufa.demos.device.lowlevel.dual_cdc" caption="Dual Virtual Serial Device Demo (Low Level APIs)">
|
<module type="application" id="lufa.demos.device.lowlevel.dual_cdc" caption="Dual Virtual Serial Device Demo (Low Level APIs)">
|
||||||
|
|
|
@ -85,6 +85,39 @@
|
||||||
// #define NO_AUTO_VBUS_MANAGEMENT
|
// #define NO_AUTO_VBUS_MANAGEMENT
|
||||||
// #define INVERTED_VBUS_ENABLE_LINE
|
// #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
|
#else
|
||||||
|
|
||||||
#error Unsupported architecture for this LUFA configuration file.
|
#error Unsupported architecture for this LUFA configuration file.
|
||||||
|
|
|
@ -57,12 +57,24 @@ int main(void)
|
||||||
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
||||||
void SetupHardware(void)
|
void SetupHardware(void)
|
||||||
{
|
{
|
||||||
|
#if (ARCH == ARCH_AVR8)
|
||||||
/* Disable watchdog if enabled by bootloader/fuses */
|
/* Disable watchdog if enabled by bootloader/fuses */
|
||||||
MCUSR &= ~(1 << WDRF);
|
MCUSR &= ~(1 << WDRF);
|
||||||
wdt_disable();
|
wdt_disable();
|
||||||
|
|
||||||
/* Disable clock division */
|
/* Disable clock division */
|
||||||
clock_prescale_set(clock_div_1);
|
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 */
|
/* Hardware Initialization */
|
||||||
LEDs_Init();
|
LEDs_Init();
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
#include <LUFA/Drivers/USB/USB.h>
|
#include <LUFA/Drivers/USB/USB.h>
|
||||||
#include <LUFA/Drivers/Board/LEDs.h>
|
#include <LUFA/Drivers/Board/LEDs.h>
|
||||||
|
#include <LUFA/Platform/Platform.h>
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
* \li Series 6 USB AVRs (AT90USBxxx6)
|
* \li Series 6 USB AVRs (AT90USBxxx6)
|
||||||
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
||||||
* \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
|
* \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:
|
* \section Sec_Info USB Information:
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
<asf xmlversion="1.0">
|
<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.demos.device.lowlevel.generic_hid"/>
|
||||||
<require idref="lufa.boards.dummy.avr8"/>
|
<require idref="lufa.boards.dummy.avr8"/>
|
||||||
<generator value="as5_8"/>
|
<generator value="as5_8"/>
|
||||||
|
|
||||||
<device-support value="at90usb1287"/>
|
<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_CPU" value="16000000UL"/>
|
||||||
<build type="define" name="F_USB" value="8000000UL"/>
|
<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>
|
</project>
|
||||||
|
|
||||||
<module type="application" id="lufa.demos.device.lowlevel.generic_hid" caption="Generic HID Device Demo (Low Level APIs)">
|
<module type="application" id="lufa.demos.device.lowlevel.generic_hid" caption="Generic HID Device Demo (Low Level APIs)">
|
||||||
|
|
|
@ -85,6 +85,39 @@
|
||||||
// #define NO_AUTO_VBUS_MANAGEMENT
|
// #define NO_AUTO_VBUS_MANAGEMENT
|
||||||
// #define INVERTED_VBUS_ENABLE_LINE
|
// #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
|
#else
|
||||||
|
|
||||||
#error Unsupported architecture for this LUFA configuration file.
|
#error Unsupported architecture for this LUFA configuration file.
|
||||||
|
|
|
@ -56,12 +56,24 @@ int main(void)
|
||||||
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
||||||
void SetupHardware(void)
|
void SetupHardware(void)
|
||||||
{
|
{
|
||||||
|
#if (ARCH == ARCH_AVR8)
|
||||||
/* Disable watchdog if enabled by bootloader/fuses */
|
/* Disable watchdog if enabled by bootloader/fuses */
|
||||||
MCUSR &= ~(1 << WDRF);
|
MCUSR &= ~(1 << WDRF);
|
||||||
wdt_disable();
|
wdt_disable();
|
||||||
|
|
||||||
/* Disable clock division */
|
/* Disable clock division */
|
||||||
clock_prescale_set(clock_div_1);
|
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 */
|
/* Hardware Initialization */
|
||||||
Joystick_Init();
|
Joystick_Init();
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
#include <LUFA/Drivers/Board/Joystick.h>
|
#include <LUFA/Drivers/Board/Joystick.h>
|
||||||
#include <LUFA/Drivers/Board/LEDs.h>
|
#include <LUFA/Drivers/Board/LEDs.h>
|
||||||
#include <LUFA/Drivers/Board/Buttons.h>
|
#include <LUFA/Drivers/Board/Buttons.h>
|
||||||
|
#include <LUFA/Platform/Platform.h>
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
* \li Series 6 USB AVRs (AT90USBxxx6)
|
* \li Series 6 USB AVRs (AT90USBxxx6)
|
||||||
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
||||||
* \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
|
* \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:
|
* \section Sec_Info USB Information:
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
<asf xmlversion="1.0">
|
<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.demos.device.lowlevel.joystick"/>
|
||||||
<require idref="lufa.boards.dummy.avr8"/>
|
<require idref="lufa.boards.dummy.avr8"/>
|
||||||
<generator value="as5_8"/>
|
<generator value="as5_8"/>
|
||||||
|
|
||||||
<device-support value="at90usb1287"/>
|
<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_CPU" value="16000000UL"/>
|
||||||
<build type="define" name="F_USB" value="8000000UL"/>
|
<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>
|
</project>
|
||||||
|
|
||||||
<module type="application" id="lufa.demos.device.lowlevel.joystick" caption="Joystick HID Device Demo (Low Level APIs)">
|
<module type="application" id="lufa.demos.device.lowlevel.joystick" caption="Joystick HID Device Demo (Low Level APIs)">
|
||||||
|
|
|
@ -85,6 +85,39 @@
|
||||||
// #define NO_AUTO_VBUS_MANAGEMENT
|
// #define NO_AUTO_VBUS_MANAGEMENT
|
||||||
// #define INVERTED_VBUS_ENABLE_LINE
|
// #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
|
#else
|
||||||
|
|
||||||
#error Unsupported architecture for this LUFA configuration file.
|
#error Unsupported architecture for this LUFA configuration file.
|
||||||
|
|
|
@ -74,12 +74,24 @@ int main(void)
|
||||||
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
||||||
void SetupHardware(void)
|
void SetupHardware(void)
|
||||||
{
|
{
|
||||||
|
#if (ARCH == ARCH_AVR8)
|
||||||
/* Disable watchdog if enabled by bootloader/fuses */
|
/* Disable watchdog if enabled by bootloader/fuses */
|
||||||
MCUSR &= ~(1 << WDRF);
|
MCUSR &= ~(1 << WDRF);
|
||||||
wdt_disable();
|
wdt_disable();
|
||||||
|
|
||||||
/* Disable clock division */
|
/* Disable clock division */
|
||||||
clock_prescale_set(clock_div_1);
|
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 */
|
/* Hardware Initialization */
|
||||||
Joystick_Init();
|
Joystick_Init();
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
#include <LUFA/Drivers/Board/Joystick.h>
|
#include <LUFA/Drivers/Board/Joystick.h>
|
||||||
#include <LUFA/Drivers/Board/Buttons.h>
|
#include <LUFA/Drivers/Board/Buttons.h>
|
||||||
#include <LUFA/Drivers/Board/LEDs.h>
|
#include <LUFA/Drivers/Board/LEDs.h>
|
||||||
|
#include <LUFA/Platform/Platform.h>
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
* \li Series 6 USB AVRs (AT90USBxxx6)
|
* \li Series 6 USB AVRs (AT90USBxxx6)
|
||||||
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
||||||
* \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
|
* \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:
|
* \section Sec_Info USB Information:
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
<asf xmlversion="1.0">
|
<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.demos.device.lowlevel.keyboard"/>
|
||||||
<require idref="lufa.boards.dummy.avr8"/>
|
<require idref="lufa.boards.dummy.avr8"/>
|
||||||
<generator value="as5_8"/>
|
<generator value="as5_8"/>
|
||||||
|
|
||||||
<device-support value="at90usb1287"/>
|
<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_CPU" value="16000000UL"/>
|
||||||
<build type="define" name="F_USB" value="8000000UL"/>
|
<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>
|
</project>
|
||||||
|
|
||||||
<module type="application" id="lufa.demos.device.lowlevel.keyboard" caption="Keyboard HID Device Demo (Low Level APIs)">
|
<module type="application" id="lufa.demos.device.lowlevel.keyboard" caption="Keyboard HID Device Demo (Low Level APIs)">
|
||||||
|
|
|
@ -85,6 +85,39 @@
|
||||||
// #define NO_AUTO_VBUS_MANAGEMENT
|
// #define NO_AUTO_VBUS_MANAGEMENT
|
||||||
// #define INVERTED_VBUS_ENABLE_LINE
|
// #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
|
#else
|
||||||
|
|
||||||
#error Unsupported architecture for this LUFA configuration file.
|
#error Unsupported architecture for this LUFA configuration file.
|
||||||
|
|
|
@ -65,12 +65,24 @@ int main(void)
|
||||||
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
||||||
void SetupHardware(void)
|
void SetupHardware(void)
|
||||||
{
|
{
|
||||||
|
#if (ARCH == ARCH_AVR8)
|
||||||
/* Disable watchdog if enabled by bootloader/fuses */
|
/* Disable watchdog if enabled by bootloader/fuses */
|
||||||
MCUSR &= ~(1 << WDRF);
|
MCUSR &= ~(1 << WDRF);
|
||||||
wdt_disable();
|
wdt_disable();
|
||||||
|
|
||||||
/* Disable clock division */
|
/* Disable clock division */
|
||||||
clock_prescale_set(clock_div_1);
|
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 */
|
/* Hardware Initialization */
|
||||||
Joystick_Init();
|
Joystick_Init();
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
#include <LUFA/Drivers/Board/Joystick.h>
|
#include <LUFA/Drivers/Board/Joystick.h>
|
||||||
#include <LUFA/Drivers/Board/LEDs.h>
|
#include <LUFA/Drivers/Board/LEDs.h>
|
||||||
#include <LUFA/Drivers/Board/Buttons.h>
|
#include <LUFA/Drivers/Board/Buttons.h>
|
||||||
|
#include <LUFA/Platform/Platform.h>
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
* \li Series 6 USB AVRs (AT90USBxxx6)
|
* \li Series 6 USB AVRs (AT90USBxxx6)
|
||||||
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
||||||
* \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
|
* \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:
|
* \section Sec_Info USB Information:
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
<asf xmlversion="1.0">
|
<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.demos.device.lowlevel.keyboard_mouse"/>
|
||||||
<require idref="lufa.boards.dummy.avr8"/>
|
<require idref="lufa.boards.dummy.avr8"/>
|
||||||
<generator value="as5_8"/>
|
<generator value="as5_8"/>
|
||||||
|
|
||||||
<device-support value="at90usb1287"/>
|
<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_CPU" value="16000000UL"/>
|
||||||
<build type="define" name="F_USB" value="8000000UL"/>
|
<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>
|
</project>
|
||||||
|
|
||||||
<module type="application" id="lufa.demos.device.lowlevel.keyboard_mouse" caption="Keyboard and Mouse HID Device Demo (Low Level APIs)">
|
<module type="application" id="lufa.demos.device.lowlevel.keyboard_mouse" caption="Keyboard and Mouse HID Device Demo (Low Level APIs)">
|
||||||
|
|
|
@ -85,6 +85,39 @@
|
||||||
// #define NO_AUTO_VBUS_MANAGEMENT
|
// #define NO_AUTO_VBUS_MANAGEMENT
|
||||||
// #define INVERTED_VBUS_ENABLE_LINE
|
// #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
|
#else
|
||||||
|
|
||||||
#error Unsupported architecture for this LUFA configuration file.
|
#error Unsupported architecture for this LUFA configuration file.
|
||||||
|
|
|
@ -56,12 +56,24 @@ int main(void)
|
||||||
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
||||||
void SetupHardware(void)
|
void SetupHardware(void)
|
||||||
{
|
{
|
||||||
|
#if (ARCH == ARCH_AVR8)
|
||||||
/* Disable watchdog if enabled by bootloader/fuses */
|
/* Disable watchdog if enabled by bootloader/fuses */
|
||||||
MCUSR &= ~(1 << WDRF);
|
MCUSR &= ~(1 << WDRF);
|
||||||
wdt_disable();
|
wdt_disable();
|
||||||
|
|
||||||
/* Disable clock division */
|
/* Disable clock division */
|
||||||
clock_prescale_set(clock_div_1);
|
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 */
|
/* Hardware Initialization */
|
||||||
Joystick_Init();
|
Joystick_Init();
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
#include <LUFA/Drivers/Board/Joystick.h>
|
#include <LUFA/Drivers/Board/Joystick.h>
|
||||||
#include <LUFA/Drivers/Board/LEDs.h>
|
#include <LUFA/Drivers/Board/LEDs.h>
|
||||||
#include <LUFA/Drivers/Board/Buttons.h>
|
#include <LUFA/Drivers/Board/Buttons.h>
|
||||||
|
#include <LUFA/Platform/Platform.h>
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
* \li Series 6 USB AVRs (AT90USBxxx6)
|
* \li Series 6 USB AVRs (AT90USBxxx6)
|
||||||
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
||||||
* \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
|
* \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:
|
* \section Sec_Info USB Information:
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
<asf xmlversion="1.0">
|
<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.demos.device.lowlevel.midi"/>
|
||||||
<require idref="lufa.boards.dummy.avr8"/>
|
<require idref="lufa.boards.dummy.avr8"/>
|
||||||
<generator value="as5_8"/>
|
<generator value="as5_8"/>
|
||||||
|
|
||||||
<device-support value="at90usb1287"/>
|
<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_CPU" value="16000000UL"/>
|
||||||
<build type="define" name="F_USB" value="8000000UL"/>
|
<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>
|
</project>
|
||||||
|
|
||||||
<module type="application" id="lufa.demos.device.lowlevel.midi" caption="MIDI Device Demo (Low Level APIs)">
|
<module type="application" id="lufa.demos.device.lowlevel.midi" caption="MIDI Device Demo (Low Level APIs)">
|
||||||
|
|
|
@ -85,6 +85,39 @@
|
||||||
// #define NO_AUTO_VBUS_MANAGEMENT
|
// #define NO_AUTO_VBUS_MANAGEMENT
|
||||||
// #define INVERTED_VBUS_ENABLE_LINE
|
// #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
|
#else
|
||||||
|
|
||||||
#error Unsupported architecture for this LUFA configuration file.
|
#error Unsupported architecture for this LUFA configuration file.
|
||||||
|
|
|
@ -67,12 +67,24 @@ int main(void)
|
||||||
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
||||||
void SetupHardware(void)
|
void SetupHardware(void)
|
||||||
{
|
{
|
||||||
|
#if (ARCH == ARCH_AVR8)
|
||||||
/* Disable watchdog if enabled by bootloader/fuses */
|
/* Disable watchdog if enabled by bootloader/fuses */
|
||||||
MCUSR &= ~(1 << WDRF);
|
MCUSR &= ~(1 << WDRF);
|
||||||
wdt_disable();
|
wdt_disable();
|
||||||
|
|
||||||
/* Disable clock division */
|
/* Disable clock division */
|
||||||
clock_prescale_set(clock_div_1);
|
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 */
|
/* Hardware Initialization */
|
||||||
LEDs_Init();
|
LEDs_Init();
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
#include <LUFA/Drivers/USB/USB.h>
|
#include <LUFA/Drivers/USB/USB.h>
|
||||||
#include <LUFA/Drivers/Board/LEDs.h>
|
#include <LUFA/Drivers/Board/LEDs.h>
|
||||||
#include <LUFA/Drivers/Board/Dataflash.h>
|
#include <LUFA/Drivers/Board/Dataflash.h>
|
||||||
|
#include <LUFA/Platform/Platform.h>
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
* \li Series 6 USB AVRs (AT90USBxxx6)
|
* \li Series 6 USB AVRs (AT90USBxxx6)
|
||||||
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
||||||
* \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
|
* \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:
|
* \section Sec_Info USB Information:
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
<asf xmlversion="1.0">
|
<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.demos.device.lowlevel.mass_storage"/>
|
||||||
<require idref="lufa.boards.dummy.avr8"/>
|
<require idref="lufa.boards.dummy.avr8"/>
|
||||||
<generator value="as5_8"/>
|
<generator value="as5_8"/>
|
||||||
|
|
||||||
<device-support value="at90usb1287"/>
|
<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_CPU" value="16000000UL"/>
|
||||||
<build type="define" name="F_USB" value="8000000UL"/>
|
<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>
|
</project>
|
||||||
|
|
||||||
<module type="application" id="lufa.demos.device.lowlevel.mass_storage" caption="Mass Storage Device Demo (Low Level APIs)">
|
<module type="application" id="lufa.demos.device.lowlevel.mass_storage" caption="Mass Storage Device Demo (Low Level APIs)">
|
||||||
|
|
|
@ -85,6 +85,39 @@
|
||||||
// #define NO_AUTO_VBUS_MANAGEMENT
|
// #define NO_AUTO_VBUS_MANAGEMENT
|
||||||
// #define INVERTED_VBUS_ENABLE_LINE
|
// #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
|
#else
|
||||||
|
|
||||||
#error Unsupported architecture for this LUFA configuration file.
|
#error Unsupported architecture for this LUFA configuration file.
|
||||||
|
|
|
@ -73,12 +73,24 @@ int main(void)
|
||||||
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
||||||
void SetupHardware(void)
|
void SetupHardware(void)
|
||||||
{
|
{
|
||||||
|
#if (ARCH == ARCH_AVR8)
|
||||||
/* Disable watchdog if enabled by bootloader/fuses */
|
/* Disable watchdog if enabled by bootloader/fuses */
|
||||||
MCUSR &= ~(1 << WDRF);
|
MCUSR &= ~(1 << WDRF);
|
||||||
wdt_disable();
|
wdt_disable();
|
||||||
|
|
||||||
/* Disable clock division */
|
/* Disable clock division */
|
||||||
clock_prescale_set(clock_div_1);
|
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 */
|
/* Hardware Initialization */
|
||||||
Joystick_Init();
|
Joystick_Init();
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include <LUFA/Drivers/Board/Joystick.h>
|
#include <LUFA/Drivers/Board/Joystick.h>
|
||||||
#include <LUFA/Drivers/Board/LEDs.h>
|
#include <LUFA/Drivers/Board/LEDs.h>
|
||||||
#include <LUFA/Drivers/Board/Buttons.h>
|
#include <LUFA/Drivers/Board/Buttons.h>
|
||||||
|
#include <LUFA/Platform/Platform.h>
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
* \li Series 6 USB AVRs (AT90USBxxx6)
|
* \li Series 6 USB AVRs (AT90USBxxx6)
|
||||||
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
||||||
* \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
|
* \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:
|
* \section Sec_Info USB Information:
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
<asf xmlversion="1.0">
|
<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.demos.device.lowlevel.mouse"/>
|
||||||
<require idref="lufa.boards.dummy.avr8"/>
|
<require idref="lufa.boards.dummy.avr8"/>
|
||||||
<generator value="as5_8"/>
|
<generator value="as5_8"/>
|
||||||
|
|
||||||
<device-support value="at90usb1287"/>
|
<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_CPU" value="16000000UL"/>
|
||||||
<build type="define" name="F_USB" value="8000000UL"/>
|
<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>
|
</project>
|
||||||
|
|
||||||
<module type="application" id="lufa.demos.device.lowlevel.mouse" caption="Mouse HID Device Demo (Low Level APIs)">
|
<module type="application" id="lufa.demos.device.lowlevel.mouse" caption="Mouse HID Device Demo (Low Level APIs)">
|
||||||
|
|
|
@ -85,6 +85,39 @@
|
||||||
// #define NO_AUTO_VBUS_MANAGEMENT
|
// #define NO_AUTO_VBUS_MANAGEMENT
|
||||||
// #define INVERTED_VBUS_ENABLE_LINE
|
// #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
|
#else
|
||||||
|
|
||||||
#error Unsupported architecture for this LUFA configuration file.
|
#error Unsupported architecture for this LUFA configuration file.
|
||||||
|
|
|
@ -62,12 +62,24 @@ int main(void)
|
||||||
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
||||||
void SetupHardware(void)
|
void SetupHardware(void)
|
||||||
{
|
{
|
||||||
|
#if (ARCH == ARCH_AVR8)
|
||||||
/* Disable watchdog if enabled by bootloader/fuses */
|
/* Disable watchdog if enabled by bootloader/fuses */
|
||||||
MCUSR &= ~(1 << WDRF);
|
MCUSR &= ~(1 << WDRF);
|
||||||
wdt_disable();
|
wdt_disable();
|
||||||
|
|
||||||
/* Disable clock division */
|
/* Disable clock division */
|
||||||
clock_prescale_set(clock_div_1);
|
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 */
|
/* Hardware Initialization */
|
||||||
LEDs_Init();
|
LEDs_Init();
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
#include <LUFA/Drivers/USB/USB.h>
|
#include <LUFA/Drivers/USB/USB.h>
|
||||||
#include <LUFA/Drivers/Board/LEDs.h>
|
#include <LUFA/Drivers/Board/LEDs.h>
|
||||||
#include <LUFA/Drivers/Peripheral/Serial.h>
|
#include <LUFA/Drivers/Peripheral/Serial.h>
|
||||||
|
#include <LUFA/Platform/Platform.h>
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
/** Notification value to indicate that a frame is ready to be read by the host. */
|
/** Notification value to indicate that a frame is ready to be read by the host. */
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
*
|
*
|
||||||
* \li Series 7 USB AVRs (AT90USBxxx7)
|
* \li Series 7 USB AVRs (AT90USBxxx7)
|
||||||
* \li Series 6 USB AVRs (AT90USBxxx6)
|
* \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:
|
* \section Sec_Info USB Information:
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
<asf xmlversion="1.0">
|
<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.demos.device.lowlevel.rndis"/>
|
||||||
<require idref="lufa.boards.dummy.avr8"/>
|
<require idref="lufa.boards.dummy.avr8"/>
|
||||||
<generator value="as5_8"/>
|
<generator value="as5_8"/>
|
||||||
|
|
||||||
<device-support value="at90usb1287"/>
|
<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_CPU" value="16000000UL"/>
|
||||||
<build type="define" name="F_USB" value="8000000UL"/>
|
<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>
|
</project>
|
||||||
|
|
||||||
<module type="application" id="lufa.demos.device.lowlevel.rndis" caption="RNDIS Ethernet Device Demo (Low Level APIs)">
|
<module type="application" id="lufa.demos.device.lowlevel.rndis" caption="RNDIS Ethernet Device Demo (Low Level APIs)">
|
||||||
|
|
|
@ -85,6 +85,39 @@
|
||||||
// #define NO_AUTO_VBUS_MANAGEMENT
|
// #define NO_AUTO_VBUS_MANAGEMENT
|
||||||
// #define INVERTED_VBUS_ENABLE_LINE
|
// #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
|
#else
|
||||||
|
|
||||||
#error Unsupported architecture for this LUFA configuration file.
|
#error Unsupported architecture for this LUFA configuration file.
|
||||||
|
|
|
@ -70,12 +70,24 @@ int main(void)
|
||||||
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
/** Configures the board hardware and chip peripherals for the demo's functionality. */
|
||||||
void SetupHardware(void)
|
void SetupHardware(void)
|
||||||
{
|
{
|
||||||
|
#if (ARCH == ARCH_AVR8)
|
||||||
/* Disable watchdog if enabled by bootloader/fuses */
|
/* Disable watchdog if enabled by bootloader/fuses */
|
||||||
MCUSR &= ~(1 << WDRF);
|
MCUSR &= ~(1 << WDRF);
|
||||||
wdt_disable();
|
wdt_disable();
|
||||||
|
|
||||||
/* Disable clock division */
|
/* Disable clock division */
|
||||||
clock_prescale_set(clock_div_1);
|
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 */
|
/* Hardware Initialization */
|
||||||
Joystick_Init();
|
Joystick_Init();
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#include <LUFA/Drivers/USB/USB.h>
|
#include <LUFA/Drivers/USB/USB.h>
|
||||||
#include <LUFA/Drivers/Board/Joystick.h>
|
#include <LUFA/Drivers/Board/Joystick.h>
|
||||||
#include <LUFA/Drivers/Board/LEDs.h>
|
#include <LUFA/Drivers/Board/LEDs.h>
|
||||||
|
#include <LUFA/Platform/Platform.h>
|
||||||
|
|
||||||
/* Macros: */
|
/* Macros: */
|
||||||
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
/** LED mask for the library LED driver, to indicate that the USB interface is not ready. */
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
* \li Series 6 USB AVRs (AT90USBxxx6)
|
* \li Series 6 USB AVRs (AT90USBxxx6)
|
||||||
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
* \li Series 4 USB AVRs (ATMEGAxxU4)
|
||||||
* \li Series 2 USB AVRs (AT90USBxx2, ATMEGAxxU2)
|
* \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:
|
* \section Sec_Info USB Information:
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
<asf xmlversion="1.0">
|
<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.demos.device.lowlevel.cdc"/>
|
||||||
<require idref="lufa.boards.dummy.avr8"/>
|
<require idref="lufa.boards.dummy.avr8"/>
|
||||||
<generator value="as5_8"/>
|
<generator value="as5_8"/>
|
||||||
|
|
||||||
<device-support value="at90usb1287"/>
|
<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_CPU" value="16000000UL"/>
|
||||||
<build type="define" name="F_USB" value="8000000UL"/>
|
<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>
|
</project>
|
||||||
|
|
||||||
<module type="application" id="lufa.demos.device.lowlevel.cdc" caption="Virtual Serial CDC Device Demo (Low Level APIs)">
|
<module type="application" id="lufa.demos.device.lowlevel.cdc" caption="Virtual Serial CDC Device Demo (Low Level APIs)">
|
||||||
|
|
Loading…
Reference in New Issue