54 #define USB_DEVICE_NB_INTERFACE (2*UDI_CDC_PORT_NB) 57 #ifdef USB_DEVICE_LPM_SUPPORT 58 # define USB_VERSION USB_V2_1 60 # define USB_VERSION USB_V2_0 69 #if UDI_CDC_PORT_NB > 1 81 #ifdef USB_DEVICE_MANUFACTURE_NAME 86 #ifdef USB_DEVICE_PRODUCT_NAME 91 #if (defined USB_DEVICE_SERIAL_NAME || defined USB_DEVICE_GET_SERIAL_NAME_POINTER) 96 .bNumConfigurations = 1
100 #ifdef USB_DEVICE_HS_SUPPORT 101 COMPILER_WORD_ALIGNED
107 #if UDI_CDC_PORT_NB > 1 112 .bDeviceSubClass = 0,
113 .bDeviceProtocol = 0,
115 .bNumConfigurations = 1
119 #ifdef USB_DEVICE_LPM_SUPPORT 120 COMPILER_WORD_ALIGNED
126 .bos.bNumDeviceCaps = 1,
138 #if UDI_CDC_PORT_NB == 1 142 # define UDI_CDC_DESC_STRUCTURE(index, unused) \ 143 usb_iad_desc_t udi_cdc_iad_##index; \ 144 udi_cdc_comm_desc_t udi_cdc_comm_##index; \ 145 udi_cdc_data_desc_t udi_cdc_data_##index; 147 # undef UDI_CDC_DESC_STRUCTURE 152 COMPILER_WORD_ALIGNED
159 .conf.bConfigurationValue = 1,
160 .conf.iConfiguration = 0,
163 #if UDI_CDC_PORT_NB == 1 167 # define UDI_CDC_DESC_FS(index, unused) \ 168 .udi_cdc_iad_##index = UDI_CDC_IAD_DESC_##index,\ 169 .udi_cdc_comm_##index = UDI_CDC_COMM_DESC_##index,\ 170 .udi_cdc_data_##index = UDI_CDC_DATA_DESC_##index##_FS, 172 # undef UDI_CDC_DESC_FS 176 #ifdef USB_DEVICE_HS_SUPPORT 177 COMPILER_WORD_ALIGNED
183 .conf.bConfigurationValue = 1,
184 .conf.iConfiguration = 0,
187 #if UDI_CDC_PORT_NB == 1 191 # define UDI_CDC_DESC_HS(index, unused) \ 192 .udi_cdc_iad_##index = UDI_CDC_IAD_DESC_##index, \ 193 .udi_cdc_comm_##index = UDI_CDC_COMM_DESC_##index, \ 194 .udi_cdc_data_##index = UDI_CDC_DATA_DESC_##index##_HS, 196 # undef UDI_CDC_DESC_HS 208 # define UDI_CDC_API(index, unused) \ 220 #ifdef USB_DEVICE_HS_SUPPORT 231 #ifdef USB_DEVICE_HS_SUPPORT 233 .qualifier = &udc_device_qual,
234 .conf_hs = udc_config_hs,
236 #ifdef USB_DEVICE_LPM_SUPPORT 237 .conf_bos = &udc_device_lpm.bos,
Communication Class interface descriptor.
#define USB_DEVICE_EP_CTRL_SIZE
Control endpoint size (Endpoint 0)
Common API for USB Device Interface.
Common API for USB Device Drivers (UDD)
USB configuration file for CDC application.
UDC_DESC_STORAGE udc_config_speed_t udc_config_fs[1]
Add UDI with USB Descriptors FS & HS.
#define USB_CONFIG_ATTR_MUST_SET
Must always be set.
USB Device Communication Device Class (CDC) interface definitions.
#define COMPILER_PACK_RESET()
Set default alignment for subsequent struct and union definitions.
#define USB_DEVICE_NB_INTERFACE
Two interfaces for a CDC device.
#define UDI_CDC_API(index, unused)
#define CDC_CLASS_DEVICE
USB Communication Device Class.
Data Class interface descriptor.
Standard USB device descriptor structure.
Standard USB configuration descriptor structure.
#define USB_DEVICE_MAJOR_VERSION
#define UDI_CDC_COMM_DESC_0
COMPILER_WORD_ALIGNED UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc
USB Device Descriptor.
#define USB_DEVICE_VENDOR_ID
Device definition (mandatory)
#define UDI_CDC_DATA_DESC_0_FS
UDC_DESC_STORAGE udc_config_t udc_config
Add all information about USB Device in global structure for UDC.
UDC_DESC_STORAGE udi_api_t * udi_apis[USB_DEVICE_NB_INTERFACE]
Associate an UDI for each USB interface.
#define COMPILER_PACK_SET(alignment)
Set maximum alignment for subsequent struct and union definitions to alignment.
USB Device Capabilities - USB 2.0 Extension Descriptor structure.
Configuration descriptor and UDI link for one USB speed.
Standard USB device qualifier descriptor structure.
#define USB_DEVICE_MINOR_VERSION
#define MREPEAT(count, macro, data)
Macro repeat.
udi_cdc_comm_desc_t udi_cdc_comm_0
udi_cdc_data_desc_t udi_cdc_data_0
USBDeviceCapabilities capa_ext
#define UDI_CDC_DATA_DESC_0_HS
All information about the USB Device.
#define USB_CONFIG_MAX_POWER(ma)
Max power in mA.
usb_dev_desc_t UDC_DESC_STORAGE * confdev_lsfs
USB device descriptor for low or full speed.
#define UDC_DESC_STORAGE
Defines the memory's location of USB descriptors.
usb_conf_desc_t UDC_DESC_STORAGE * desc
USB configuration descriptor.
USB Device LPM Descriptor structure.
COMPILER_WORD_ALIGNED UDC_DESC_STORAGE udc_desc_t udc_desc_fs
USB Device Configuration Descriptor filled for full and high speed.
USBDeviceBOSDescriptor bos
Structure for USB Device Configuration Descriptor.
#define USB_DEVICE_PRODUCT_ID
USB Device BOS descriptor structure.