conf_usb.h
UDI HID KBD Single
#ifndef _CONF_USB_H_
#define _CONF_USB_H_
#warning You must refill the following definitions with a correct values
#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL
#define USB_DEVICE_PRODUCT_ID USB_PID_ATMEL_ASF_MSC
#define USB_DEVICE_MAJOR_VERSION 1
#define USB_DEVICE_MINOR_VERSION 0
#define USB_DEVICE_POWER 100 // Consumption on VBUS line (mA)
#define USB_DEVICE_ATTR \
(USB_CONFIG_ATTR_SELF_POWERED)
#define USB_DEVICE_SERIAL_NAME "12...EF" // Disk SN for MSC
#if (UC3A3||UC3A4)
#endif
#define UDI_MSC_GLOBAL_VENDOR_ID \
'A', 'T', 'M', 'E', 'L', ' ', ' ', ' '
#define UDI_MSC_GLOBAL_PRODUCT_VERSION \
'1', '.', '0', '0'
#define UDI_MSC_ENABLE_EXT() true
#define UDI_MSC_DISABLE_EXT()
#define UDI_MSC_NOTIFY_TRANS_EXT()
#endif // _CONF_USB_H_
UDI HID KBD Multiple (Composite)
#ifndef _CONF_USB_H_
#define _CONF_USB_H_
#warning You must refill the following definitions with a correct values
#define USB_DEVICE_VENDOR_ID USB_VID_ATMEL
#define USB_DEVICE_PRODUCT_ID 0xFFFF
#define USB_DEVICE_MAJOR_VERSION 1
#define USB_DEVICE_MINOR_VERSION 0
#define USB_DEVICE_POWER 100 // Consumption on VBUS line (mA)
#define USB_DEVICE_ATTR \
(USB_CONFIG_ATTR_SELF_POWERED)
#if (UC3A3||UC3A4)
#endif
#define USB_DEVICE_EP_CTRL_SIZE 64
#define USB_DEVICE_NB_INTERFACE 1 // 1 or more
#define USB_DEVICE_MAX_EP 1 // 0 to max endpoint requested by interfaces
#define UDI_CDC_PORT_NB 1
#define UDI_CDC_ENABLE_EXT(port) true
#define UDI_CDC_DISABLE_EXT(port)
#define UDI_CDC_RX_NOTIFY(port)
#define UDI_CDC_TX_EMPTY_NOTIFY(port)
#define UDI_CDC_SET_CODING_EXT(port,cfg)
#define UDI_CDC_SET_DTR_EXT(port,set)
#define UDI_CDC_SET_RTS_EXT(port,set)
#define UDI_CDC_LOW_RATE
#define UDI_CDC_DEFAULT_RATE 115200
#define UDI_CDC_DEFAULT_STOPBITS CDC_STOP_BITS_1
#define UDI_CDC_DEFAULT_PARITY CDC_PAR_NONE
#define UDI_CDC_DEFAULT_DATABITS 8
#define UDI_CDC_DATA_EP_IN_0 (1 | USB_EP_DIR_IN) // TX
#define UDI_CDC_DATA_EP_OUT_0 (2 | USB_EP_DIR_OUT) // RX
#define UDI_CDC_COMM_EP_0 (3 | USB_EP_DIR_IN) // Notify endpoint
#define UDI_CDC_DATA_EP_IN_2 (4 | USB_EP_DIR_IN) // TX
#define UDI_CDC_DATA_EP_OUT_2 (5 | USB_EP_DIR_OUT) // RX
#define UDI_CDC_COMM_EP_2 (6 | USB_EP_DIR_IN) // Notify endpoint
#define UDI_CDC_DATA_EP_IN_3 (7 | USB_EP_DIR_IN) // TX
#define UDI_CDC_DATA_EP_OUT_3 (8 | USB_EP_DIR_OUT) // RX
#define UDI_CDC_COMM_EP_3 (9 | USB_EP_DIR_IN) // Notify endpoint
#define UDI_CDC_COMM_IFACE_NUMBER_0 0
#define UDI_CDC_DATA_IFACE_NUMBER_0 1
#define UDI_CDC_COMM_IFACE_NUMBER_2 2
#define UDI_CDC_DATA_IFACE_NUMBER_2 3
#define UDI_CDC_COMM_IFACE_NUMBER_3 4
#define UDI_CDC_DATA_IFACE_NUMBER_3 5
#define UDI_MSC_GLOBAL_VENDOR_ID \
'A', 'T', 'M', 'E', 'L', ' ', ' ', ' '
#define UDI_MSC_GLOBAL_PRODUCT_VERSION \
'1', '.', '0', '0'
#define UDI_MSC_ENABLE_EXT() true
#define UDI_MSC_DISABLE_EXT()
#define UDI_MSC_NOTIFY_TRANS_EXT()
#define UDI_MSC_EP_IN (1 | USB_EP_DIR_IN)
#define UDI_MSC_EP_OUT (2 | USB_EP_DIR_OUT)
#define UDI_MSC_IFACE_NUMBER 0
#define UDI_HID_MOUSE_ENABLE_EXT() true
#define UDI_HID_MOUSE_DISABLE_EXT()
#define UDI_HID_MOUSE_EP_IN (1 | USB_EP_DIR_IN)
#define UDI_HID_MOUSE_IFACE_NUMBER 0
#define UDI_HID_KBD_ENABLE_EXT() true
#define UDI_HID_KBD_DISABLE_EXT()
#define UDI_HID_KBD_CHANGE_LED(value)
#define UDI_HID_KBD_EP_IN (1 | USB_EP_DIR_IN)
#define UDI_HID_KBD_IFACE_NUMBER 0
#define UDI_HID_GENERIC_ENABLE_EXT() true
#define UDI_HID_GENERIC_DISABLE_EXT()
#define UDI_HID_GENERIC_REPORT_OUT(ptr)
#define UDI_HID_GENERIC_SET_FEATURE(f)
#define UDI_HID_REPORT_IN_SIZE 64
#define UDI_HID_REPORT_OUT_SIZE 64
#define UDI_HID_REPORT_FEATURE_SIZE 4
#define UDI_HID_GENERIC_EP_SIZE 64
#define UDI_HID_GENERIC_EP_OUT (2 | USB_EP_DIR_OUT)
#define UDI_HID_GENERIC_EP_IN (1 | USB_EP_DIR_IN)
#define UDI_HID_GENERIC_IFACE_NUMBER 0
#define UDI_PHDC_ENABLE_EXT() true
#define UDI_PHDC_DISABLE_EXT()
#define UDI_PHDC_DATAMSG_FORMAT USB_PHDC_DATAMSG_FORMAT_11073_20601
#define UDI_PHDC_SPECIALIZATION {0x2345} // Define in 11073_20601
#define UDI_PHDC_QOS_OUT \
(USB_PHDC_QOS_MEDIUM_BETTER|USB_PHDC_QOS_HIGH_BEST)
#define UDI_PHDC_QOS_IN \
(USB_PHDC_QOS_LOW_GOOD|USB_PHDC_QOS_MEDIUM_BETTER|USB_PHDC_QOS_MEDIUM_BEST)
#define UDI_PHDC_METADATA_DESC_BULK_IN {0x01,0x02,0x03}
#define UDI_PHDC_METADATA_DESC_BULK_OUT {0x01,0x02,0x03}
#define UDI_PHDC_METADATA_DESC_INT_IN {0x01,0x02,0x03}
#define UDI_PHDC_EP_BULK_OUT (1 | USB_EP_DIR_OUT)
#define UDI_PHDC_EP_BULK_IN (2 | USB_EP_DIR_IN)
#if ((UDI_PHDC_QOS_IN&USB_PHDC_QOS_LOW_GOOD)==USB_PHDC_QOS_LOW_GOOD)
# define UDI_PHDC_EP_INTERRUPT_IN (3 | USB_EP_DIR_IN)
#endif
#define UDI_PHDC_EP_SIZE_BULK_OUT 32
#define UDI_PHDC_EP_SIZE_BULK_IN 32
#define UDI_PHDC_EP_SIZE_INT_IN 8
#define UDI_PHDC_IFACE_NUMBER 0
#define UDI_VENDOR_ENABLE_EXT() true
#define UDI_VENDOR_DISABLE_EXT()
#define UDI_VENDOR_SETUP_OUT_RECEIVED() false
#define UDI_VENDOR_SETUP_IN_RECEIVED() false
#define UDI_VENDOR_EPS_SIZE_INT_FS 64
#define UDI_VENDOR_EPS_SIZE_BULK_FS 64
#define UDI_VENDOR_EPS_SIZE_ISO_FS 256
#define UDI_VENDOR_EPS_SIZE_INT_HS 64
#define UDI_VENDOR_EPS_SIZE_BULK_HS 512
#define UDI_VENDOR_EPS_SIZE_ISO_HS 64
#define UDI_VENDOR_EP_INTERRUPT_IN (1 | USB_EP_DIR_IN)
#define UDI_VENDOR_EP_INTERRUPT_OUT (2 | USB_EP_DIR_OUT)
#define UDI_VENDOR_EP_BULK_IN (3 | USB_EP_DIR_IN)
#define UDI_VENDOR_EP_BULK_OUT (4 | USB_EP_DIR_OUT)
#define UDI_VENDOR_EP_ISO_IN (5 | USB_EP_DIR_IN)
#define UDI_VENDOR_EP_ISO_OUT (6 | USB_EP_DIR_OUT)
#define UDI_VENDOR_IFACE_NUMBER 0
#define UDI_COMPOSITE_DESC_T
#define UDI_COMPOSITE_DESC_FS
#define UDI_COMPOSITE_DESC_HS
#define UDI_COMPOSITE_API
#endif // _CONF_USB_H_
conf_clock.h
AT32UC3A0, AT32UC3A1, AT32UC3B Devices (USBB)
#ifndef CONF_CLOCK_H_INCLUDED
#define CONF_CLOCK_H_INCLUDED
#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
#define CONFIG_PLL0_MUL 8
#define CONFIG_PLL0_DIV 2
#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
#define CONFIG_USBCLK_DIV 1
#endif
AT32UC3C, ATUCXXD, ATUCXXL3U, ATUCXXL4U Devices (USBC)
#ifndef CONF_CLOCK_H_INCLUDED
#define CONF_CLOCK_H_INCLUDED
#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLL0
#define CONFIG_PLL0_SOURCE PLL_SRC_OSC0
#define CONFIG_PLL0_MUL 8
#define CONFIG_PLL0_DIV 2
#define CONFIG_USBCLK_SOURCE USBCLK_SRC_PLL0
#define CONFIG_USBCLK_DIV 1
#endif
SAM3X and SAM3A Devices (UOTGHS: USB OTG High Speed)
#ifndef CONF_CLOCK_H_INCLUDED
#define CONF_CLOCK_H_INCLUDED
#define CONFIG_SYSCLK_SOURCE SYSCLK_SRC_PLLACK
#define CONFIG_SYSCLK_PRES SYSCLK_PRES_2
#define CONFIG_PLL0_SOURCE PLL_SRC_MAINCK_XTAL
#define CONFIG_PLL0_MUL 14
#define CONFIG_PLL0_DIV 1
#define CONFIG_USBCLK_SOURCE USBCLK_SRC_UPLL
#define CONFIG_USBCLK_DIV 1
#endif
conf_clocks.h
SAM D21 Device (USB)
#ifndef CONF_CLOCKS_H_INCLUDED
# define CONF_CLOCKS_H_INCLUDED
# define CONF_CLOCK_CPU_CLOCK_FAILURE_DETECT false
# define CONF_CLOCK_FLASH_WAIT_STATES 2
# define CONF_CLOCK_CPU_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
# define CONF_CLOCK_APBA_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
# define CONF_CLOCK_APBB_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
# define CONF_CLOCK_APBC_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
# define CONF_CLOCK_OSC8M_PRESCALER SYSTEM_OSC8M_DIV_1
# define CONF_CLOCK_OSC8M_ON_DEMAND true
# define CONF_CLOCK_OSC8M_RUN_IN_STANDBY false
# define CONF_CLOCK_XOSC_ENABLE false
# define CONF_CLOCK_XOSC_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
# define CONF_CLOCK_XOSC_EXTERNAL_FREQUENCY 12000000UL
# define CONF_CLOCK_XOSC_STARTUP_TIME SYSTEM_XOSC_STARTUP_32768
# define CONF_CLOCK_XOSC_AUTO_GAIN_CONTROL true
# define CONF_CLOCK_XOSC_ON_DEMAND true
# define CONF_CLOCK_XOSC_RUN_IN_STANDBY false
# define CONF_CLOCK_XOSC32K_ENABLE false
# define CONF_CLOCK_XOSC32K_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
# define CONF_CLOCK_XOSC32K_STARTUP_TIME SYSTEM_XOSC32K_STARTUP_65536
# define CONF_CLOCK_XOSC32K_AUTO_AMPLITUDE_CONTROL false
# define CONF_CLOCK_XOSC32K_ENABLE_1KHZ_OUPUT false
# define CONF_CLOCK_XOSC32K_ENABLE_32KHZ_OUTPUT true
# define CONF_CLOCK_XOSC32K_ON_DEMAND true
# define CONF_CLOCK_XOSC32K_RUN_IN_STANDBY false
# define CONF_CLOCK_OSC32K_ENABLE false
# define CONF_CLOCK_OSC32K_STARTUP_TIME SYSTEM_OSC32K_STARTUP_130
# define CONF_CLOCK_OSC32K_ENABLE_1KHZ_OUTPUT true
# define CONF_CLOCK_OSC32K_ENABLE_32KHZ_OUTPUT true
# define CONF_CLOCK_OSC32K_ON_DEMAND true
# define CONF_CLOCK_OSC32K_RUN_IN_STANDBY false
# define CONF_CLOCK_DFLL_ENABLE true
# define CONF_CLOCK_DFLL_LOOP_MODE SYSTEM_CLOCK_DFLL_LOOP_MODE_USB_RECOVERY
# define CONF_CLOCK_DFLL_ON_DEMAND true
# define CONF_CLOCK_DFLL_FINE_VALUE (512)
# define CONF_CLOCK_DFLL_SOURCE_GCLK_GENERATOR GCLK_GENERATOR_1
# define CONF_CLOCK_DFLL_MULTIPLY_FACTOR (48000000 / 32768)
# define CONF_CLOCK_DFLL_QUICK_LOCK true
# define CONF_CLOCK_DFLL_TRACK_AFTER_FINE_LOCK true
# define CONF_CLOCK_DFLL_KEEP_LOCK_ON_WAKEUP true
# define CONF_CLOCK_DFLL_ENABLE_CHILL_CYCLE true
# define CONF_CLOCK_DFLL_MAX_COARSE_STEP_SIZE (0x1f / 4)
# define CONF_CLOCK_DFLL_MAX_FINE_STEP_SIZE (0xff / 4)
# define CONF_CLOCK_DPLL_ENABLE false
# define CONF_CLOCK_DPLL_ON_DEMAND true
# define CONF_CLOCK_DPLL_RUN_IN_STANDBY false
# define CONF_CLOCK_DPLL_LOCK_BYPASS false
# define CONF_CLOCK_DPLL_WAKE_UP_FAST false
# define CONF_CLOCK_DPLL_LOW_POWER_ENABLE false
# define CONF_CLOCK_DPLL_LOCK_TIME SYSTEM_CLOCK_SOURCE_DPLL_LOCK_TIME_DEFAULT
# define CONF_CLOCK_DPLL_REFERENCE_CLOCK SYSTEM_CLOCK_SOURCE_DPLL_REFERENCE_CLOCK_XOSC32K
# define CONF_CLOCK_DPLL_FILTER SYSTEM_CLOCK_SOURCE_DPLL_FILTER_DEFAULT
# define CONF_CLOCK_DPLL_REFERENCE_FREQUENCY 32768
# define CONF_CLOCK_DPLL_REFERENCE_DIVIDER 1
# define CONF_CLOCK_DPLL_OUTPUT_FREQUENCY 48000000
# define CONF_CLOCK_DPLL_REFERENCE_GCLK_GENERATOR GCLK_GENERATOR_1
# define CONF_CLOCK_DPLL_LOCK_GCLK_GENERATOR GCLK_GENERATOR_1
# define CONF_CLOCK_CONFIGURE_GCLK true
# define CONF_CLOCK_GCLK_0_ENABLE true
# define CONF_CLOCK_GCLK_0_RUN_IN_STANDBY true
# define CONF_CLOCK_GCLK_0_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_DFLL
# define CONF_CLOCK_GCLK_0_PRESCALER 1
# define CONF_CLOCK_GCLK_0_OUTPUT_ENABLE false
# define CONF_CLOCK_GCLK_1_ENABLE false
# define CONF_CLOCK_GCLK_1_RUN_IN_STANDBY false
# define CONF_CLOCK_GCLK_1_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_XOSC32K
# define CONF_CLOCK_GCLK_1_PRESCALER 1
# define CONF_CLOCK_GCLK_1_OUTPUT_ENABLE false
# define CONF_CLOCK_GCLK_2_ENABLE false
# define CONF_CLOCK_GCLK_2_RUN_IN_STANDBY false
# define CONF_CLOCK_GCLK_2_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC32K
# define CONF_CLOCK_GCLK_2_PRESCALER 32
# define CONF_CLOCK_GCLK_2_OUTPUT_ENABLE false
# define CONF_CLOCK_GCLK_3_ENABLE false
# define CONF_CLOCK_GCLK_3_RUN_IN_STANDBY false
# define CONF_CLOCK_GCLK_3_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
# define CONF_CLOCK_GCLK_3_PRESCALER 1
# define CONF_CLOCK_GCLK_3_OUTPUT_ENABLE false
# define CONF_CLOCK_GCLK_4_ENABLE false
# define CONF_CLOCK_GCLK_4_RUN_IN_STANDBY false
# define CONF_CLOCK_GCLK_4_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
# define CONF_CLOCK_GCLK_4_PRESCALER 1
# define CONF_CLOCK_GCLK_4_OUTPUT_ENABLE false
# define CONF_CLOCK_GCLK_5_ENABLE false
# define CONF_CLOCK_GCLK_5_RUN_IN_STANDBY false
# define CONF_CLOCK_GCLK_5_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
# define CONF_CLOCK_GCLK_5_PRESCALER 1
# define CONF_CLOCK_GCLK_5_OUTPUT_ENABLE false
# define CONF_CLOCK_GCLK_6_ENABLE false
# define CONF_CLOCK_GCLK_6_RUN_IN_STANDBY false
# define CONF_CLOCK_GCLK_6_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
# define CONF_CLOCK_GCLK_6_PRESCALER 1
# define CONF_CLOCK_GCLK_6_OUTPUT_ENABLE false
# define CONF_CLOCK_GCLK_7_ENABLE false
# define CONF_CLOCK_GCLK_7_RUN_IN_STANDBY false
# define CONF_CLOCK_GCLK_7_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
# define CONF_CLOCK_GCLK_7_PRESCALER 1
# define CONF_CLOCK_GCLK_7_OUTPUT_ENABLE false
# define CONF_CLOCK_GCLK_8_ENABLE false
# define CONF_CLOCK_GCLK_8_RUN_IN_STANDBY false
# define CONF_CLOCK_GCLK_8_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
# define CONF_CLOCK_GCLK_8_PRESCALER 1
# define CONF_CLOCK_GCLK_8_OUTPUT_ENABLE false
#endif
conf_board.h
AT32UC3A0, AT32UC3A1, AT32UC3B Devices (USBB)
#ifndef CONF_BOARD_H_INCLUDED
#define CONF_BOARD_H_INCLUDED
#endif
AT32UC3C, ATUCXXD, ATUCXXL3U, ATUCXXL4U Devices (USBC)
#ifndef CONF_BOARD_H_INCLUDED
#define CONF_BOARD_H_INCLUDED
#define CONF_BOARD_COM_PORT
#define CONF_BOARD_AT45DBX
#define CONF_BOARD_USB_PORT
#endif
SAM3X and SAM3A Devices (UOTGHS: USB OTG High Speed)
#ifndef CONF_BOARD_H_INCLUDED
#define CONF_BOARD_H_INCLUDED
#define CONF_BOARD_NAND
#define CONF_BOARD_SD_MMC_HSMCI
#define CONF_BOARD_USB_PORT
#endif
SAM D21 Device (USB)
#ifndef CONF_BOARD_H_INCLUDED
#define CONF_BOARD_H_INCLUDED
#define CONF_BOARD_USB_VBUS_DETECT
#endif