usb: Structure definitions for USB device descriptors
This commit is contained in:
@@ -107,6 +107,34 @@ typedef struct
|
|||||||
uint8_t bDescriptorType;
|
uint8_t bDescriptorType;
|
||||||
} usb_desc_base_t;
|
} usb_desc_base_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
usb_desc_base_t base;
|
||||||
|
|
||||||
|
uint8_t bInterfaceNumber;
|
||||||
|
uint8_t bAlternateSetting;
|
||||||
|
uint8_t bNumEndpoints;
|
||||||
|
uint8_t bInterfaceClass;
|
||||||
|
uint8_t bInterfaceSubClass;
|
||||||
|
uint8_t bInterfaceProtocol;
|
||||||
|
uint8_t iInterface;
|
||||||
|
} usb_desc_interface_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
usb_desc_base_t base;
|
||||||
|
uint8_t bEndpointAddress;
|
||||||
|
uint8_t bmAttributes;
|
||||||
|
uint8_t wMaxPacketSize;
|
||||||
|
uint8_t bInterval;
|
||||||
|
} usb_desc_endpoint_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
usb_desc_base_t base;
|
||||||
|
uint16_t bString[];
|
||||||
|
} usb_desc_string_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
usb_desc_base_t base;
|
usb_desc_base_t base;
|
||||||
@@ -117,6 +145,8 @@ typedef struct
|
|||||||
uint8_t iConfiguration;
|
uint8_t iConfiguration;
|
||||||
uint8_t bmAttributes;
|
uint8_t bmAttributes;
|
||||||
uint8_t bMaxPower;
|
uint8_t bMaxPower;
|
||||||
|
|
||||||
|
usb_desc_interface_t interface_descs[];
|
||||||
} usb_desc_conf_t;
|
} usb_desc_conf_t;
|
||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|||||||
Reference in New Issue
Block a user