 |
AM261x MCU+ SDK
11.00.00
|
|
Go to the documentation of this file.
62 #define USETW2(w,h,l) ((w)[0] = (u8)(l), (w)[1] = (u8)(h))
63 #define UCONSTW(x) { (x) & 0xffU, ((x) >> 8) & 0xffU }
64 #define UCONSTDW(x) { (x) & 0xffU, ((x) >> 8) & 0xffU, \
65 ((x) >> 16) & 0xffU, ((x) >> 24) & 0xffU }
68 #define UGETW(w) ((w)[0] | ((uint16_t)(w)[1] << 8))
69 #define USETW(w,v) ((w)[0] = (u8)(v), (w)[1] = (u8)((v) >> 8))
70 #define UGETDW(w) ((w)[0] | ((w)[1] << 8) | ((w)[2] << 16) | ((uint32_t)(w)[3] << 24))
71 #define USETDW(w,v) ((w)[0] = (u8)(v), \
72 (w)[1] = (u8)((v) >> 8), \
73 (w)[2] = (u8)((v) >> 16), \
74 (w)[3] = (u8)((v) >> 24))
80 #define UGETW(w) (*(u_int16_t *)(w))
81 #define USETW(w,v) (*(u_int16_t *)(w) = (v))
82 #define UGETDW(w) (*(u_int32_t *)(w))
83 #define USETDW(w,v) (*(u_int32_t *)(w) = (v))
89 #define IUSETW2(w,h,l) ((w)[0] = (u8)(h), (w)[1] = (u8)(l))
90 #define IUCONSTW(x) { ((x) >> 8) & 0xff, (x) & 0xff }
91 #define IUCONSTDW(x) { ((x) >> 24) & 0xff, ((x) >> 16) & 0xff, \
92 ((x) >> 8) & 0xff, (x) & 0xff }
93 #define IUGETW(w) (((w)[0] << 8) | (w)[1])
94 #define IUSETW(w,v) ((w)[0] = (u8)((v) >> 8), (w)[1] = (u8)(v))
95 #define IUGETDW(w) (((w)[0] << 24) | ((w)[1] << 16) | ((w)[2] << 8) | (w)[3])
96 #define IUSETDW(w,v) ((w)[0] = (u8)((v) >> 24), \
97 (w)[1] = (u8)((v) >> 16), \
98 (w)[2] = (u8)((v) >> 8), \
109 }
UPACKED usb_device_request_t;
111 #define UT_GET_DIR(a) ((a) & 0x80)
112 #define UT_WRITE 0x00
115 #define UT_GET_TYPE(a) ((a) & 0x60U)
116 #define UT_STANDARD 0x00U
117 #define UT_CLASS 0x20U
118 #define UT_VENDOR 0x40U
120 #define UT_GET_RECIPIENT(a) ((a) & 0x1fU)
121 #define UT_DEVICE 0x00
122 #define UT_INTERFACE 0x01
123 #define UT_ENDPOINT 0x02
124 #define UT_OTHER 0x03
126 #define UT_READ_DEVICE (UT_READ | UT_STANDARD | UT_DEVICE)
127 #define UT_READ_INTERFACE (UT_READ | UT_STANDARD | UT_INTERFACE)
128 #define UT_READ_ENDPOINT (UT_READ | UT_STANDARD | UT_ENDPOINT)
129 #define UT_WRITE_DEVICE (UT_WRITE | UT_STANDARD | UT_DEVICE)
130 #define UT_WRITE_INTERFACE (UT_WRITE | UT_STANDARD | UT_INTERFACE)
131 #define UT_WRITE_ENDPOINT (UT_WRITE | UT_STANDARD | UT_ENDPOINT)
132 #define UT_READ_CLASS_DEVICE (UT_READ | UT_CLASS | UT_DEVICE)
133 #define UT_READ_CLASS_INTERFACE (UT_READ | UT_CLASS | UT_INTERFACE)
134 #define UT_READ_CLASS_OTHER (UT_READ | UT_CLASS | UT_OTHER)
135 #define UT_READ_CLASS_ENDPOINT (UT_READ | UT_CLASS | UT_ENDPOINT)
136 #define UT_WRITE_CLASS_DEVICE (UT_WRITE | UT_CLASS | UT_DEVICE)
137 #define UT_WRITE_CLASS_INTERFACE (UT_WRITE | UT_CLASS | UT_INTERFACE)
138 #define UT_WRITE_CLASS_OTHER (UT_WRITE | UT_CLASS | UT_OTHER)
139 #define UT_WRITE_CLASS_ENDPOINT (UT_WRITE | UT_CLASS | UT_ENDPOINT)
140 #define UT_READ_VENDOR_DEVICE (UT_READ | UT_VENDOR | UT_DEVICE)
141 #define UT_READ_VENDOR_INTERFACE (UT_READ | UT_VENDOR | UT_INTERFACE)
142 #define UT_READ_VENDOR_OTHER (UT_READ | UT_VENDOR | UT_OTHER)
143 #define UT_READ_VENDOR_ENDPOINT (UT_READ | UT_VENDOR | UT_ENDPOINT)
144 #define UT_WRITE_VENDOR_DEVICE (UT_WRITE | UT_VENDOR | UT_DEVICE)
145 #define UT_WRITE_VENDOR_INTERFACE (UT_WRITE | UT_VENDOR | UT_INTERFACE)
146 #define UT_WRITE_VENDOR_OTHER (UT_WRITE | UT_VENDOR | UT_OTHER)
147 #define UT_WRITE_VENDOR_ENDPOINT (UT_WRITE | UT_VENDOR | UT_ENDPOINT)
150 #define UR_GET_STATUS 0x00
151 #define USTAT_STANDARD_STATUS 0x00
152 #define WUSTAT_WUSB_FEATURE 0x01
153 #define WUSTAT_CHANNEL_INFO 0x02
154 #define WUSTAT_RECEIVED_DATA 0x03
155 #define WUSTAT_MAS_AVAILABILITY 0x04
156 #define WUSTAT_CURRENT_TRANSMIT_POWER 0x05
157 #define UR_CLEAR_FEATURE 0x01
158 #define UR_SET_FEATURE 0x03
159 #define UR_SET_AND_TEST_FEATURE 0x0c
160 #define UR_SET_ADDRESS 0x05
161 #define UR_GET_DESCRIPTOR 0x06
162 #define UDESC_DEVICE 0x01
163 #define UDESC_CONFIG 0x02
164 #define UDESC_STRING 0x03
165 #define UDESC_INTERFACE 0x04
166 #define UDESC_ENDPOINT 0x05
167 #define UDESC_SS_USB_COMPANION 0x30
168 #define UDESC_DEVICE_QUALIFIER 0x06
169 #define UDESC_OTHER_SPEED_CONFIGURATION 0x07
170 #define UDESC_INTERFACE_POWER 0x08
171 #define UDESC_OTG 0x09
172 #define WUDESC_SECURITY 0x0c
173 #define WUDESC_KEY 0x0d
174 #define WUD_GET_KEY_INDEX(_wValue_) ((_wValue_) & 0xf)
175 #define WUD_GET_KEY_TYPE(_wValue_) (((_wValue_) & 0x30) >> 4)
176 #define WUD_KEY_TYPE_ASSOC 0x01
177 #define WUD_KEY_TYPE_GTK 0x02
178 #define WUD_GET_KEY_ORIGIN(_wValue_) (((_wValue_) & 0x40) >> 6)
179 #define WUD_KEY_ORIGIN_HOST 0x00
180 #define WUD_KEY_ORIGIN_DEVICE 0x01
181 #define WUDESC_ENCRYPTION_TYPE 0x0e
182 #define WUDESC_BOS 0x0f
183 #define WUDESC_DEVICE_CAPABILITY 0x10
184 #define WUDESC_WIRELESS_ENDPOINT_COMPANION 0x11
185 #define UDESC_BOS 0x0f
186 #define UDESC_DEVICE_CAPABILITY 0x10
187 #define UDESC_CS_DEVICE 0x21
188 #define UDESC_CS_CONFIG 0x22
189 #define UDESC_CS_STRING 0x23
190 #define UDESC_CS_INTERFACE 0x24
191 #define UDESC_CS_ENDPOINT 0x25
192 #define UDESC_HUB 0x29
193 #define UR_SET_DESCRIPTOR 0x07
194 #define UR_GET_CONFIG 0x08
195 #define UR_SET_CONFIG 0x09
196 #define UR_GET_INTERFACE 0x0a
197 #define UR_SET_INTERFACE 0x0b
198 #define UR_SYNCH_FRAME 0x0c
199 #define UR_SET_SEL 0x30
200 #define UR_SET_ISOC_DELAY 0x31
201 #define WUR_SET_ENCRYPTION 0x0d
202 #define WUR_GET_ENCRYPTION 0x0e
203 #define WUR_SET_HANDSHAKE 0x0f
204 #define WUR_GET_HANDSHAKE 0x10
205 #define WUR_SET_CONNECTION 0x11
206 #define WUR_SET_SECURITY_DATA 0x12
207 #define WUR_GET_SECURITY_DATA 0x13
208 #define WUR_SET_WUSB_DATA 0x14
209 #define WUDATA_DRPIE_INFO 0x01
210 #define WUDATA_TRANSMIT_DATA 0x02
211 #define WUDATA_TRANSMIT_PARAMS 0x03
212 #define WUDATA_RECEIVE_PARAMS 0x04
213 #define WUDATA_TRANSMIT_POWER 0x05
214 #define WUR_LOOPBACK_DATA_WRITE 0x15
215 #define WUR_LOOPBACK_DATA_READ 0x16
216 #define WUR_SET_INTERFACE_DS 0x17
219 #define UF_ENDPOINT_HALT 0U
220 #define UF_DEVICE_REMOTE_WAKEUP 1
221 #define UF_TEST_MODE 2
222 #define UF_DEVICE_B_HNP_ENABLE 3
223 #define UF_DEVICE_A_HNP_SUPPORT 4
224 #define UF_DEVICE_A_ALT_HNP_SUPPORT 5
226 #define WUF_TX_DRPIE 0x0
227 #define WUF_DEV_XMIT_PACKET 0x1
228 #define WUF_COUNT_PACKETS 0x2
229 #define WUF_CAPTURE_PACKETS 0x3
230 #define UF_FUNCTION_SUSPEND 0
231 #define UF_U1_ENABLE 48
232 #define UF_U2_ENABLE 49
233 #define UF_LTM_ENABLE 50
236 #define UCR_CLEAR_HUB_FEATURE (0x2000 | UR_CLEAR_FEATURE)
237 #define UCR_CLEAR_PORT_FEATURE (0x2300 | UR_CLEAR_FEATURE)
238 #define UCR_GET_HUB_DESCRIPTOR (0xa000 | UR_GET_DESCRIPTOR)
239 #define UCR_GET_HUB_STATUS (0xa000 | UR_GET_STATUS)
240 #define UCR_GET_PORT_STATUS (0xa300 | UR_GET_STATUS)
241 #define UCR_SET_HUB_FEATURE (0x2000 | UR_SET_FEATURE)
242 #define UCR_SET_PORT_FEATURE (0x2300 | UR_SET_FEATURE)
243 #define UCR_SET_AND_TEST_PORT_FEATURE (0xa300 | UR_SET_AND_TEST_FEATURE)
246 #include <pshpack1.h>
257 uByte bDescriptorType;
258 }
UPACKED usb_descriptor_header_t;
262 uByte bDescriptorType;
264 #define UD_USB_2_0 0x0200
265 #define UD_IS_USB2(d) (UGETW((d)->bcdUSB) >= UD_USB_2_0)
278 }
UPACKED usb_device_descriptor_t;
279 #define USB_DEVICE_DESCRIPTOR_SIZE 18
283 uByte bDescriptorType;
288 #define UC_ATT_ONE (1U << 7)
289 #define UC_ATT_SELFPOWER (1U << 6)
290 #define UC_ATT_WAKEUP (1 << 5)
291 #define UC_ATT_BATTERY (1 << 4)
293 #define UC_BUS_POWERED 0x80
294 #define UC_SELF_POWERED 0x40
295 #define UC_REMOTE_WAKEUP 0x20
297 #define UC_POWER_FACTOR 2
298 }
UPACKED usb_config_descriptor_t;
299 #define USB_CONFIG_DESCRIPTOR_SIZE 9
303 uByte bDescriptorType;
311 }
UPACKED usb_interface_descriptor_t;
312 #define USB_INTERFACE_DESCRIPTOR_SIZE 9
321 #define UE_GET_DIR(a) ((a) & 0x80U)
322 #define UE_SET_DIR(a,d) ((a) | (((d)&1) << 7))
323 #define UE_DIR_IN ((uByte)0x80U)
324 #define UE_DIR_OUT ((uByte)0x00U)
325 #define UE_ADDR ((uByte)0x0f)
326 #define UE_GET_ADDR(a) ((a) & UE_ADDR)
328 #define UE_XFERTYPE ((uByte)0x03U)
329 #define UE_CONTROL ((uByte)0x00U)
330 #define UE_ISOCHRONOUS ((uByte)0x01U)
331 #define UE_BULK ((uByte)0x02U)
332 #define UE_INTERRUPT ((uByte)0x03U)
333 #define UE_GET_XFERTYPE(a) ((a) & UE_XFERTYPE)
334 #define UE_ISO_TYPE ((uByte)0x0cU)
335 #define UE_ISO_ASYNC ((uByte)0x04U)
336 #define UE_ISO_ADAPT ((uByte)0x08U)
337 #define UE_ISO_SYNC ((uByte)0x0cU)
338 #define UE_GET_ISO_TYPE(a) ((a) & UE_ISO_TYPE)
342 #define USB_ENDPOINT_DESCRIPTOR_SIZE 7
344 typedef struct ss_endpoint_companion_descriptor {
348 #define USSE_GET_MAX_STREAMS(a) ((a) & 0x1fU)
349 #define USSE_SET_MAX_STREAMS(a, b) ((a) | ((b) & 0x1f))
350 #define USSE_GET_MAX_PACKET_NUM(a) ((a) & 0x03U)
351 #define USSE_SET_MAX_PACKET_NUM(a, b) ((a) | ((b) & 0x03))
355 #define USB_SS_ENDPOINT_COMPANION_DESCRIPTOR_SIZE 6
359 uByte bDescriptorType;
361 }
UPACKED usb_string_descriptor_t;
362 #define USB_MAX_STRING_LEN 128
363 #define USB_LANGUAGE_TABLE 0
366 #define UR_GET_BUS_STATE 0x02
367 #define UR_CLEAR_TT_BUFFER 0x08
368 #define UR_RESET_TT 0x09
369 #define UR_GET_TT_STATE 0x0a
370 #define UR_STOP_TT 0x0b
373 #define UHF_C_HUB_LOCAL_POWER 0
374 #define UHF_C_HUB_OVER_CURRENT 1
375 #define UHF_PORT_CONNECTION 0
376 #define UHF_PORT_ENABLE 1
377 #define UHF_PORT_SUSPEND 2
378 #define UHF_PORT_OVER_CURRENT 3
379 #define UHF_PORT_RESET 4
380 #define UHF_PORT_L1 5
381 #define UHF_PORT_POWER 8
382 #define UHF_PORT_LOW_SPEED 9
383 #define UHF_PORT_HIGH_SPEED 10
384 #define UHF_C_PORT_CONNECTION 16
385 #define UHF_C_PORT_ENABLE 17
386 #define UHF_C_PORT_SUSPEND 18
387 #define UHF_C_PORT_OVER_CURRENT 19
388 #define UHF_C_PORT_RESET 20
389 #define UHF_C_PORT_L1 23
390 #define UHF_PORT_TEST 21
391 #define UHF_PORT_INDICATOR 22
395 uByte bDescriptorType;
398 #define UHD_PWR 0x0003
399 #define UHD_PWR_GANGED 0x0000
400 #define UHD_PWR_INDIVIDUAL 0x0001
401 #define UHD_PWR_NO_SWITCH 0x0002
402 #define UHD_COMPOUND 0x0004
403 #define UHD_OC 0x0018
404 #define UHD_OC_GLOBAL 0x0000
405 #define UHD_OC_INDIVIDUAL 0x0008
406 #define UHD_OC_NONE 0x0010
407 #define UHD_TT_THINK 0x0060
408 #define UHD_TT_THINK_8 0x0000
409 #define UHD_TT_THINK_16 0x0020
410 #define UHD_TT_THINK_24 0x0040
411 #define UHD_TT_THINK_32 0x0060
412 #define UHD_PORT_IND 0x0080
414 #define UHD_PWRON_FACTOR 2
417 #define UHD_NOT_REMOV(desc, i) \
418 (((desc)->DeviceRemovable[(i)/8] >> ((i) % 8)) & 1)
420 }
UPACKED usb_hub_descriptor_t;
421 #define USB_HUB_DESCRIPTOR_SIZE 9
425 uByte bDescriptorType;
428 uByte bDeviceSubClass;
429 uByte bDeviceProtocol;
431 uByte bNumConfigurations;
433 }
UPACKED usb_device_qualifier_t;
434 #define USB_DEVICE_QUALIFIER_SIZE 10
438 uByte bDescriptorType;
440 #define UOTG_SRP 0x01
441 #define UOTG_HNP 0x02
442 }
UPACKED usb_otg_descriptor_t;
445 #define UOTG_B_HNP_ENABLE 3
446 #define UOTG_A_HNP_SUPPORT 4
447 #define UOTG_A_ALT_HNP_SUPPORT 5
448 #define UOTG_NTF_HOST_REL 51
449 #define UOTG_B3_RSP_ENABLE 52
454 #define UDS_SELF_POWERED 0x0001
455 #define UDS_REMOTE_WAKEUP 0x0002
457 #define UES_HALT 0x0001
462 #define UHS_LOCAL_POWER 0x0001
463 #define UHS_OVER_CURRENT 0x0002
469 #define UPS_CURRENT_CONNECT_STATUS 0x0001
470 #define UPS_PORT_ENABLED 0x0002
471 #define UPS_SUSPEND 0x0004
472 #define UPS_OVERCURRENT_INDICATOR 0x0008
473 #define UPS_RESET 0x0010
474 #define UPS_PORT_POWER 0x0100
475 #define UPS_LOW_SPEED 0x0200
476 #define UPS_HIGH_SPEED 0x0400
477 #define UPS_PORT_TEST 0x0800
478 #define UPS_PORT_INDICATOR 0x1000
480 #define UPS_C_CONNECT_STATUS 0x0001
481 #define UPS_C_PORT_ENABLED 0x0002
482 #define UPS_C_SUSPEND 0x0004
483 #define UPS_C_OVERCURRENT_INDICATOR 0x0008
484 #define UPS_C_PORT_RESET 0x0010
492 #define UDCLASS_IN_INTERFACE 0x00
493 #define UDCLASS_COMM 0x02
494 #define UDCLASS_HUB 0x09
495 #define UDSUBCLASS_HUB 0x00
496 #define UDPROTO_FSHUB 0x00
497 #define UDPROTO_HSHUBSTT 0x01
498 #define UDPROTO_HSHUBMTT 0x02
499 #define UDCLASS_DIAGNOSTIC 0xdc
500 #define UDCLASS_WIRELESS 0xe0
501 #define UDSUBCLASS_RF 0x01
502 #define UDPROTO_BLUETOOTH 0x01
503 #define UDCLASS_VENDOR 0xff
506 #define UICLASS_UNSPEC 0x00
508 #define UICLASS_AUDIO 0x01
509 #define UISUBCLASS_AUDIOCONTROL 1
510 #define UISUBCLASS_AUDIOSTREAM 2
511 #define UISUBCLASS_MIDISTREAM 3
513 #define UICLASS_CDC 0x02
514 #define UISUBCLASS_DIRECT_LINE_CONTROL_MODEL 1
515 #define UISUBCLASS_ABSTRACT_CONTROL_MODEL 2
516 #define UISUBCLASS_TELEPHONE_CONTROL_MODEL 3
517 #define UISUBCLASS_MULTICHANNEL_CONTROL_MODEL 4
518 #define UISUBCLASS_CAPI_CONTROLMODEL 5
519 #define UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL 6
520 #define UISUBCLASS_ATM_NETWORKING_CONTROL_MODEL 7
521 #define UIPROTO_CDC_AT 1
523 #define UICLASS_HID 0x03
524 #define UISUBCLASS_BOOT 1
525 #define UIPROTO_BOOT_KEYBOARD 1
527 #define UICLASS_PHYSICAL 0x05
529 #define UICLASS_IMAGE 0x06
531 #define UICLASS_PRINTER 0x07
532 #define UISUBCLASS_PRINTER 1
533 #define UIPROTO_PRINTER_UNI 1
534 #define UIPROTO_PRINTER_BI 2
535 #define UIPROTO_PRINTER_1284 3
537 #define UICLASS_MASS 0x08
538 #define UISUBCLASS_RBC 1
539 #define UISUBCLASS_SFF8020I 2
540 #define UISUBCLASS_QIC157 3
541 #define UISUBCLASS_UFI 4
542 #define UISUBCLASS_SFF8070I 5
543 #define UISUBCLASS_SCSI 6
544 #define UIPROTO_MASS_CBI_I 0
545 #define UIPROTO_MASS_CBI 1
546 #define UIPROTO_MASS_BBB_OLD 2
547 #define UIPROTO_MASS_BBB 80
549 #define UICLASS_HUB 0x09
550 #define UISUBCLASS_HUB 0
551 #define UIPROTO_FSHUB 0
552 #define UIPROTO_HSHUBSTT 0
553 #define UIPROTO_HSHUBMTT 1
555 #define UICLASS_CDC_DATA 0x0a
556 #define UISUBCLASS_DATA 0
557 #define UIPROTO_DATA_ISDNBRI 0x30
558 #define UIPROTO_DATA_HDLC 0x31
559 #define UIPROTO_DATA_TRANSPARENT 0x32
560 #define UIPROTO_DATA_Q921M 0x50
561 #define UIPROTO_DATA_Q921 0x51
562 #define UIPROTO_DATA_Q921TM 0x52
563 #define UIPROTO_DATA_V42BIS 0x90
564 #define UIPROTO_DATA_Q931 0x91
565 #define UIPROTO_DATA_V120 0x92
566 #define UIPROTO_DATA_CAPI 0x93
567 #define UIPROTO_DATA_HOST_BASED 0xfd
568 #define UIPROTO_DATA_PUF 0xfe
569 #define UIPROTO_DATA_VENDOR 0xff
571 #define UICLASS_SMARTCARD 0x0b
575 #define UICLASS_SECURITY 0x0d
577 #define UICLASS_DIAGNOSTIC 0xdc
579 #define UICLASS_WIRELESS 0xe0
580 #define UISUBCLASS_RF 0x01
581 #define UIPROTO_BLUETOOTH 0x01
583 #define UICLASS_APPL_SPEC 0xfe
584 #define UISUBCLASS_FIRMWARE_DOWNLOAD 1
585 #define UISUBCLASS_IRDA 2
586 #define UIPROTO_IRDA 0
588 #define UICLASS_VENDOR 0xff
590 #define USB_HUB_MAX_DEPTH 5
596 #define USB_POWER_DOWN_TIME 200
597 #define USB_PORT_POWER_DOWN_TIME 100
601 #define USB_PORT_RESET_DELAY 10
602 #define USB_PORT_ROOT_RESET_DELAY 50
603 #define USB_PORT_RESET_RECOVERY 10
604 #define USB_PORT_POWERUP_DELAY 100
605 #define USB_SET_ADDRESS_SETTLE 2
606 #define USB_RESUME_DELAY (20*5)
607 #define USB_RESUME_WAIT 10
608 #define USB_RESUME_RECOVERY 10
609 #define USB_EXTRA_POWER_UP_TIME 0
612 #define USB_PORT_RESET_DELAY 50
613 #define USB_PORT_ROOT_RESET_DELAY 250
614 #define USB_PORT_RESET_RECOVERY 250
615 #define USB_PORT_POWERUP_DELAY 300
616 #define USB_SET_ADDRESS_SETTLE 10
617 #define USB_RESUME_DELAY (50*5)
618 #define USB_RESUME_WAIT 50
619 #define USB_RESUME_RECOVERY 50
620 #define USB_EXTRA_POWER_UP_TIME 20
623 #define USB_MIN_POWER 100
624 #define USB_MAX_POWER 500
626 #define USB_BUS_RESET_DELAY 100
628 #define USB_UNCONFIG_NO 0
629 #define USB_UNCONFIG_INDEX (-1)
638 #define USBD_SHORT_XFER_OK 0x04
648 #define USB_CURRENT_CONFIG_INDEX (-1)
649 #define USB_CURRENT_ALT_INDEX (-1)
690 #define USB_MAX_DEVNAMES 4
691 #define USB_MAX_DEVNAMELEN 16
715 #define USB_SPEED_UNKNOWN 0U
716 #define USB_SPEED_LOW 1U
717 #define USB_SPEED_FULL 2U
718 #define USB_SPEED_HIGH 3U
719 #define USB_SPEED_VARIABLE 4U
720 #define USB_SPEED_SUPER 5U
726 #define USB_PORT_ENABLED 0xff
727 #define USB_PORT_SUSPENDED 0xfe
728 #define USB_PORT_POWERED 0xfd
729 #define USB_PORT_DISABLED 0xfc
741 #define WUSB_MIN_IE 0x80U
742 #define WUSB_WCTA_IE 0x80U
743 #define WUSB_WCONNECTACK_IE 0x81U
744 #define WUSB_WHOSTINFO_IE 0x82U
745 #define WUHI_GET_CA(_bmAttributes_) ((_bmAttributes_) & 0x3U)
746 #define WUHI_CA_RECONN 0x00U
747 #define WUHI_CA_LIMITED 0x01U
748 #define WUHI_CA_ALL 0x03U
749 #define WUHI_GET_MLSI(_bmAttributes_) (((_bmAttributes_) & 0x38U) >> 3)
750 #define WUSB_WCHCHANGEANNOUNCE_IE 0x83U
751 #define WUSB_WDEV_DISCONNECT_IE 0x84U
752 #define WUSB_WHOST_DISCONNECT_IE 0x85U
753 #define WUSB_WRELEASE_CHANNEL_IE 0x86U
754 #define WUSB_WWORK_IE 0x87U
755 #define WUSB_WCHANNEL_STOP_IE 0x88U
756 #define WUSB_WDEV_KEEPALIVE_IE 0x89U
757 #define WUSB_WISOCH_DISCARD_IE 0x8AU
758 #define WUSB_WRESETDEVICE_IE 0x8BU
759 #define WUSB_WXMIT_PACKET_ADJUST_IE 0x8CU
760 #define WUSB_MAX_IE 0x8CU
764 #define WUSB_DN_MIN 0x01U
765 #define WUSB_DN_CONNECT 0x01U
766 #define WUSB_DA_OLDCONN 0x00U
767 #define WUSB_DA_NEWCONN 0x01U
768 #define WUSB_DA_SELF_BEACON 0x02U
769 #define WUSB_DA_DIR_BEACON 0x04U
770 #define WUSB_DA_NO_BEACON 0x06U
771 #define WUSB_DN_DISCONNECT 0x02U
772 #define WUSB_DN_EPRDY 0x03U
773 #define WUSB_DN_MASAVAILCHANGED 0x04U
774 #define WUSB_DN_REMOTEWAKEUP 0x05U
775 #define WUSB_DN_SLEEP 0x06U
776 #define WUSB_DN_ALIVE 0x07U
777 #define WUSB_DN_MAX 0x07U
780 #include <pshpack1.h>
784 typedef struct wusb_hndshk_data {
793 #define WUSB_HANDSHAKE_LEN_FOR_MIC 38
796 typedef struct wusb_conn_context {
803 typedef struct wusb_security_desc {
811 typedef struct wusb_encrypt_type_desc {
816 #define WUETD_UNSECURE 0
817 #define WUETD_WIRED 1
818 #define WUETD_CCM_1 2
819 #define WUETD_RSA_1 3
826 typedef struct wusb_key_desc {
835 typedef struct wusb_bos_desc {
842 #define USB_DEVICE_CAPABILITY_20_EXTENSION 0x02
843 typedef struct usb_dev_cap_20_ext_desc {
847 #define USB_20_EXT_LPM 0x02U
848 #define USB_20_EXT_BESL 0x04U
849 #define USB_20_EXT_BASELINE_BESL_VALID 0x08U
850 #define USB_20_EXT_DEEP_BESL_VALID 0x10U
851 #define USB_20_EXT_BASELINE_BESL_BITS 0x00f00U
852 #define USB_20_EXT_BASELINE_BESL_SHIFT 8U
853 #define USB_20_EXT_DEEP_BESL_BITS 0x0f000U
854 #define USB_20_EXT_DEEP_BESL_SHIFT 12U
858 #define USB_DEVICE_CAPABILITY_SS_USB 0x03U
859 typedef struct usb_dev_cap_ss_usb {
863 #define USB_DC_SS_USB_LTM_CAPABLE 0x02U
865 #define USB_DC_SS_USB_SPEED_SUPPORT_LOW 0x01U
866 #define USB_DC_SS_USB_SPEED_SUPPORT_FULL 0x02U
867 #define USB_DC_SS_USB_SPEED_SUPPORT_HIGH 0x04U
868 #define USB_DC_SS_USB_SPEED_SUPPORT_SS 0x08U
875 #define USB_DEVICE_CAPABILITY_CONTAINER_ID 0x04U
876 typedef struct usb_dev_cap_container_id {
885 #define WUSB_DEVICE_CAPABILITY_WIRELESS_USB 0x01U
888 typedef struct wusb_dev_cap_desc {
896 typedef struct wusb_dev_cap_uwb_desc {
909 typedef struct wusb_endpoint_companion_desc {
921 typedef struct wusb_m1_data {
929 typedef struct wusb_m2_data {
937 typedef struct wusb_m3_data {
942 typedef struct wusb_m4_data {
usb_interface_descriptor_t uid_desc
Definition: usb.h:660
uByte iManufacturer
Definition: usb.h:274
uByte bAlternateSetting
Definition: usb.h:305
uDWord bmAttributes
Definition: usb.h:855
uByte bMaxPacketSize
Definition: usb.h:269
unsigned int u_int
Definition: os_defs.h:55
void * ucr_data
Definition: usb.h:636
unsigned int u32
Definition: os_defs.h:41
char udi_devnames[USB_MAX_DEVNAMES][USB_MAX_DEVNAMELEN]
Definition: usb.h:724
uDWord _attributeTypeIdAndLength_5
Definition: usb.h:955
uByte bDeviceProtocol
Definition: usb.h:268
uDWord _attributeTypeIdAndLength_6
Definition: usb.h:958
uDWord length
Definition: usb.h:950
u8 udi_bus
Definition: usb.h:693
uByte bmCompAttributes
Definition: usb.h:917
int ucr_actlen
Definition: usb.h:639
uByte bMaxSequence
Definition: usb.h:913
uWord wHubCharacteristics
Definition: usb.h:397
uByte bNumDeviceCaps
Definition: usb.h:839
uByte bmAttributes
Definition: usb.h:327
uByte bEncryptionType
Definition: usb.h:815
uByte bInterfaceProtocol
Definition: usb.h:309
uByte bDescriptorType
Definition: usb.h:346
uByte bNumEndpoints
Definition: usb.h:306
unsigned short u16
Definition: os_defs.h:43
uWord wStatus
Definition: usb.h:452
uWord wPortStatus
Definition: usb.h:468
uByte bDescriptorType
Definition: usb.h:845
uWord wOverTheAirPacketSize
Definition: usb.h:915
uByte bNbrPorts
Definition: usb.h:396
uByte bDescriptorType
Definition: usb.h:861
uDWord _attributeTypeIdAndLength_2
Definition: usb.h:946
uWord wTotalLength
Definition: usb.h:838
uByte bReserved
Definition: usb.h:880
uByte bRequest
Definition: usb.h:105
u_char ucrd_data[1024]
Definition: usb.h:685
uByte bmAttributes
Definition: usb.h:900
uByte bInterfaceSubClass
Definition: usb.h:308
uWord bcdUSB
Definition: usb.h:263
u_char ucr_data[1024]
Definition: usb.h:734
int ucr_report
Definition: usb.h:733
uByte bDevCapabilityType
Definition: usb.h:846
uWord wTotalLength
Definition: usb.h:284
uByte bMaxBurst
Definition: usb.h:347
uWord associationSubTypeId
Definition: usb.h:947
uByte bDescriptorType
Definition: usb.h:878
usb_event_cookie_t udi_cookie
Definition: usb.h:695
uWord wU2DevExitLat
Definition: usb.h:872
uWord bmBandGroup
Definition: usb.h:904
uByte bNumEncryptionTypes
Definition: usb.h:807
uByte bLength
Definition: usb.h:250
uByte bDescriptorType
Definition: usb.h:828
u_long uds_requests[4]
Definition: usb.h:738
uByte iProduct
Definition: usb.h:275
int ued_config_index
Definition: usb.h:664
int ucr_flags
Definition: usb.h:637
uByte bmAttributes
Definition: usb.h:864
uByte bAuthKeyIndex
Definition: usb.h:822
uByte bFunctionalitySupport
Definition: usb.h:870
uByte bInterfaceNumber
Definition: usb.h:304
uByte bNumConfigurations
Definition: usb.h:277
u8 udi_speed
Definition: usb.h:706
uWord langId
Definition: usb.h:923
#define USB_MAX_STRING_LEN
Definition: usb.h:362
usb_string_descriptor_t usd_desc
Definition: usb.h:680
uWord wPortChange
Definition: usb.h:479
u8 udi_protocol
Definition: usb.h:704
int uid_alt_index
Definition: usb.h:659
uByte bLength
Definition: usb.h:812
usb_device_request_t ucr_request
Definition: usb.h:635
uByte bLength
Definition: usb.h:877
int ued_endpoint_index
Definition: usb.h:667
int ucrd_size
Definition: usb.h:684
u8 udi_class
Definition: usb.h:702
u_char * ufd_data
Definition: usb.h:674
uDWord _attributeTypeIdAndLength_1
Definition: usb.h:943
int uid_config_index
Definition: usb.h:657
uByte bStatus
Definition: usb.h:786
uWord wPHYRates
Definition: usb.h:901
u8 udi_ports[16]
Definition: usb.h:725
uByte bDescriptorType
Definition: usb.h:890
uWord wTotalLength
Definition: usb.h:806
uDWord associationStatus
Definition: usb.h:953
uDWord _attributeTypeIdAndLength_4
Definition: usb.h:952
uByte version
Definition: usb.h:922
uByte bmAttributes
Definition: usb.h:352
uByte bReserved
Definition: usb.h:905
uByte bLength
Definition: usb.h:844
u16 udi_vendorNo
Definition: usb.h:700
uByte bHubContrCurrent
Definition: usb.h:415
uByte bMaxPacketSize0
Definition: usb.h:430
char udi_release[8]
Definition: usb.h:698
uWord wBytesPerInterval
Definition: usb.h:353
uByte bLength
Definition: usb.h:836
uByte bMaxBurst
Definition: usb.h:912
uByte bU1DevExitLat
Definition: usb.h:871
uByte bDescriptorType
Definition: usb.h:805
uByte bReserved
Definition: usb.h:830
uByte bDescriptorType
Definition: usb.h:911
u16 udi_releaseNo
Definition: usb.h:701
uByte bOverTheAirInterval
Definition: usb.h:916
char udi_product[USB_MAX_STRING_LEN]
Definition: usb.h:696
uByte bEncryptionValue
Definition: usb.h:821
uWord wMaxStreamDelay
Definition: usb.h:914
char udi_vendor[USB_MAX_STRING_LEN]
Definition: usb.h:697
u_int ufd_size
Definition: usb.h:673
uByte iInterface
Definition: usb.h:310
uByte bmAttributes
Definition: usb.h:292
int ued_alt_index
Definition: usb.h:666
uByte bConfigurationValue
Definition: usb.h:286
uWord idVendor
Definition: usb.h:271
uByte nd
Definition: usb.h:939
uByte bDescriptorType
Definition: usb.h:837
uByte bLength
Definition: usb.h:860
uByte bPwrOn2PwrGood
Definition: usb.h:413
uByte bDescriptorType
Definition: usb.h:898
uByte bReserved
Definition: usb.h:788
uWord wHubStatus
Definition: usb.h:461
uByte bmTFITXPowerInfo
Definition: usb.h:902
uByte iSerialNumber
Definition: usb.h:276
uWord wHubChange
Definition: usb.h:464
#define USB_MAX_DEVNAMELEN
Definition: usb.h:691
uByte bLength
Definition: usb.h:889
usb_config_descriptor_t ucd_desc
Definition: usb.h:653
uWord idProduct
Definition: usb.h:272
uWord associationTypeId
Definition: usb.h:944
uByte bReserved
Definition: usb.h:432
uByte deviceFriendlyNameLength
Definition: usb.h:924
uWord wSpeedsSupported
Definition: usb.h:869
uByte bmRequestType
Definition: usb.h:104
uByte bDevCapabilityType
Definition: usb.h:899
uWord wLength
Definition: usb.h:108
u32 cookie
Definition: usb.h:688
int ufd_config_index
Definition: usb.h:672
u8 udi_subclass
Definition: usb.h:703
unsigned long u_long
Definition: os_defs.h:54
uByte bmFFITXPowerInfo
Definition: usb.h:903
usb_endpoint_descriptor_t ued_desc
Definition: usb.h:668
uByte bDescriptorType
Definition: usb.h:813
int usd_language_id
Definition: usb.h:679
This structure describes a USB endpoint.
Definition: usb.h:317
uByte bLength
Definition: usb.h:910
uWord langId
Definition: usb.h:931
#define USB_MAX_DEVNAMES
Definition: usb.h:690
uByte bDevCapabilityType
Definition: usb.h:879
uByte bDescLength
Definition: usb.h:394
int uai_config_index
Definition: usb.h:643
uByte bMessageNumber
Definition: usb.h:785
u8 uWord[2]
Definition: usb.h:59
int usd_string_index
Definition: usb.h:678
u8 uByte
Definition: usb.h:58
uByte bLength
Definition: usb.h:827
uByte bInterval
Definition: usb.h:340
uByte bLength
Definition: usb.h:897
uByte bEndpointAddress
Definition: usb.h:320
int ucr_addr
Definition: usb.h:634
uByte bLength
Definition: usb.h:804
u16 udi_productNo
Definition: usb.h:699
u8 udi_addr
Definition: usb.h:694
uByte bNumInterface
Definition: usb.h:285
uByte bDescriptorType
Definition: usb.h:319
int udi_nports
Definition: usb.h:723
uWord wIndex
Definition: usb.h:107
uByte version
Definition: usb.h:930
int uai_interface_index
Definition: usb.h:644
uByte bDeviceSubClass
Definition: usb.h:267
uByte bDevCapabilityType
Definition: usb.h:862
uWord bcdDevice
Definition: usb.h:273
unsigned char u8
Definition: os_defs.h:45
uByte bLength
Definition: usb.h:345
unsigned char u_char
Definition: os_defs.h:57
int ucd_config_index
Definition: usb.h:652
uByte bLength
Definition: usb.h:318
uByte bDescriptorSubtype
Definition: usb.h:252
u8 udi_config
Definition: usb.h:705
int uid_interface_index
Definition: usb.h:658
uDWord _attributeTypeIdAndLength_7
Definition: usb.h:961
uWord wMaxPacketSize
Definition: usb.h:339
uByte bDescriptorType
Definition: usb.h:251
uByte bDevCapabilityType
Definition: usb.h:891
u8 uDWord[4]
Definition: usb.h:60
uByte hostFriendlyNameLength
Definition: usb.h:932
int uai_alt_no
Definition: usb.h:645
int ued_interface_index
Definition: usb.h:665
uByte bDeviceClass
Definition: usb.h:266
uWord wValue
Definition: usb.h:106
uByte bInterfaceClass
Definition: usb.h:307
uDWord _attributeTypeIdAndLength_3
Definition: usb.h:949
uByte bMaxPower
Definition: usb.h:296
uByte iConfiguration
Definition: usb.h:287