The following structures provide the USB device descriptors required for USB Device with a single interface CDC.
It is ready to use and do not require more definition.
#define UDI_CDC_COMM_IFACE_NUMBER_0 0 |
#define UDI_CDC_COMM_IFACE_NUMBER_1 2 |
#define UDI_CDC_COMM_IFACE_NUMBER_2 4 |
#define UDI_CDC_COMM_IFACE_NUMBER_3 6 |
#define UDI_CDC_COMM_IFACE_NUMBER_4 8 |
#define UDI_CDC_COMM_IFACE_NUMBER_5 10 |
#define UDI_CDC_COMM_IFACE_NUMBER_6 12 |
#define UDI_CDC_DATA_IFACE_NUMBER_0 1 |
#define UDI_CDC_DATA_IFACE_NUMBER_1 3 |
#define UDI_CDC_DATA_IFACE_NUMBER_2 5 |
#define UDI_CDC_DATA_IFACE_NUMBER_3 7 |
#define UDI_CDC_DATA_IFACE_NUMBER_4 9 |
#define UDI_CDC_DATA_IFACE_NUMBER_5 11 |
#define UDI_CDC_DATA_IFACE_NUMBER_6 13 |
#define USB_DEVICE_EP_CTRL_SIZE 64 |
Control endpoint size (Endpoint 0)
3 endpoints used per CDC interface
Two interfaces for a CDC device.
Initial value:= {
}
UDC_DESC_STORAGE udc_config_speed_t udc_config_fs[1]
Add UDI with USB Descriptors FS & HS.
Definition: udi_cdc_desc.c:216
UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc
USB Device Descriptor.
Definition: udi_msc_desc.c:58
#define NULL
Definition: def.h:47
Add all information about USB Device in global structure for UDC.
Global variables of USB Device Descriptor and UDI links.
Initial value:= { {
}}
UDC_DESC_STORAGE udi_api_t * udi_apis[USB_DEVICE_NB_INTERFACE]
Associate an UDI for each USB interface.
Definition: udi_msc_desc.c:149
Standard USB configuration descriptor structure.
Definition: usb_protocol.h:410
UDC_DESC_STORAGE udc_desc_t udc_desc_fs
USB Device Configuration Descriptor filled for FS.
Definition: udi_msc_desc.c:114
#define UDC_DESC_STORAGE
Defines the memory's location of USB descriptors.
Definition: udc_desc.h:70
Add UDI with USB Descriptors FS & HS.
Initial value:= {
.conf.bConfigurationValue = 1,
.conf.iConfiguration = 0,
}
Definition: usb_protocol.h:191
#define USB_CONFIG_ATTR_MUST_SET
Must always be set.
Definition: usb_protocol.h:422
#define USB_DEVICE_NB_INTERFACE
Two interfaces for a CDC device.
Definition: udi_cdc_desc.c:55
Standard USB configuration descriptor structure.
Definition: usb_protocol.h:410
#define UDI_CDC_COMM_DESC_0
Definition: udi_cdc.h:138
#define UDI_CDC_DATA_DESC_0_FS
Definition: udi_cdc.h:139
#define LE16(x)
Definition: compiler.h:886
#define USB_DEVICE_ATTR
Definition: vendor/device/example/conf_usb.h:54
#define USB_DEVICE_POWER
Definition: vendor/device/example/conf_usb.h:53
#define USB_CONFIG_MAX_POWER(ma)
Max power in mA.
Definition: usb_protocol.h:427
Structure for USB Device Configuration Descriptor.
Definition: udi_msc_desc.c:106
USB Device Configuration Descriptor filled for full and high speed.
USB Device Configuration Descriptor filled for FS.
USB Device Descriptor.
Pointer on the selected speed device configuration.
Initial value:= {
#define UDI_CDC_API(index, unused)
}
Associate an UDI for each USB interface.