62} __attribute__((packed));
65#define USB_CLASS_VENDOR 0xFF
69#define USB_REQ_TYPE_DIRECTION 0x80
70#define USB_REQ_TYPE_IN 0x80
71#define USB_REQ_TYPE_OUT 0x0
73#define USB_REQ_TYPE_TYPE 0x60
74#define USB_REQ_TYPE_STANDARD 0x00
75#define USB_REQ_TYPE_CLASS 0x20
76#define USB_REQ_TYPE_VENDOR 0x40
78#define USB_REQ_TYPE_RECIPIENT 0x1F
79#define USB_REQ_TYPE_DEVICE 0x00
80#define USB_REQ_TYPE_INTERFACE 0x01
81#define USB_REQ_TYPE_ENDPOINT 0x02
82#define USB_REQ_TYPE_OTHER 0x03
85#define USB_REQ_GET_STATUS 0
86#define USB_REQ_CLEAR_FEATURE 1
88#define USB_REQ_SET_FEATURE 3
90#define USB_REQ_SET_ADDRESS 5
91#define USB_REQ_GET_DESCRIPTOR 6
92#define USB_REQ_SET_DESCRIPTOR 7
93#define USB_REQ_GET_CONFIGURATION 8
94#define USB_REQ_SET_CONFIGURATION 9
95#define USB_REQ_GET_INTERFACE 10
96#define USB_REQ_SET_INTERFACE 11
97#define USB_REQ_SET_SYNCH_FRAME 12
100#define USB_DT_DEVICE 1
101#define USB_DT_CONFIGURATION 2
102#define USB_DT_STRING 3
103#define USB_DT_INTERFACE 4
104#define USB_DT_ENDPOINT 5
105#define USB_DT_DEVICE_QUALIFIER 6
106#define USB_DT_OTHER_SPEED_CONFIGURATION 7
107#define USB_DT_INTERFACE_POWER 8
110#define USB_DT_DEBUG 10
111#define USB_DT_INTERFACE_ASSOCIATION 11
114#define USB_FEAT_ENDPOINT_HALT 0
115#define USB_FEAT_DEVICE_REMOTE_WAKEUP 1
116#define USB_FEAT_TEST_MODE 2
119#define USB_DEV_STATUS_SELF_POWERED 0x01
120#define USB_DEV_STATUS_REMOTE_WAKEUP 0x02
138} __attribute__((packed));
140#define USB_DT_DEVICE_SIZE sizeof(struct usb_device_descriptor)
155} __attribute__((packed));
180} __attribute__((packed));
181#define USB_DT_CONFIGURATION_SIZE 9
184#define USB_CONFIG_ATTR_DEFAULT 0x80
185#define USB_CONFIG_ATTR_SELF_POWERED 0x40
186#define USB_CONFIG_ATTR_REMOTE_WAKEUP 0x20
208} __attribute__((packed));
209#define USB_DT_INTERFACE_SIZE 9
223} __attribute__((packed));
224#define USB_DT_ENDPOINT_SIZE 7
227#define USB_ENDPOINT_ADDR_OUT(x) (x)
228#define USB_ENDPOINT_ADDR_IN(x) (0x80 | (x))
232#define USB_ENDPOINT_ATTR_CONTROL 0x00
233#define USB_ENDPOINT_ATTR_ISOCHRONOUS 0x01
234#define USB_ENDPOINT_ATTR_BULK 0x02
235#define USB_ENDPOINT_ATTR_INTERRUPT 0x03
236#define USB_ENDPOINT_ATTR_TYPE 0x03
238#define USB_ENDPOINT_ATTR_NOSYNC 0x00
239#define USB_ENDPOINT_ATTR_ASYNC 0x04
240#define USB_ENDPOINT_ATTR_ADAPTIVE 0x08
241#define USB_ENDPOINT_ATTR_SYNC 0x0C
242#define USB_ENDPOINT_ATTR_SYNCTYPE 0x0C
244#define USB_ENDPOINT_ATTR_DATA 0x00
245#define USB_ENDPOINT_ATTR_FEEDBACK 0x10
246#define USB_ENDPOINT_ATTR_IMPLICIT_FEEDBACK_DATA 0x20
247#define USB_ENDPOINT_ATTR_USAGETYPE 0x30
256} __attribute__((packed));
268} __attribute__((packed));
269#define USB_DT_INTERFACE_ASSOCIATION_SIZE \
270 sizeof(struct usb_iface_assoc_descriptor)
const struct usb_interface * interface
uint8_t bConfigurationValue
uint8_t bNumConfigurations
uint8_t bNumConfigurations
uint8_t bFunctionProtocol
uint8_t bFunctionSubClass
uint8_t bInterfaceProtocol
const struct usb_endpoint_descriptor * endpoint
uint8_t bAlternateSetting
uint8_t bInterfaceSubClass
const struct usb_iface_assoc_descriptor * iface_assoc
const struct usb_interface_descriptor * altsetting