Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0c993a2
Duplicated xmega files into avr-dx folder
echoromeo Mar 1, 2024
a975c00
renaming filenames from XMEGA to AVR_Dx
echoromeo Mar 1, 2024
6c8b03f
Search-and-replace XMEGA to AVR Dx in files
echoromeo Mar 1, 2024
753ce77
Adding intitial ARCH == ARCH_AVRDX
echoromeo Mar 1, 2024
4b55b46
Clock Management register updates for Dx
echoromeo Mar 1, 2024
e90c781
USB Intterrupts updated for Dx
echoromeo Mar 1, 2024
38dbce3
Updated the USBController for Dx
echoromeo Mar 1, 2024
937179d
Device updated for Dx
echoromeo Mar 1, 2024
d022ad5
Endpoint updated for Dx
echoromeo Mar 1, 2024
c560928
Serial updated for Dx
echoromeo Mar 1, 2024
ce49190
SPI Updated for Dx
echoromeo Mar 4, 2024
3deb24b
TWI updated for Dx
echoromeo Mar 4, 2024
698f0d0
Updated board files for AVR DU CNANO
echoromeo Mar 4, 2024
4369ee7
Renaming files and folders according to ARCH
echoromeo Mar 6, 2024
448563a
BuildTests updated for AVR Dx
echoromeo Mar 6, 2024
c5ee47f
Build failures fix
echoromeo Mar 6, 2024
041041b
Remove LowSpeed FullSpeed after buildtest fail
echoromeo Mar 7, 2024
33d50e6
DoubleSpeed
echoromeo Mar 7, 2024
3c6a82b
Removing Banks
echoromeo Mar 7, 2024
ead85aa
Renamed folder to AVRDX
echoromeo Mar 7, 2024
7c53e50
Bugfixes for making it build and run
echoromeo Mar 7, 2024
802b8c3
Added AVRDX to all LUFAConfig.h with support for XMEGA
echoromeo Mar 7, 2024
3e47efc
Added AVR Dx to SetupHardware for all Device demos with XMEGA support
echoromeo Mar 7, 2024
17d0667
Missing Buttons_GetStatus from BOARD_NONE
echoromeo Mar 8, 2024
4a50a9d
Added !defined(BOARD_HAS_x to BOARD_NONE
echoromeo Mar 8, 2024
2fee4fa
Reverting the include stuff
echoromeo Mar 8, 2024
ceec16c
Comments and pinconfig
echoromeo Mar 8, 2024
a0a614a
Reverting Banks
echoromeo Mar 8, 2024
93bd849
Added DU as compatible
echoromeo Mar 8, 2024
2c31956
ENDPOINT_TABLE_COUNT= USB_MAX_ENDPOINTS
echoromeo Sep 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions BuildTests/BoardDriverTest/BoardDeviceMap.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,6 @@ BOARD_EVK1101 = UC3 : uc3b0256 :
BOARD_EVK1104 = UC3 : uc3a3256 :
BOARD_UC3A3_XPLAINED = UC3 : uc3a3256 :
#
# ----------------- AVRDX Boards -----------------
BOARD_AVR64DU32_CNANO = AVRDX : avr64du32 :
#
1 change: 1 addition & 0 deletions BuildTests/BoardDriverTest/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ clean:
$(MAKE) -f makefile.test clean BOARD=NONE ARCH=AVR8 MCU=at90usb1287
$(MAKE) -f makefile.test clean BOARD=NONE ARCH=XMEGA MCU=atxmega128a1u
$(MAKE) -f makefile.test clean BOARD=NONE ARCH=UC3 MCU=uc3a0256
$(MAKE) -f makefile.test clean BOARD=NONE ARCH=AVRDX MCU=avr64du32

%:

Expand Down
5 changes: 5 additions & 0 deletions BuildTests/ModuleTest/Modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,9 @@
#include <LUFA/Drivers/Peripheral/SerialSPI.h>
#include <LUFA/Drivers/Peripheral/SPI.h>
#include <LUFA/Drivers/Peripheral/TWI.h>
#elif (ARCH == ARCH_AVRDX)
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/Peripheral/SerialSPI.h>
#include <LUFA/Drivers/Peripheral/SPI.h>
#include <LUFA/Drivers/Peripheral/TWI.h>
#endif
11 changes: 9 additions & 2 deletions BuildTests/ModuleTest/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,18 @@ LUFA_PATH := ../../LUFA/
AVR8_FAMILIES := at90usb1287 at90usb1286 atmega16u4 atmega16u2 at90usb162
XMEGA_FAMILIES := atxmega128a1u atxmega128a3u atxmega256a3bu atxmega128a4u atxmega128b1 atxmega128b3 atxmega128c3 atxmega32c4
UC3_FAMILIES := uc3a0256 uc3a1256 uc3a3256 uc3a4256 uc3b0256 uc3b1256
AVRDX_FAMILIES := avr64du28 avr64du32

# List of all device families, with a family postfix
DEVICE_FAMILIES := $(AVR8_FAMILIES:%=%.avr8) $(XMEGA_FAMILIES:%=%.xmega) $(UC3_FAMILIES:%=%.uc3)
DEVICE_FAMILIES := $(AVR8_FAMILIES:%=%.avr8) $(XMEGA_FAMILIES:%=%.xmega) $(UC3_FAMILIES:%=%.uc3) $(AVRDX_FAMILIES:%=%.avrdx)


all: begin $(DEVICE_FAMILIES) clean end

arch_avr8: begin $(AVR8_FAMILIES:%=%.avr8) end
arch_xmega: begin $(XMEGA_FAMILIES:%=%.xmega) end
arch_uc3: begin $(UC3_FAMILIES:%=%.uc3) end
arch_avrdx: begin $(AVRDX_FAMILIES:%=%.avrdx) end

begin:
@echo Executing build test "ModuleTest".
Expand All @@ -53,14 +55,19 @@ end:
@echo Building ModuleTest for ARCH=UC3 MCU=$(@:%.uc3=%)...
$(MAKE) -f makefile.test clean elf ARCH=UC3 MCU=$(@:%.uc3=%)

%.avrdx:
@echo Building ModuleTest for ARCH=AVRDX MCU=$(@:%.avrdx=%)...
$(MAKE) -f makefile.test clean elf ARCH=AVRDX MCU=$(@:%.avrdx=%)

clean:
$(MAKE) -f makefile.test clean ARCH=AVR8 MCU=$(firstword $(AVR8_FAMILIES))
$(MAKE) -f makefile.test clean ARCH=XMEGA MCU=$(firstword $(XMEGA_FAMILIES))
$(MAKE) -f makefile.test clean ARCH=UC3 MCU=$(firstword $(UC3_FAMILIES))
$(MAKE) -f makefile.test clean ARCH=AVRDX MCU=$(firstword $(AVRDX_FAMILIES))

%:

.PHONY: all arch_avr8 arch_xmega arch_uc3 begin end
.PHONY: all arch_avr8 arch_xmega arch_uc3 arch_avrdx begin end

# Include common DMBS build system modules
DMBS_PATH ?= $(LUFA_PATH)/Build/DMBS/DMBS
Expand Down
2 changes: 2 additions & 0 deletions BuildTests/ModuleTest/makefile.test
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ else ifeq ($(ARCH), XMEGA)
F_USB = 48000000
else ifeq ($(ARCH), UC3)
F_USB = 48000000
else ifeq ($(ARCH), AVRDX)
F_USB = 48000000
endif

# Generic C/C++ compiler flags
Expand Down
4 changes: 4 additions & 0 deletions BuildTests/SingleUSBModeTest/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ compile:
@echo Building SingleUSBModeTest for ARCH=UC3 in host only mode...
$(MAKE) -f makefile.test clean elf ARCH=UC3 MCU=uc3a0256 CC_FLAGS='-D USB_HOST_ONLY'

@echo Building SingleUSBModeTest for ARCH=AVRDX in device only mode...
$(MAKE) -f makefile.test clean elf ARCH=AVRDX MCU=avr64du32 CC_FLAGS='-D USB_DEVICE_ONLY'

clean:
$(MAKE) -f makefile.test clean ARCH=AVR8 MCU=at90usb1287
$(MAKE) -f makefile.test clean ARCH=XMEGA MCU=atxmega128a1u
$(MAKE) -f makefile.test clean ARCH=UC3 MCU=uc3a0256
$(MAKE) -f makefile.test clean ARCH=AVRDX MCU=avr64du32

%:

Expand Down
2 changes: 2 additions & 0 deletions BuildTests/SingleUSBModeTest/makefile.test
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ else ifeq ($(ARCH), XMEGA)
F_USB = 48000000
else ifeq ($(ARCH), UC3)
F_USB = 48000000
else ifeq ($(ARCH), AVRDX)
F_USB = 48000000
endif

OPTIMIZATION = 1
Expand Down
4 changes: 4 additions & 0 deletions Demos/Device/ClassDriver/CCID/CCID.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ void SetupHardware(void)
XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);

PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
#elif (ARCH == ARCH_AVRDX)
/* Configure the OSCHF to run at F_CPU with SOF Autotune enabled */
AVRDXCLK_ConfigureOSCHF(F_CPU, AUTOTUNE_SOF_BIN);
AVRDXCLK_SetCPUClockSource(CLOCK_SRC_INT_OSCHF);
#endif

/* Hardware Initialization */
Expand Down
1 change: 1 addition & 0 deletions Demos/Device/ClassDriver/CCID/CCID.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
* \li Series B XMEGA AVRs (ATXMEGAxxxBx)
* \li Series C XMEGA AVRs (ATXMEGAxxxCx)
* \li Series DU AVRs (AVRxxDUxx)
*
* \section Sec_Info USB Information:
*
Expand Down
33 changes: 33 additions & 0 deletions Demos/Device/ClassDriver/CCID/Config/LUFAConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,39 @@
// #define CONTROL_ONLY_DEVICE
#define MAX_ENDPOINT_INDEX 4
// #define NO_DEVICE_REMOTE_WAKEUP
// #define NO_DEVICE_SELF_POWER

#elif (ARCH == ARCH_AVRDX)

/* 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_OPT_USBVREG_ENABLE | 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
Expand Down
33 changes: 33 additions & 0 deletions Demos/Device/ClassDriver/DualMIDI/Config/LUFAConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,39 @@
// #define CONTROL_ONLY_DEVICE
#define MAX_ENDPOINT_INDEX 2
// #define NO_DEVICE_REMOTE_WAKEUP
// #define NO_DEVICE_SELF_POWER

#elif (ARCH == ARCH_AVRDX)

/* 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_OPT_USBVREG_ENABLE | 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
Expand Down
4 changes: 4 additions & 0 deletions Demos/Device/ClassDriver/DualMIDI/DualMIDI.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ void SetupHardware(void)
XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);

PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
#elif (ARCH == ARCH_AVRDX)
/* Configure the OSCHF to run at F_CPU with SOF Autotune enabled */
AVRDXCLK_ConfigureOSCHF(F_CPU, AUTOTUNE_SOF_BIN);
AVRDXCLK_SetCPUClockSource(CLOCK_SRC_INT_OSCHF);
#endif

/* Hardware Initialization */
Expand Down
1 change: 1 addition & 0 deletions Demos/Device/ClassDriver/DualMIDI/DualMIDI.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
* \li Series B XMEGA AVRs (ATXMEGAxxxBx)
* \li Series C XMEGA AVRs (ATXMEGAxxxCx)
* \li Series DU AVRs (AVRxxDUxx)
*
* \section Sec_Info USB Information:
*
Expand Down
33 changes: 33 additions & 0 deletions Demos/Device/ClassDriver/DualVirtualSerial/Config/LUFAConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,39 @@
// #define CONTROL_ONLY_DEVICE
#define MAX_ENDPOINT_INDEX 6
// #define NO_DEVICE_REMOTE_WAKEUP
// #define NO_DEVICE_SELF_POWER

#elif (ARCH == ARCH_AVRDX)

/* 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_OPT_USBVREG_ENABLE | 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ void SetupHardware(void)
XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);

PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
#elif (ARCH == ARCH_AVRDX)
/* Configure the OSCHF to run at F_CPU with SOF Autotune enabled */
AVRDXCLK_ConfigureOSCHF(F_CPU, AUTOTUNE_SOF_BIN);
AVRDXCLK_SetCPUClockSource(CLOCK_SRC_INT_OSCHF);
#endif

/* Hardware Initialization */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
* \li Series B XMEGA AVRs (ATXMEGAxxxBx)
* \li Series C XMEGA AVRs (ATXMEGAxxxCx)
* \li Series DU AVRs (AVRxxDUxx)
*
* \section Sec_Info USB Information:
*
Expand Down
33 changes: 33 additions & 0 deletions Demos/Device/ClassDriver/GenericHID/Config/LUFAConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,39 @@
// #define CONTROL_ONLY_DEVICE
#define MAX_ENDPOINT_INDEX 1
// #define NO_DEVICE_REMOTE_WAKEUP
// #define NO_DEVICE_SELF_POWER

#elif (ARCH == ARCH_AVRDX)

/* 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_OPT_USBVREG_ENABLE | 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
Expand Down
4 changes: 4 additions & 0 deletions Demos/Device/ClassDriver/GenericHID/GenericHID.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ void SetupHardware(void)
XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);

PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
#elif (ARCH == ARCH_AVRDX)
/* Configure the OSCHF to run at F_CPU with SOF Autotune enabled */
AVRDXCLK_ConfigureOSCHF(F_CPU, AUTOTUNE_SOF_BIN);
AVRDXCLK_SetCPUClockSource(CLOCK_SRC_INT_OSCHF);
#endif

/* Hardware Initialization */
Expand Down
1 change: 1 addition & 0 deletions Demos/Device/ClassDriver/GenericHID/GenericHID.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
* \li Series B XMEGA AVRs (ATXMEGAxxxBx)
* \li Series C XMEGA AVRs (ATXMEGAxxxCx)
* \li Series DU AVRs (AVRxxDUxx)
*
* \section Sec_Info USB Information:
*
Expand Down
33 changes: 33 additions & 0 deletions Demos/Device/ClassDriver/Joystick/Config/LUFAConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,39 @@
// #define CONTROL_ONLY_DEVICE
#define MAX_ENDPOINT_INDEX 1
// #define NO_DEVICE_REMOTE_WAKEUP
// #define NO_DEVICE_SELF_POWER

#elif (ARCH == ARCH_AVRDX)

/* 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_OPT_USBVREG_ENABLE | 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
Expand Down
4 changes: 4 additions & 0 deletions Demos/Device/ClassDriver/Joystick/Joystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ void SetupHardware(void)
XMEGACLK_StartDFLL(CLOCK_SRC_INT_RC32MHZ, DFLL_REF_INT_USBSOF, F_USB);

PMIC.CTRL = PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
#elif (ARCH == ARCH_AVRDX)
/* Configure the OSCHF to run at F_CPU with SOF Autotune enabled */
AVRDXCLK_ConfigureOSCHF(F_CPU, AUTOTUNE_SOF_BIN);
AVRDXCLK_SetCPUClockSource(CLOCK_SRC_INT_OSCHF);
#endif

/* Hardware Initialization */
Expand Down
1 change: 1 addition & 0 deletions Demos/Device/ClassDriver/Joystick/Joystick.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* \li Series AU XMEGA AVRs (ATXMEGAxxxAxU)
* \li Series B XMEGA AVRs (ATXMEGAxxxBx)
* \li Series C XMEGA AVRs (ATXMEGAxxxCx)
* \li Series DU AVRs (AVRxxDUxx)
*
* \section Sec_Info USB Information:
*
Expand Down
Loading