Classes | Macros
Collaboration diagram for USB interface descriptors:

Classes

struct  udi_cdc_comm_desc_t
 Communication Class interface descriptor. More...
 
struct  udi_cdc_data_desc_t
 Data Class interface descriptor. More...
 

Macros

#define UDI_CDC_COMM_DESC(port)
 Content of CDC COMM interface descriptor for all speeds. More...
 
#define UDI_CDC_COMM_EP_SIZE   64
 CDC communication endpoints size for all speeds. More...
 
#define UDI_CDC_DATA_DESC_COMMON
 Content of CDC DATA interface descriptors. More...
 
#define UDI_CDC_DATA_DESC_FS(port)
 
#define UDI_CDC_DATA_DESC_HS(port)
 
#define UDI_CDC_DATA_EPS_FS_SIZE   64
 CDC data endpoints size for FS speed (8B, 16B, 32B, 64B) More...
 
#define UDI_CDC_DATA_EPS_HS_SIZE   512
 CDC data endpoints size for HS speed (512B only) More...
 
#define UDI_CDC_IAD_DESC(port)
 Content of CDC IAD interface descriptor for all speeds. More...
 

Content of interface descriptors

Up to 7 CDC interfaces can be implemented on a USB device.

#define UDI_CDC_IAD_STRING_ID_0   0
 By default no string associated to these interfaces. More...
 
#define UDI_CDC_COMM_STRING_ID_0   0
 
#define UDI_CDC_DATA_STRING_ID_0   0
 
#define UDI_CDC_IAD_DESC_0   UDI_CDC_IAD_DESC(0)
 
#define UDI_CDC_COMM_DESC_0   UDI_CDC_COMM_DESC(0)
 
#define UDI_CDC_DATA_DESC_0_FS   UDI_CDC_DATA_DESC_FS(0)
 
#define UDI_CDC_DATA_DESC_0_HS   UDI_CDC_DATA_DESC_HS(0)
 
#define UDI_CDC_IAD_STRING_ID_1   0
 By default no string associated to these interfaces. More...
 
#define UDI_CDC_COMM_STRING_ID_1   0
 
#define UDI_CDC_DATA_STRING_ID_1   0
 
#define UDI_CDC_IAD_DESC_1   UDI_CDC_IAD_DESC(1)
 
#define UDI_CDC_COMM_DESC_1   UDI_CDC_COMM_DESC(1)
 
#define UDI_CDC_DATA_DESC_1_FS   UDI_CDC_DATA_DESC_FS(1)
 
#define UDI_CDC_DATA_DESC_1_HS   UDI_CDC_DATA_DESC_HS(1)
 
#define UDI_CDC_IAD_STRING_ID_2   0
 By default no string associated to these interfaces. More...
 
#define UDI_CDC_COMM_STRING_ID_2   0
 
#define UDI_CDC_DATA_STRING_ID_2   0
 
#define UDI_CDC_IAD_DESC_2   UDI_CDC_IAD_DESC(2)
 
#define UDI_CDC_COMM_DESC_2   UDI_CDC_COMM_DESC(2)
 
#define UDI_CDC_DATA_DESC_2_FS   UDI_CDC_DATA_DESC_FS(2)
 
#define UDI_CDC_DATA_DESC_2_HS   UDI_CDC_DATA_DESC_HS(2)
 
#define UDI_CDC_IAD_STRING_ID_3   0
 By default no string associated to these interfaces. More...
 
#define UDI_CDC_COMM_STRING_ID_3   0
 
#define UDI_CDC_DATA_STRING_ID_3   0
 
#define UDI_CDC_IAD_DESC_3   UDI_CDC_IAD_DESC(3)
 
#define UDI_CDC_COMM_DESC_3   UDI_CDC_COMM_DESC(3)
 
#define UDI_CDC_DATA_DESC_3_FS   UDI_CDC_DATA_DESC_FS(3)
 
#define UDI_CDC_DATA_DESC_3_HS   UDI_CDC_DATA_DESC_HS(3)
 
#define UDI_CDC_IAD_STRING_ID_4   0
 By default no string associated to these interfaces. More...
 
#define UDI_CDC_COMM_STRING_ID_4   0
 
#define UDI_CDC_DATA_STRING_ID_4   0
 
#define UDI_CDC_IAD_DESC_4   UDI_CDC_IAD_DESC(4)
 
#define UDI_CDC_COMM_DESC_4   UDI_CDC_COMM_DESC(4)
 
#define UDI_CDC_DATA_DESC_4_FS   UDI_CDC_DATA_DESC_FS(4)
 
#define UDI_CDC_DATA_DESC_4_HS   UDI_CDC_DATA_DESC_HS(4)
 
#define UDI_CDC_IAD_STRING_ID_5   0
 By default no string associated to these interfaces. More...
 
#define UDI_CDC_COMM_STRING_ID_5   0
 
#define UDI_CDC_DATA_STRING_ID_5   0
 
#define UDI_CDC_IAD_DESC_5   UDI_CDC_IAD_DESC(5)
 
#define UDI_CDC_COMM_DESC_5   UDI_CDC_COMM_DESC(5)
 
#define UDI_CDC_DATA_DESC_5_FS   UDI_CDC_DATA_DESC_FS(5)
 
#define UDI_CDC_DATA_DESC_5_HS   UDI_CDC_DATA_DESC_HS(5)
 
#define UDI_CDC_IAD_STRING_ID_6   0
 By default no string associated to these interfaces. More...
 
#define UDI_CDC_COMM_STRING_ID_6   0
 
#define UDI_CDC_DATA_STRING_ID_6   0
 
#define UDI_CDC_IAD_DESC_6   UDI_CDC_IAD_DESC(6)
 
#define UDI_CDC_COMM_DESC_6   UDI_CDC_COMM_DESC(6)
 
#define UDI_CDC_DATA_DESC_6_FS   UDI_CDC_DATA_DESC_FS(6)
 
#define UDI_CDC_DATA_DESC_6_HS   UDI_CDC_DATA_DESC_HS(6)
 

Detailed Description

The following structures provide predefined USB interface descriptors. It must be used to define the final USB descriptors.

Macro Definition Documentation

◆ UDI_CDC_COMM_DESC

#define UDI_CDC_COMM_DESC (   port)

Content of CDC COMM interface descriptor for all speeds.

Definition at line 247 of file udi_cdc.h.

◆ UDI_CDC_COMM_DESC_0

#define UDI_CDC_COMM_DESC_0   UDI_CDC_COMM_DESC(0)

Definition at line 138 of file udi_cdc.h.

◆ UDI_CDC_COMM_DESC_1

#define UDI_CDC_COMM_DESC_1   UDI_CDC_COMM_DESC(1)

Definition at line 153 of file udi_cdc.h.

◆ UDI_CDC_COMM_DESC_2

#define UDI_CDC_COMM_DESC_2   UDI_CDC_COMM_DESC(2)

Definition at line 168 of file udi_cdc.h.

◆ UDI_CDC_COMM_DESC_3

#define UDI_CDC_COMM_DESC_3   UDI_CDC_COMM_DESC(3)

Definition at line 183 of file udi_cdc.h.

◆ UDI_CDC_COMM_DESC_4

#define UDI_CDC_COMM_DESC_4   UDI_CDC_COMM_DESC(4)

Definition at line 198 of file udi_cdc.h.

◆ UDI_CDC_COMM_DESC_5

#define UDI_CDC_COMM_DESC_5   UDI_CDC_COMM_DESC(5)

Definition at line 213 of file udi_cdc.h.

◆ UDI_CDC_COMM_DESC_6

#define UDI_CDC_COMM_DESC_6   UDI_CDC_COMM_DESC(6)

Definition at line 228 of file udi_cdc.h.

◆ UDI_CDC_COMM_EP_SIZE

#define UDI_CDC_COMM_EP_SIZE   64

CDC communication endpoints size for all speeds.

Definition at line 116 of file udi_cdc.h.

◆ UDI_CDC_COMM_STRING_ID_0

#define UDI_CDC_COMM_STRING_ID_0   0

Definition at line 132 of file udi_cdc.h.

◆ UDI_CDC_COMM_STRING_ID_1

#define UDI_CDC_COMM_STRING_ID_1   0

Definition at line 147 of file udi_cdc.h.

◆ UDI_CDC_COMM_STRING_ID_2

#define UDI_CDC_COMM_STRING_ID_2   0

Definition at line 162 of file udi_cdc.h.

◆ UDI_CDC_COMM_STRING_ID_3

#define UDI_CDC_COMM_STRING_ID_3   0

Definition at line 177 of file udi_cdc.h.

◆ UDI_CDC_COMM_STRING_ID_4

#define UDI_CDC_COMM_STRING_ID_4   0

Definition at line 192 of file udi_cdc.h.

◆ UDI_CDC_COMM_STRING_ID_5

#define UDI_CDC_COMM_STRING_ID_5   0

Definition at line 207 of file udi_cdc.h.

◆ UDI_CDC_COMM_STRING_ID_6

#define UDI_CDC_COMM_STRING_ID_6   0

Definition at line 222 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_0_FS

#define UDI_CDC_DATA_DESC_0_FS   UDI_CDC_DATA_DESC_FS(0)

Definition at line 139 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_0_HS

#define UDI_CDC_DATA_DESC_0_HS   UDI_CDC_DATA_DESC_HS(0)

Definition at line 140 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_1_FS

#define UDI_CDC_DATA_DESC_1_FS   UDI_CDC_DATA_DESC_FS(1)

Definition at line 154 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_1_HS

#define UDI_CDC_DATA_DESC_1_HS   UDI_CDC_DATA_DESC_HS(1)

Definition at line 155 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_2_FS

#define UDI_CDC_DATA_DESC_2_FS   UDI_CDC_DATA_DESC_FS(2)

Definition at line 169 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_2_HS

#define UDI_CDC_DATA_DESC_2_HS   UDI_CDC_DATA_DESC_HS(2)

Definition at line 170 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_3_FS

#define UDI_CDC_DATA_DESC_3_FS   UDI_CDC_DATA_DESC_FS(3)

Definition at line 184 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_3_HS

#define UDI_CDC_DATA_DESC_3_HS   UDI_CDC_DATA_DESC_HS(3)

Definition at line 185 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_4_FS

#define UDI_CDC_DATA_DESC_4_FS   UDI_CDC_DATA_DESC_FS(4)

Definition at line 199 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_4_HS

#define UDI_CDC_DATA_DESC_4_HS   UDI_CDC_DATA_DESC_HS(4)

Definition at line 200 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_5_FS

#define UDI_CDC_DATA_DESC_5_FS   UDI_CDC_DATA_DESC_FS(5)

Definition at line 214 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_5_HS

#define UDI_CDC_DATA_DESC_5_HS   UDI_CDC_DATA_DESC_HS(5)

Definition at line 215 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_6_FS

#define UDI_CDC_DATA_DESC_6_FS   UDI_CDC_DATA_DESC_FS(6)

Definition at line 229 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_6_HS

#define UDI_CDC_DATA_DESC_6_HS   UDI_CDC_DATA_DESC_HS(6)

Definition at line 230 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_COMMON

#define UDI_CDC_DATA_DESC_COMMON
Value:
.iface.bLength = sizeof(usb_iface_desc_t),\
.iface.bDescriptorType = USB_DT_INTERFACE,\
.iface.bAlternateSetting = 0,\
.iface.bNumEndpoints = 2,\
.iface.bInterfaceClass = CDC_CLASS_DATA,\
.iface.bInterfaceSubClass = 0,\
.iface.bInterfaceProtocol = 0,\
.ep_in.bLength = sizeof(usb_ep_desc_t),\
.ep_in.bDescriptorType = USB_DT_ENDPOINT,\
.ep_in.bmAttributes = USB_EP_TYPE_BULK,\
.ep_in.bInterval = 0,\
.ep_out.bLength = sizeof(usb_ep_desc_t),\
.ep_out.bDescriptorType = USB_DT_ENDPOINT,\
.ep_out.bmAttributes = USB_EP_TYPE_BULK,\
.ep_out.bInterval = 0,
Standard USB interface descriptor structure.
Definition: usb_protocol.h:446
Standard USB endpoint descriptor structure.
Definition: usb_protocol.h:461
#define CDC_CLASS_DATA
CDC Data Class Interface.

Content of CDC DATA interface descriptors.

Definition at line 285 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_FS

#define UDI_CDC_DATA_DESC_FS (   port)
Value:
{ \
UDI_CDC_DATA_DESC_COMMON \
.ep_in.wMaxPacketSize = LE16(UDI_CDC_DATA_EPS_FS_SIZE),\
.ep_out.wMaxPacketSize = LE16(UDI_CDC_DATA_EPS_FS_SIZE),\
.ep_in.bEndpointAddress = UDI_CDC_DATA_EP_IN_##port,\
.ep_out.bEndpointAddress = UDI_CDC_DATA_EP_OUT_##port,\
.iface.bInterfaceNumber = UDI_CDC_DATA_IFACE_NUMBER_##port,\
.iface.iInterface = UDI_CDC_DATA_STRING_ID_##port,\
}
#define LE16(x)
Definition: compiler.h:890
#define UDI_CDC_DATA_EPS_FS_SIZE
CDC data endpoints size for FS speed (8B, 16B, 32B, 64B)
Definition: udi_cdc.h:118

Definition at line 302 of file udi_cdc.h.

◆ UDI_CDC_DATA_DESC_HS

#define UDI_CDC_DATA_DESC_HS (   port)
Value:
{ \
UDI_CDC_DATA_DESC_COMMON \
.ep_in.wMaxPacketSize = LE16(UDI_CDC_DATA_EPS_HS_SIZE),\
.ep_out.wMaxPacketSize = LE16(UDI_CDC_DATA_EPS_HS_SIZE),\
.ep_in.bEndpointAddress = UDI_CDC_DATA_EP_IN_##port,\
.ep_out.bEndpointAddress = UDI_CDC_DATA_EP_OUT_##port,\
.iface.bInterfaceNumber = UDI_CDC_DATA_IFACE_NUMBER_##port,\
.iface.iInterface = UDI_CDC_DATA_STRING_ID_##port,\
}
#define UDI_CDC_DATA_EPS_HS_SIZE
CDC data endpoints size for HS speed (512B only)
Definition: udi_cdc.h:120
#define LE16(x)
Definition: compiler.h:890

Definition at line 312 of file udi_cdc.h.

◆ UDI_CDC_DATA_EPS_FS_SIZE

#define UDI_CDC_DATA_EPS_FS_SIZE   64

CDC data endpoints size for FS speed (8B, 16B, 32B, 64B)

Definition at line 118 of file udi_cdc.h.

◆ UDI_CDC_DATA_EPS_HS_SIZE

#define UDI_CDC_DATA_EPS_HS_SIZE   512

CDC data endpoints size for HS speed (512B only)

Definition at line 120 of file udi_cdc.h.

◆ UDI_CDC_DATA_STRING_ID_0

#define UDI_CDC_DATA_STRING_ID_0   0

Definition at line 135 of file udi_cdc.h.

◆ UDI_CDC_DATA_STRING_ID_1

#define UDI_CDC_DATA_STRING_ID_1   0

Definition at line 150 of file udi_cdc.h.

◆ UDI_CDC_DATA_STRING_ID_2

#define UDI_CDC_DATA_STRING_ID_2   0

Definition at line 165 of file udi_cdc.h.

◆ UDI_CDC_DATA_STRING_ID_3

#define UDI_CDC_DATA_STRING_ID_3   0

Definition at line 180 of file udi_cdc.h.

◆ UDI_CDC_DATA_STRING_ID_4

#define UDI_CDC_DATA_STRING_ID_4   0

Definition at line 195 of file udi_cdc.h.

◆ UDI_CDC_DATA_STRING_ID_5

#define UDI_CDC_DATA_STRING_ID_5   0

Definition at line 210 of file udi_cdc.h.

◆ UDI_CDC_DATA_STRING_ID_6

#define UDI_CDC_DATA_STRING_ID_6   0

Definition at line 225 of file udi_cdc.h.

◆ UDI_CDC_IAD_DESC

#define UDI_CDC_IAD_DESC (   port)
Value:
{ \
.bLength = sizeof(usb_iad_desc_t),\
.bFirstInterface = UDI_CDC_COMM_IFACE_NUMBER_##port,\
.iFunction = UDI_CDC_IAD_STRING_ID_##port,\
}
uint8_t bDescriptorType
uint8_t bFunctionSubClass
#define CDC_SUBCLASS_ACM
Abstract Control Model.
uint8_t bFirstInterface
Standard USB association descriptor structure.
Definition: usb_protocol.h:432
uint8_t iFunction
uint8_t bFunctionProtocol
#define CDC_PROTOCOL_V25TER
Common AT commands.
#define CDC_CLASS_COMM
CDC Communication Class Interface.
uint8_t bInterfaceCount
uint8_t bFunctionClass

Content of CDC IAD interface descriptor for all speeds.

Definition at line 235 of file udi_cdc.h.

◆ UDI_CDC_IAD_DESC_0

#define UDI_CDC_IAD_DESC_0   UDI_CDC_IAD_DESC(0)

Definition at line 137 of file udi_cdc.h.

◆ UDI_CDC_IAD_DESC_1

#define UDI_CDC_IAD_DESC_1   UDI_CDC_IAD_DESC(1)

Definition at line 152 of file udi_cdc.h.

◆ UDI_CDC_IAD_DESC_2

#define UDI_CDC_IAD_DESC_2   UDI_CDC_IAD_DESC(2)

Definition at line 167 of file udi_cdc.h.

◆ UDI_CDC_IAD_DESC_3

#define UDI_CDC_IAD_DESC_3   UDI_CDC_IAD_DESC(3)

Definition at line 182 of file udi_cdc.h.

◆ UDI_CDC_IAD_DESC_4

#define UDI_CDC_IAD_DESC_4   UDI_CDC_IAD_DESC(4)

Definition at line 197 of file udi_cdc.h.

◆ UDI_CDC_IAD_DESC_5

#define UDI_CDC_IAD_DESC_5   UDI_CDC_IAD_DESC(5)

Definition at line 212 of file udi_cdc.h.

◆ UDI_CDC_IAD_DESC_6

#define UDI_CDC_IAD_DESC_6   UDI_CDC_IAD_DESC(6)

Definition at line 227 of file udi_cdc.h.

◆ UDI_CDC_IAD_STRING_ID_0

#define UDI_CDC_IAD_STRING_ID_0   0

By default no string associated to these interfaces.

Definition at line 129 of file udi_cdc.h.

◆ UDI_CDC_IAD_STRING_ID_1

#define UDI_CDC_IAD_STRING_ID_1   0

By default no string associated to these interfaces.

Definition at line 144 of file udi_cdc.h.

◆ UDI_CDC_IAD_STRING_ID_2

#define UDI_CDC_IAD_STRING_ID_2   0

By default no string associated to these interfaces.

Definition at line 159 of file udi_cdc.h.

◆ UDI_CDC_IAD_STRING_ID_3

#define UDI_CDC_IAD_STRING_ID_3   0

By default no string associated to these interfaces.

Definition at line 174 of file udi_cdc.h.

◆ UDI_CDC_IAD_STRING_ID_4

#define UDI_CDC_IAD_STRING_ID_4   0

By default no string associated to these interfaces.

Definition at line 189 of file udi_cdc.h.

◆ UDI_CDC_IAD_STRING_ID_5

#define UDI_CDC_IAD_STRING_ID_5   0

By default no string associated to these interfaces.

Definition at line 204 of file udi_cdc.h.

◆ UDI_CDC_IAD_STRING_ID_6

#define UDI_CDC_IAD_STRING_ID_6   0

By default no string associated to these interfaces.

Definition at line 219 of file udi_cdc.h.



inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:07