|
|
@@ -96,7 +96,7 @@ typedef union {
|
|
|
uint16_t wIndex; /**< Word-sized field that varies according to request; typically used to pass an index or offset */
|
|
|
uint16_t wLength; /**< Number of bytes to transfer if there is a data stage */
|
|
|
} __attribute__((packed));
|
|
|
- uint8_t val[USB_SETUP_PACKET_SIZE];
|
|
|
+ uint8_t val[USB_SETUP_PACKET_SIZE]; /**< Descriptor value */
|
|
|
} usb_setup_packet_t;
|
|
|
_Static_assert(sizeof(usb_setup_packet_t) == USB_SETUP_PACKET_SIZE, "Size of usb_setup_packet_t incorrect");
|
|
|
|
|
|
@@ -241,8 +241,8 @@ typedef union {
|
|
|
struct {
|
|
|
uint8_t bLength; /**< Size of the descriptor in bytes */
|
|
|
uint8_t bDescriptorType; /**< Descriptor Type */
|
|
|
- } USB_DESC_ATTR;
|
|
|
- uint8_t val[USB_STANDARD_DESC_SIZE];
|
|
|
+ } USB_DESC_ATTR; /**< USB descriptor attributes */
|
|
|
+ uint8_t val[USB_STANDARD_DESC_SIZE]; /**< Descriptor value */
|
|
|
} usb_standard_desc_t;
|
|
|
_Static_assert(sizeof(usb_standard_desc_t) == USB_STANDARD_DESC_SIZE, "Size of usb_standard_desc_t incorrect");
|
|
|
|
|
|
@@ -274,8 +274,8 @@ typedef union {
|
|
|
uint8_t iProduct; /**< Index of string descriptor describing product */
|
|
|
uint8_t iSerialNumber; /**< Index of string descriptor describing the device’s serial number */
|
|
|
uint8_t bNumConfigurations; /**< Number of possible configurations */
|
|
|
- } USB_DESC_ATTR;
|
|
|
- uint8_t val[USB_DEVICE_DESC_SIZE];
|
|
|
+ } USB_DESC_ATTR; /**< USB descriptor attributes */
|
|
|
+ uint8_t val[USB_DEVICE_DESC_SIZE]; /**< Descriptor value */
|
|
|
} usb_device_desc_t;
|
|
|
_Static_assert(sizeof(usb_device_desc_t) == USB_DEVICE_DESC_SIZE, "Size of usb_device_desc_t incorrect");
|
|
|
|
|
|
@@ -337,8 +337,8 @@ typedef union {
|
|
|
uint8_t iConfiguration; /**< Index of string descriptor describing this configuration */
|
|
|
uint8_t bmAttributes; /**< Configuration characteristics */
|
|
|
uint8_t bMaxPower; /**< Maximum power consumption of the USB device from the bus in this specific configuration when the device is fully operational. */
|
|
|
- } USB_DESC_ATTR;
|
|
|
- uint8_t val[USB_CONFIG_DESC_SIZE];
|
|
|
+ } USB_DESC_ATTR; /**< USB descriptor attributes */
|
|
|
+ uint8_t val[USB_CONFIG_DESC_SIZE]; /**< Descriptor value */
|
|
|
} usb_config_desc_t;
|
|
|
_Static_assert(sizeof(usb_config_desc_t) == USB_CONFIG_DESC_SIZE, "Size of usb_config_desc_t incorrect");
|
|
|
|
|
|
@@ -370,8 +370,8 @@ typedef union {
|
|
|
uint8_t bFunctionSubClass; /**< Subclass code (assigned by USB-IF) */
|
|
|
uint8_t bFunctionProtocol; /**< Protocol code (assigned by USB-IF) */
|
|
|
uint8_t iFunction; /**< Index of string descriptor describing this function */
|
|
|
- } USB_DESC_ATTR;
|
|
|
- uint8_t val[USB_IAD_DESC_SIZE];
|
|
|
+ } USB_DESC_ATTR; /**< USB descriptor attributes */
|
|
|
+ uint8_t val[USB_IAD_DESC_SIZE]; /**< Descriptor value */
|
|
|
} usb_iad_desc_t;
|
|
|
_Static_assert(sizeof(usb_iad_desc_t) == USB_IAD_DESC_SIZE, "Size of usb_iad_desc_t incorrect");
|
|
|
|
|
|
@@ -398,8 +398,8 @@ typedef union {
|
|
|
uint8_t bInterfaceSubClass; /**< Subclass code (assigned by the USB-IF) */
|
|
|
uint8_t bInterfaceProtocol; /**< Protocol code (assigned by the USB) */
|
|
|
uint8_t iInterface; /**< Index of string descriptor describing this interface */
|
|
|
- } USB_DESC_ATTR;
|
|
|
- uint8_t val[USB_INTF_DESC_SIZE];
|
|
|
+ } USB_DESC_ATTR; /**< USB descriptor attributes */
|
|
|
+ uint8_t val[USB_INTF_DESC_SIZE]; /**< Descriptor value */
|
|
|
} usb_intf_desc_t;
|
|
|
_Static_assert(sizeof(usb_intf_desc_t) == USB_INTF_DESC_SIZE, "Size of usb_intf_desc_t incorrect");
|
|
|
|
|
|
@@ -423,8 +423,8 @@ typedef union {
|
|
|
uint8_t bmAttributes; /**< This field describes the endpoint’s attributes when it is configured using the bConfigurationValue. */
|
|
|
uint16_t wMaxPacketSize; /**< Maximum packet size this endpoint is capable of sending or receiving when this configuration is selected. */
|
|
|
uint8_t bInterval; /**< Interval for polling Isochronous and Interrupt endpoints. Expressed in frames or microframes depending on the device operating speed (1 ms for Low-Speed and Full-Speed or 125 us for USB High-Speed and above). */
|
|
|
- } USB_DESC_ATTR;
|
|
|
- uint8_t val[USB_EP_DESC_SIZE];
|
|
|
+ } USB_DESC_ATTR; /**< USB descriptor attributes */
|
|
|
+ uint8_t val[USB_EP_DESC_SIZE]; /**< Descriptor value */
|
|
|
} usb_ep_desc_t;
|
|
|
_Static_assert(sizeof(usb_ep_desc_t) == USB_EP_DESC_SIZE, "Size of usb_ep_desc_t incorrect");
|
|
|
|
|
|
@@ -475,8 +475,8 @@ typedef union {
|
|
|
uint8_t bLength; /**< Size of the descriptor in bytes */
|
|
|
uint8_t bDescriptorType; /**< STRING Descriptor Type */
|
|
|
uint16_t wData[]; /**< UTF-16LE encoded */
|
|
|
- } USB_DESC_ATTR;
|
|
|
- uint8_t val[USB_STR_DESC_SIZE];
|
|
|
+ } USB_DESC_ATTR; /**< USB descriptor attributes */
|
|
|
+ uint8_t val[USB_STR_DESC_SIZE]; /**< Descriptor value */
|
|
|
} usb_str_desc_t;
|
|
|
_Static_assert(sizeof(usb_str_desc_t) == USB_STR_DESC_SIZE, "Size of usb_str_desc_t incorrect");
|
|
|
|