Go to the documentation of this file.
44 #define USB_DIR_MASK 0x80
45 #define USB_DIR_OUT 0x00
46 #define USB_DIR_IN 0x80
49 #define USB_EP0_MAX_PACKET_SIZE 64
50 #define USB_EP1_MAX_PACKET_SIZE 64
51 #define USB_EP2_MAX_PACKET_SIZE 64
52 #define USB_EP3_MAX_PACKET_SIZE 64
55 #define USB_SELF_POWERED 0xC0
56 #define USB_BUS_POWERED 0x80
57 #define USB_REMOTE_WAKEUP 0xA0
58 #define USB_NO_REMOTE_WAKEUP 0x80
61 #define USB_ENDPOINT_TYPE_MASK 0x03
62 #define USB_ENDPOINT_TYPE_CONTROL 0x00
63 #define USB_ENDPOINT_TYPE_ISOCHRONOUS 0x01
64 #define USB_ENDPOINT_TYPE_BULK 0x02
65 #define USB_ENDPOINT_TYPE_INTERRUPT 0x03
68 #define USB_DEVICE_CLASS_CDC 0x02
70 #define USB_DEVICE_SUBCLASS_CDC 0x00
72 #define USB_DEVICE_PROTOCOL_CDC 0x00
75 #define CDC_INTERFACE_CLASS_COMMUNICATION 0x02
76 #define CDC_INTERFACE_CLASS_RNDIS 0xEF
78 #define CDC_INTERFACE_SUBCLASS_ACM 0x02
79 #define CDC_INTERFACE_SUBCLASS_RNDIS 0x04
81 #define CDC_INTERFACE_PROTOCOL_RNDIS 0x01
82 #define CDC_INTERFACE_PROTOCOL_VENDOR_SPECIFIC 0xFF
85 #define CDC_INTERFACE_CLASS_DATA 0x0A
87 #define CDC_INTERFACE_SUBCLASS_DATA 0x00
89 #define CDC_INTERFACE_PROTOCOL_DATA 0x00
92 #define CDC_CS_INTERFACE 0x24
93 #define CDC_CS_ENDPOINT 0x25
96 #define CDC_HEADER_DESC_SUBTYPE 0x00
97 #define CDC_CALL_MANAGEMENT_DESC_SUBTYPE 0x01
98 #define CDC_ACM_DESC_SUBTYPE 0x02
99 #define CDC_UNION_DESC_SUBTYPE 0x06
193 uint8_t bFunctionLength;
206 uint8_t bFunctionLength;
220 uint8_t bFunctionLength;
233 uint8_t bFunctionLength;
typedef __packed_struct
Device descriptor.
uint8_t * usbdGetProductStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
Retrieve the product string descriptor.
CdcHeaderDescriptor cdcHeaderDescriptor
USBD_DescriptorsTypeDef usbdRndisDescriptors
USB descriptors.
CdcAcmDescriptor cdcAcmDescriptor
UsbEndpointDescriptor notificationEndpointDescriptor
uint8_t bDescriptorSubtype
CdcUnionDescriptor cdcUnionDescriptor
const UsbConfigDescriptors usbdConfigDescriptors
USB configuration descriptors.
uint8_t * usbdGetDeviceDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
Retrieve device descriptor.
uint8_t * usbdGetManufacturerStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
Retrieve the manufacturer string descriptor.
UsbInterfaceDescriptor dataInterfaceDescriptor
uint8_t * usbdGetConfigStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
Retrieve the configuration string descriptor.
uint8_t bConfigurationValue
UsbInterfaceDescriptor communicationInterfaceDescriptor
uint8_t bInterfaceProtocol
CdcCallManagementDescriptor cdcCallManagementDescriptor
CdcCallManagementDescriptor
uint8_t bNumConfigurations
uint8_t bInterfaceSubClass
uint8_t * usbdGetSerialStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
Retrieve the serial number string descriptor.
uint8_t * usbdGetLangIdStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
Retrieve the languages supported by the device.
uint8_t * usbdGetInterfaceStrDescriptor(USBD_SpeedTypeDef speed, uint16_t *length)
Retrieve the interface string descriptor.
const UsbDeviceDescriptor usbdDeviceDescriptor
USB device descriptor.
uint8_t bAlternateSetting
UsbEndpointDescriptor dataInEndpointDescriptor
UsbEndpointDescriptor dataOutEndpointDescriptor