AM261x MCU+ SDK  11.00.00
usb.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 1998 The NetBSD Foundation, Inc.
3  * All rights reserved.
4  *
5  * This code is derived from software contributed to The NetBSD Foundation
6  * by Lennart Augustsson (lennart@augustsson.net) at
7  * Carlstedt Research & Technology.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  * notice, this list of conditions and the following disclaimer in the
16  * documentation and/or other materials provided with the distribution.
17  * 3. All advertising materials mentioning features or use of this software
18  * must display the following acknowledgement:
19  * This product includes software developed by the NetBSD
20  * Foundation, Inc. and its contributors.
21  * 4. Neither the name of The NetBSD Foundation nor the names of its
22  * contributors may be used to endorse or promote products derived
23  * from this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
29  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35  * POSSIBILITY OF SUCH DAMAGE.
36  */
37 
38 /* Modified by Synopsys, Inc, 12/12/2007 */
39 
40 
41 #ifndef _USB_H_
42 #define _USB_H_
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
52 /*
53  * The USB records contain some unaligned little-endian word
54  * components. The U[SG]ETW macros take care of both the alignment
55  * and endian problem and should always be used to access non-byte
56  * values.
57  */
58 typedef u8 uByte;
59 typedef u8 uWord[2];
60 typedef u8 uDWord[4];
61 
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 }
66 
67 #if 1
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))
75 #else
76 /*
77  * On little-endian machines that can handle unaligned accesses
78  * (e.g. i386) these macros can be replaced by the following.
79  */
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))
84 #endif
85 
86 /*
87  * Macros for accessing UAS IU fields, which are big-endian
88  */
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), \
99  (w)[3] = (u8)(v))
100 
101 //#define UPACKED __attribute__((__packed__))
102 
103 typedef struct {
109 } UPACKED usb_device_request_t;
110 
111 #define UT_GET_DIR(a) ((a) & 0x80)
112 #define UT_WRITE 0x00
113 #define UT_READ 0x80
114 
115 #define UT_GET_TYPE(a) ((a) & 0x60U)
116 #define UT_STANDARD 0x00U
117 #define UT_CLASS 0x20U
118 #define UT_VENDOR 0x40U
119 
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
125 
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)
148 
149 /* Requests */
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 /* class specific */
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
217 
218 /* Feature numbers */
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
225 #define WUF_WUSB 3
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
234 
235 /* Class requests from the USB 2.0 hub spec, table 11-15 */
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)
244 
245 #ifdef _MSC_VER
246 #include <pshpack1.h>
247 #endif
248 
249 typedef struct {
253 } UPACKED usb_descriptor_t;
254 
255 typedef struct {
256  uByte bLength;
257  uByte bDescriptorType;
258 } UPACKED usb_descriptor_header_t;
259 
260 typedef struct {
261  uByte bLength;
262  uByte bDescriptorType;
264 #define UD_USB_2_0 0x0200
265 #define UD_IS_USB2(d) (UGETW((d)->bcdUSB) >= UD_USB_2_0)
270  /* The fields below are not part of the initial descriptor. */
278 } UPACKED usb_device_descriptor_t;
279 #define USB_DEVICE_DESCRIPTOR_SIZE 18
280 
281 typedef struct {
282  uByte bLength;
283  uByte bDescriptorType;
288 #define UC_ATT_ONE (1U << 7) /* must be set */
289 #define UC_ATT_SELFPOWER (1U << 6) /* self powered */
290 #define UC_ATT_WAKEUP (1 << 5) /* can wakeup */
291 #define UC_ATT_BATTERY (1 << 4) /* battery powered */
293 #define UC_BUS_POWERED 0x80
294 #define UC_SELF_POWERED 0x40
295 #define UC_REMOTE_WAKEUP 0x20
296  uByte bMaxPower; /* max current in 2 mA units */
297 #define UC_POWER_FACTOR 2
298 } UPACKED usb_config_descriptor_t;
299 #define USB_CONFIG_DESCRIPTOR_SIZE 9
300 
301 typedef struct {
302  uByte bLength;
303  uByte bDescriptorType;
311 } UPACKED usb_interface_descriptor_t;
312 #define USB_INTERFACE_DESCRIPTOR_SIZE 9
313 
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
343 
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
356 
357 typedef struct {
358  uByte bLength;
359  uByte bDescriptorType;
360  uWord bString[127];
361 } UPACKED usb_string_descriptor_t;
362 #define USB_MAX_STRING_LEN 128
363 #define USB_LANGUAGE_TABLE 0 /* # of the string language id table */
364 
365 /* Hub specific request */
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
371 
372 /* Hub features */
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
392 
393 typedef struct {
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
413  uByte bPwrOn2PwrGood; /* delay in 2 ms units */
414 #define UHD_PWRON_FACTOR 2
416  uByte DeviceRemovable[32]; /* max 255 ports */
417 #define UHD_NOT_REMOV(desc, i) \
418  (((desc)->DeviceRemovable[(i)/8] >> ((i) % 8)) & 1)
419  /* deprecated */ uByte PortPowerCtrlMask[1];
420 } UPACKED usb_hub_descriptor_t;
421 #define USB_HUB_DESCRIPTOR_SIZE 9 /* includes deprecated PortPowerCtrlMask */
422 
423 typedef struct {
424  uByte bLength;
425  uByte bDescriptorType;
426  uWord bcdUSB;
427  uByte bDeviceClass;
428  uByte bDeviceSubClass;
429  uByte bDeviceProtocol;
431  uByte bNumConfigurations;
433 } UPACKED usb_device_qualifier_t;
434 #define USB_DEVICE_QUALIFIER_SIZE 10
435 
436 typedef struct {
437  uByte bLength;
438  uByte bDescriptorType;
439  uByte bmAttributes;
440 #define UOTG_SRP 0x01
441 #define UOTG_HNP 0x02
442 } UPACKED usb_otg_descriptor_t;
443 
444 /* OTG feature selectors */
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
450 
451 typedef struct {
453 /* Device status flags */
454 #define UDS_SELF_POWERED 0x0001
455 #define UDS_REMOTE_WAKEUP 0x0002
456 /* Endpoint status flags */
457 #define UES_HALT 0x0001
458 } UPACKED usb_status_t;
459 
460 typedef struct {
462 #define UHS_LOCAL_POWER 0x0001
463 #define UHS_OVER_CURRENT 0x0002
465 } UPACKED usb_hub_status_t;
466 
467 typedef struct {
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
485 } UPACKED usb_port_status_t;
486 
487 #ifdef _MSC_VER
488 #include <poppack.h>
489 #endif
490 
491 /* Device class codes */
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
504 
505 /* Interface class codes */
506 #define UICLASS_UNSPEC 0x00
507 
508 #define UICLASS_AUDIO 0x01
509 #define UISUBCLASS_AUDIOCONTROL 1
510 #define UISUBCLASS_AUDIOSTREAM 2
511 #define UISUBCLASS_MIDISTREAM 3
512 
513 #define UICLASS_CDC 0x02 /* communication */
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
522 
523 #define UICLASS_HID 0x03
524 #define UISUBCLASS_BOOT 1
525 #define UIPROTO_BOOT_KEYBOARD 1
526 
527 #define UICLASS_PHYSICAL 0x05
528 
529 #define UICLASS_IMAGE 0x06
530 
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
536 
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 /* Not in the spec anymore */
547 #define UIPROTO_MASS_BBB 80 /* 'P' for the Iomega Zip drive */
548 
549 #define UICLASS_HUB 0x09
550 #define UISUBCLASS_HUB 0
551 #define UIPROTO_FSHUB 0
552 #define UIPROTO_HSHUBSTT 0 /* Yes, same as previous */
553 #define UIPROTO_HSHUBMTT 1
554 
555 #define UICLASS_CDC_DATA 0x0a
556 #define UISUBCLASS_DATA 0
557 #define UIPROTO_DATA_ISDNBRI 0x30 /* Physical iface */
558 #define UIPROTO_DATA_HDLC 0x31 /* HDLC */
559 #define UIPROTO_DATA_TRANSPARENT 0x32 /* Transparent */
560 #define UIPROTO_DATA_Q921M 0x50 /* Management for Q921 */
561 #define UIPROTO_DATA_Q921 0x51 /* Data for Q921 */
562 #define UIPROTO_DATA_Q921TM 0x52 /* TEI multiplexer for Q921 */
563 #define UIPROTO_DATA_V42BIS 0x90 /* Data compression */
564 #define UIPROTO_DATA_Q931 0x91 /* Euro-ISDN */
565 #define UIPROTO_DATA_V120 0x92 /* V.24 rate adaption */
566 #define UIPROTO_DATA_CAPI 0x93 /* CAPI 2.0 commands */
567 #define UIPROTO_DATA_HOST_BASED 0xfd /* Host based driver */
568 #define UIPROTO_DATA_PUF 0xfe /* see Prot. Unit Func. Desc.*/
569 #define UIPROTO_DATA_VENDOR 0xff /* Vendor specific */
570 
571 #define UICLASS_SMARTCARD 0x0b
572 
573 /*#define UICLASS_FIRM_UPD 0x0c*/
574 
575 #define UICLASS_SECURITY 0x0d
576 
577 #define UICLASS_DIAGNOSTIC 0xdc
578 
579 #define UICLASS_WIRELESS 0xe0
580 #define UISUBCLASS_RF 0x01
581 #define UIPROTO_BLUETOOTH 0x01
582 
583 #define UICLASS_APPL_SPEC 0xfe
584 #define UISUBCLASS_FIRMWARE_DOWNLOAD 1
585 #define UISUBCLASS_IRDA 2
586 #define UIPROTO_IRDA 0
587 
588 #define UICLASS_VENDOR 0xff
589 
590 #define USB_HUB_MAX_DEPTH 5
591 
592 /*
593  * Minimum time a device needs to be powered down to go through
594  * a power cycle. XXX Are these time in the spec?
595  */
596 #define USB_POWER_DOWN_TIME 200 /* ms */
597 #define USB_PORT_POWER_DOWN_TIME 100 /* ms */
598 
599 #if 0
600 /* These are the values from the spec. */
601 #define USB_PORT_RESET_DELAY 10 /* ms */
602 #define USB_PORT_ROOT_RESET_DELAY 50 /* ms */
603 #define USB_PORT_RESET_RECOVERY 10 /* ms */
604 #define USB_PORT_POWERUP_DELAY 100 /* ms */
605 #define USB_SET_ADDRESS_SETTLE 2 /* ms */
606 #define USB_RESUME_DELAY (20*5) /* ms */
607 #define USB_RESUME_WAIT 10 /* ms */
608 #define USB_RESUME_RECOVERY 10 /* ms */
609 #define USB_EXTRA_POWER_UP_TIME 0 /* ms */
610 #else
611 /* Allow for marginal (i.e. non-conforming) devices. */
612 #define USB_PORT_RESET_DELAY 50 /* ms */
613 #define USB_PORT_ROOT_RESET_DELAY 250 /* ms */
614 #define USB_PORT_RESET_RECOVERY 250 /* ms */
615 #define USB_PORT_POWERUP_DELAY 300 /* ms */
616 #define USB_SET_ADDRESS_SETTLE 10 /* ms */
617 #define USB_RESUME_DELAY (50*5) /* ms */
618 #define USB_RESUME_WAIT 50 /* ms */
619 #define USB_RESUME_RECOVERY 50 /* ms */
620 #define USB_EXTRA_POWER_UP_TIME 20 /* ms */
621 #endif
622 
623 #define USB_MIN_POWER 100 /* mA */
624 #define USB_MAX_POWER 500 /* mA */
625 
626 #define USB_BUS_RESET_DELAY 100 /* ms XXX?*/
627 
628 #define USB_UNCONFIG_NO 0
629 #define USB_UNCONFIG_INDEX (-1)
630 
631 /*** ioctl() related stuff ***/
632 
634  int ucr_addr;
635  usb_device_request_t ucr_request;
636  void *ucr_data;
638 #define USBD_SHORT_XFER_OK 0x04 /* allow short reads */
639  int ucr_actlen; /* actual length transferred */
640 };
641 
646 };
647 
648 #define USB_CURRENT_CONFIG_INDEX (-1)
649 #define USB_CURRENT_ALT_INDEX (-1)
650 
653  usb_config_descriptor_t ucd_desc;
654 };
655 
660  usb_interface_descriptor_t uid_desc;
661 };
662 
669 };
670 
675 };
676 
680  usb_string_descriptor_t usd_desc;
681 };
682 
685  u_char ucrd_data[1024]; /* filled data size will vary */
686 };
687 
688 typedef struct { u32 cookie; } usb_event_cookie_t;
689 
690 #define USB_MAX_DEVNAMES 4
691 #define USB_MAX_DEVNAMELEN 16
694  u8 udi_addr; /* device address */
698  char udi_release[8];
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
722  int udi_power; /* power consumption in mA, 0 if selfpowered */
725  u8 udi_ports[16];/* hub only: addresses of devices on ports */
726 #define USB_PORT_ENABLED 0xff
727 #define USB_PORT_SUSPENDED 0xfe
728 #define USB_PORT_POWERED 0xfd
729 #define USB_PORT_DISABLED 0xfc
730 };
731 
734  u_char ucr_data[1024]; /* filled data size will vary */
735 };
736 
738  u_long uds_requests[4]; /* indexed by transfer type UE_* */
739 };
740 
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
761 
762 /* Device Notification Types */
763 
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
778 
779 #ifdef _MSC_VER
780 #include <pshpack1.h>
781 #endif
782 
783 /* WUSB Handshake Data. Used during the SET/GET HANDSHAKE requests */
784 typedef struct wusb_hndshk_data {
787  uByte tTKID[3];
789  uByte CDID[16];
790  uByte Nonce[16];
791  uByte MIC[8];
793 #define WUSB_HANDSHAKE_LEN_FOR_MIC 38
794 
795 /* WUSB Connection Context */
796 typedef struct wusb_conn_context {
797  uByte CHID [16];
798  uByte CDID [16];
799  uByte CK [16];
801 
802 /* WUSB Security Descriptor */
803 typedef struct wusb_security_desc {
809 
810 /* WUSB Encryption Type Descriptor */
811 typedef struct wusb_encrypt_type_desc {
814 
816 #define WUETD_UNSECURE 0
817 #define WUETD_WIRED 1
818 #define WUETD_CCM_1 2
819 #define WUETD_RSA_1 3
820 
824 
825 /* WUSB Key Descriptor */
826 typedef struct wusb_key_desc {
829  uByte tTKID[3];
831  uByte KeyData[1]; /* variable length */
833 
834 /* WUSB BOS Descriptor (Binary device Object Store) */
835 typedef struct wusb_bos_desc {
841 
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
857 
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
874 
875 #define USB_DEVICE_CAPABILITY_CONTAINER_ID 0x04U
876 typedef struct usb_dev_cap_container_id {
881  uByte containerID[16];
883 
884 /* Device Capability Type Codes */
885 #define WUSB_DEVICE_CAPABILITY_WIRELESS_USB 0x01U
886 
887 /* Device Capability Descriptor */
888 typedef struct wusb_dev_cap_desc {
892  uByte caps[1]; /* Variable length */
894 
895 /* Device Capability Descriptor */
896 typedef struct wusb_dev_cap_uwb_desc {
901  uWord wPHYRates; /* Bitmap */
907 
908 /* Wireless USB Endpoint Companion Descriptor */
909 typedef struct wusb_endpoint_companion_desc {
919 
920 /* Wireless USB Numeric Association M1 Data Structure */
921 typedef struct wusb_m1_data {
925  uByte sha_256_m3[32];
926  uByte deviceFriendlyName[256];
928 
929 typedef struct wusb_m2_data {
933  uByte pkh[384];
934  uByte hostFriendlyName[256];
936 
937 typedef struct wusb_m3_data {
938  uByte pkd[384];
941 
942 typedef struct wusb_m4_data {
945 
948 
951 
954 
956  uByte chid[16];
957 
959  uByte cdid[16];
960 
962  uByte bandGroups[2];
964 
965 #ifdef _MSC_VER
966 #include <poppack.h>
967 #endif
968 
969 #ifdef __cplusplus
970 }
971 #endif
972 
973 #endif /* _USB_H_ */
usb_interface_desc::uid_desc
usb_interface_descriptor_t uid_desc
Definition: usb.h:660
UPACKED::iManufacturer
uByte iManufacturer
Definition: usb.h:274
UPACKED::bAlternateSetting
uByte bAlternateSetting
Definition: usb.h:305
usb_dev_cap_20_ext_desc_t::bmAttributes
uDWord bmAttributes
Definition: usb.h:855
UPACKED::bMaxPacketSize
uByte bMaxPacketSize
Definition: usb.h:269
u_int
unsigned int u_int
Definition: os_defs.h:55
usb_ctl_request::ucr_data
void * ucr_data
Definition: usb.h:636
u32
unsigned int u32
Definition: os_defs.h:41
usb_device_info::udi_devnames
char udi_devnames[USB_MAX_DEVNAMES][USB_MAX_DEVNAMELEN]
Definition: usb.h:724
wusb_m4_data_t::_attributeTypeIdAndLength_5
uDWord _attributeTypeIdAndLength_5
Definition: usb.h:955
UPACKED::bDeviceProtocol
uByte bDeviceProtocol
Definition: usb.h:268
wusb_m4_data_t::_attributeTypeIdAndLength_6
uDWord _attributeTypeIdAndLength_6
Definition: usb.h:958
wusb_m4_data_t::length
uDWord length
Definition: usb.h:950
usb_device_info::udi_bus
u8 udi_bus
Definition: usb.h:693
wusb_endpoint_companion_desc_t::bmCompAttributes
uByte bmCompAttributes
Definition: usb.h:917
usb_ctl_request::ucr_actlen
int ucr_actlen
Definition: usb.h:639
wusb_endpoint_companion_desc_t::bMaxSequence
uByte bMaxSequence
Definition: usb.h:913
UPACKED::wHubCharacteristics
uWord wHubCharacteristics
Definition: usb.h:397
wusb_bos_desc_t::bNumDeviceCaps
uByte bNumDeviceCaps
Definition: usb.h:839
usb_endpoint_descriptor_t::bmAttributes
uByte bmAttributes
Definition: usb.h:327
wusb_encrypt_type_desc_t::bEncryptionType
uByte bEncryptionType
Definition: usb.h:815
UPACKED::bInterfaceProtocol
uByte bInterfaceProtocol
Definition: usb.h:309
ss_endpoint_companion_descriptor_t::bDescriptorType
uByte bDescriptorType
Definition: usb.h:346
UPACKED::bNumEndpoints
uByte bNumEndpoints
Definition: usb.h:306
u16
unsigned short u16
Definition: os_defs.h:43
UPACKED::wStatus
uWord wStatus
Definition: usb.h:452
UPACKED::wPortStatus
uWord wPortStatus
Definition: usb.h:468
usb_dev_cap_20_ext_desc_t::bDescriptorType
uByte bDescriptorType
Definition: usb.h:845
usb_dev_cap_ss_usb_t
Definition: usb.h:859
wusb_endpoint_companion_desc_t::wOverTheAirPacketSize
uWord wOverTheAirPacketSize
Definition: usb.h:915
UPACKED::bNbrPorts
uByte bNbrPorts
Definition: usb.h:396
usb_dev_cap_ss_usb_t::bDescriptorType
uByte bDescriptorType
Definition: usb.h:861
wusb_m4_data_t::_attributeTypeIdAndLength_2
uDWord _attributeTypeIdAndLength_2
Definition: usb.h:946
UPACKED
Definition: usb.h:103
wusb_bos_desc_t::wTotalLength
uWord wTotalLength
Definition: usb.h:838
usb_dev_cap_container_id_t::bReserved
uByte bReserved
Definition: usb.h:880
UPACKED::bRequest
uByte bRequest
Definition: usb.h:105
usb_dev_cap_container_id_t
Definition: usb.h:876
usb_ctl_report_desc::ucrd_data
u_char ucrd_data[1024]
Definition: usb.h:685
wusb_m3_data_t
Definition: usb.h:937
wusb_dev_cap_uwb_desc_t::bmAttributes
uByte bmAttributes
Definition: usb.h:900
usb_device_stats
Definition: usb.h:737
UPACKED::bInterfaceSubClass
uByte bInterfaceSubClass
Definition: usb.h:308
UPACKED::bcdUSB
uWord bcdUSB
Definition: usb.h:263
usb_ctl_report::ucr_data
u_char ucr_data[1024]
Definition: usb.h:734
usb_ctl_report::ucr_report
int ucr_report
Definition: usb.h:733
usb_dev_cap_20_ext_desc_t::bDevCapabilityType
uByte bDevCapabilityType
Definition: usb.h:846
UPACKED::wTotalLength
uWord wTotalLength
Definition: usb.h:284
ss_endpoint_companion_descriptor_t::bMaxBurst
uByte bMaxBurst
Definition: usb.h:347
wusb_m4_data_t::associationSubTypeId
uWord associationSubTypeId
Definition: usb.h:947
wusb_m4_data_t
Definition: usb.h:942
usb_dev_cap_container_id_t::bDescriptorType
uByte bDescriptorType
Definition: usb.h:878
usb_device_info::udi_cookie
usb_event_cookie_t udi_cookie
Definition: usb.h:695
usb_dev_cap_ss_usb_t::wU2DevExitLat
uWord wU2DevExitLat
Definition: usb.h:872
wusb_dev_cap_uwb_desc_t::bmBandGroup
uWord bmBandGroup
Definition: usb.h:904
wusb_security_desc_t::bNumEncryptionTypes
uByte bNumEncryptionTypes
Definition: usb.h:807
UPACKED::bLength
uByte bLength
Definition: usb.h:250
usb_full_desc
Definition: usb.h:671
wusb_key_desc_t::bDescriptorType
uByte bDescriptorType
Definition: usb.h:828
wusb_m2_data_t
Definition: usb.h:929
usb_device_stats::uds_requests
u_long uds_requests[4]
Definition: usb.h:738
ss_endpoint_companion_descriptor_t
Definition: usb.h:344
UPACKED::iProduct
uByte iProduct
Definition: usb.h:275
usb_endpoint_desc::ued_config_index
int ued_config_index
Definition: usb.h:664
usb_ctl_request::ucr_flags
int ucr_flags
Definition: usb.h:637
usb_dev_cap_ss_usb_t::bmAttributes
uByte bmAttributes
Definition: usb.h:864
wusb_encrypt_type_desc_t::bAuthKeyIndex
uByte bAuthKeyIndex
Definition: usb.h:822
usb_dev_cap_ss_usb_t::bFunctionalitySupport
uByte bFunctionalitySupport
Definition: usb.h:870
UPACKED::bInterfaceNumber
uByte bInterfaceNumber
Definition: usb.h:304
UPACKED::bNumConfigurations
uByte bNumConfigurations
Definition: usb.h:277
usb_device_info::udi_speed
u8 udi_speed
Definition: usb.h:706
wusb_m1_data_t::langId
uWord langId
Definition: usb.h:923
USB_MAX_STRING_LEN
#define USB_MAX_STRING_LEN
Definition: usb.h:362
usb_string_desc::usd_desc
usb_string_descriptor_t usd_desc
Definition: usb.h:680
UPACKED::wPortChange
uWord wPortChange
Definition: usb.h:479
usb_device_info::udi_protocol
u8 udi_protocol
Definition: usb.h:704
usb_interface_desc::uid_alt_index
int uid_alt_index
Definition: usb.h:659
wusb_encrypt_type_desc_t::bLength
uByte bLength
Definition: usb.h:812
usb_ctl_report_desc
Definition: usb.h:683
usb_ctl_request::ucr_request
usb_device_request_t ucr_request
Definition: usb.h:635
wusb_key_desc_t
Definition: usb.h:826
usb_interface_desc
Definition: usb.h:656
usb_dev_cap_container_id_t::bLength
uByte bLength
Definition: usb.h:877
usb_endpoint_desc::ued_endpoint_index
int ued_endpoint_index
Definition: usb.h:667
usb_ctl_report_desc::ucrd_size
int ucrd_size
Definition: usb.h:684
usb_device_info::udi_class
u8 udi_class
Definition: usb.h:702
usb_full_desc::ufd_data
u_char * ufd_data
Definition: usb.h:674
usb_device_info
Definition: usb.h:692
wusb_m4_data_t::_attributeTypeIdAndLength_1
uDWord _attributeTypeIdAndLength_1
Definition: usb.h:943
usb_interface_desc::uid_config_index
int uid_config_index
Definition: usb.h:657
wusb_hndshk_data_t::bStatus
uByte bStatus
Definition: usb.h:786
wusb_dev_cap_uwb_desc_t::wPHYRates
uWord wPHYRates
Definition: usb.h:901
usb_device_info::udi_ports
u8 udi_ports[16]
Definition: usb.h:725
wusb_encrypt_type_desc_t
Definition: usb.h:811
wusb_security_desc_t
Definition: usb.h:803
wusb_dev_cap_desc_t::bDescriptorType
uByte bDescriptorType
Definition: usb.h:890
wusb_security_desc_t::wTotalLength
uWord wTotalLength
Definition: usb.h:806
wusb_m4_data_t::associationStatus
uDWord associationStatus
Definition: usb.h:953
wusb_m4_data_t::_attributeTypeIdAndLength_4
uDWord _attributeTypeIdAndLength_4
Definition: usb.h:952
wusb_m1_data_t::version
uByte version
Definition: usb.h:922
wusb_hndshk_data_t
Definition: usb.h:784
wusb_bos_desc_t
Definition: usb.h:835
ss_endpoint_companion_descriptor_t::bmAttributes
uByte bmAttributes
Definition: usb.h:352
wusb_dev_cap_uwb_desc_t::bReserved
uByte bReserved
Definition: usb.h:905
usb_dev_cap_20_ext_desc_t::bLength
uByte bLength
Definition: usb.h:844
usb_device_info::udi_vendorNo
u16 udi_vendorNo
Definition: usb.h:700
UPACKED::bHubContrCurrent
uByte bHubContrCurrent
Definition: usb.h:415
UPACKED::bMaxPacketSize0
uByte bMaxPacketSize0
Definition: usb.h:430
usb_config_desc
Definition: usb.h:651
usb_device_info::udi_release
char udi_release[8]
Definition: usb.h:698
ss_endpoint_companion_descriptor_t::wBytesPerInterval
uWord wBytesPerInterval
Definition: usb.h:353
wusb_bos_desc_t::bLength
uByte bLength
Definition: usb.h:836
wusb_endpoint_companion_desc_t::bMaxBurst
uByte bMaxBurst
Definition: usb.h:912
usb_endpoint_desc
Definition: usb.h:663
usb_dev_cap_ss_usb_t::bU1DevExitLat
uByte bU1DevExitLat
Definition: usb.h:871
wusb_security_desc_t::bDescriptorType
uByte bDescriptorType
Definition: usb.h:805
wusb_key_desc_t::bReserved
uByte bReserved
Definition: usb.h:830
wusb_endpoint_companion_desc_t::bDescriptorType
uByte bDescriptorType
Definition: usb.h:911
usb_device_info::udi_releaseNo
u16 udi_releaseNo
Definition: usb.h:701
wusb_endpoint_companion_desc_t::bOverTheAirInterval
uByte bOverTheAirInterval
Definition: usb.h:916
usb_device_info::udi_product
char udi_product[USB_MAX_STRING_LEN]
Definition: usb.h:696
wusb_encrypt_type_desc_t::bEncryptionValue
uByte bEncryptionValue
Definition: usb.h:821
wusb_endpoint_companion_desc_t::wMaxStreamDelay
uWord wMaxStreamDelay
Definition: usb.h:914
usb_device_info::udi_vendor
char udi_vendor[USB_MAX_STRING_LEN]
Definition: usb.h:697
usb_ctl_report
Definition: usb.h:732
wusb_m1_data_t
Definition: usb.h:921
usb_full_desc::ufd_size
u_int ufd_size
Definition: usb.h:673
UPACKED::iInterface
uByte iInterface
Definition: usb.h:310
UPACKED::bmAttributes
uByte bmAttributes
Definition: usb.h:292
usb_endpoint_desc::ued_alt_index
int ued_alt_index
Definition: usb.h:666
UPACKED::bConfigurationValue
uByte bConfigurationValue
Definition: usb.h:286
UPACKED::idVendor
uWord idVendor
Definition: usb.h:271
wusb_m3_data_t::nd
uByte nd
Definition: usb.h:939
wusb_bos_desc_t::bDescriptorType
uByte bDescriptorType
Definition: usb.h:837
usb_dev_cap_ss_usb_t::bLength
uByte bLength
Definition: usb.h:860
UPACKED::bPwrOn2PwrGood
uByte bPwrOn2PwrGood
Definition: usb.h:413
usb_alt_interface
Definition: usb.h:642
wusb_dev_cap_uwb_desc_t::bDescriptorType
uByte bDescriptorType
Definition: usb.h:898
wusb_hndshk_data_t::bReserved
uByte bReserved
Definition: usb.h:788
UPACKED::wHubStatus
uWord wHubStatus
Definition: usb.h:461
wusb_dev_cap_uwb_desc_t::bmTFITXPowerInfo
uByte bmTFITXPowerInfo
Definition: usb.h:902
UPACKED::iSerialNumber
uByte iSerialNumber
Definition: usb.h:276
UPACKED::wHubChange
uWord wHubChange
Definition: usb.h:464
wusb_dev_cap_uwb_desc_t
Definition: usb.h:896
USB_MAX_DEVNAMELEN
#define USB_MAX_DEVNAMELEN
Definition: usb.h:691
wusb_dev_cap_desc_t::bLength
uByte bLength
Definition: usb.h:889
usb_config_desc::ucd_desc
usb_config_descriptor_t ucd_desc
Definition: usb.h:653
UPACKED::idProduct
uWord idProduct
Definition: usb.h:272
wusb_m4_data_t::associationTypeId
uWord associationTypeId
Definition: usb.h:944
UPACKED::bReserved
uByte bReserved
Definition: usb.h:432
wusb_m1_data_t::deviceFriendlyNameLength
uByte deviceFriendlyNameLength
Definition: usb.h:924
usb_dev_cap_ss_usb_t::wSpeedsSupported
uWord wSpeedsSupported
Definition: usb.h:869
UPACKED::bmRequestType
uByte bmRequestType
Definition: usb.h:104
wusb_dev_cap_uwb_desc_t::bDevCapabilityType
uByte bDevCapabilityType
Definition: usb.h:899
UPACKED::wLength
uWord wLength
Definition: usb.h:108
usb_full_desc::ufd_config_index
int ufd_config_index
Definition: usb.h:672
usb_device_info::udi_subclass
u8 udi_subclass
Definition: usb.h:703
usb_dev_cap_20_ext_desc_t
Definition: usb.h:843
u_long
unsigned long u_long
Definition: os_defs.h:54
wusb_dev_cap_uwb_desc_t::bmFFITXPowerInfo
uByte bmFFITXPowerInfo
Definition: usb.h:903
usb_endpoint_desc::ued_desc
usb_endpoint_descriptor_t ued_desc
Definition: usb.h:668
wusb_encrypt_type_desc_t::bDescriptorType
uByte bDescriptorType
Definition: usb.h:813
usb_string_desc::usd_language_id
int usd_language_id
Definition: usb.h:679
usb_endpoint_descriptor_t
This structure describes a USB endpoint.
Definition: usb.h:317
wusb_endpoint_companion_desc_t::bLength
uByte bLength
Definition: usb.h:910
wusb_m2_data_t::langId
uWord langId
Definition: usb.h:931
USB_MAX_DEVNAMES
#define USB_MAX_DEVNAMES
Definition: usb.h:690
usb_dev_cap_container_id_t::bDevCapabilityType
uByte bDevCapabilityType
Definition: usb.h:879
UPACKED::bDescLength
uByte bDescLength
Definition: usb.h:394
wusb_endpoint_companion_desc_t
Definition: usb.h:909
usb_alt_interface::uai_config_index
int uai_config_index
Definition: usb.h:643
wusb_hndshk_data_t::bMessageNumber
uByte bMessageNumber
Definition: usb.h:785
uWord
u8 uWord[2]
Definition: usb.h:59
usb_string_desc::usd_string_index
int usd_string_index
Definition: usb.h:678
uByte
u8 uByte
Definition: usb.h:58
wusb_key_desc_t::bLength
uByte bLength
Definition: usb.h:827
wusb_conn_context_t
Definition: usb.h:796
usb_endpoint_descriptor_t::bInterval
uByte bInterval
Definition: usb.h:340
wusb_dev_cap_uwb_desc_t::bLength
uByte bLength
Definition: usb.h:897
usb_endpoint_descriptor_t::bEndpointAddress
uByte bEndpointAddress
Definition: usb.h:320
usb_ctl_request::ucr_addr
int ucr_addr
Definition: usb.h:634
usb_ctl_request
Definition: usb.h:633
wusb_security_desc_t::bLength
uByte bLength
Definition: usb.h:804
usb_device_info::udi_productNo
u16 udi_productNo
Definition: usb.h:699
usb_device_info::udi_addr
u8 udi_addr
Definition: usb.h:694
UPACKED::bNumInterface
uByte bNumInterface
Definition: usb.h:285
usb_endpoint_descriptor_t::bDescriptorType
uByte bDescriptorType
Definition: usb.h:319
usb_device_info::udi_nports
int udi_nports
Definition: usb.h:723
UPACKED::wIndex
uWord wIndex
Definition: usb.h:107
wusb_m2_data_t::version
uByte version
Definition: usb.h:930
usb_alt_interface::uai_interface_index
int uai_interface_index
Definition: usb.h:644
UPACKED::bDeviceSubClass
uByte bDeviceSubClass
Definition: usb.h:267
usb_dev_cap_ss_usb_t::bDevCapabilityType
uByte bDevCapabilityType
Definition: usb.h:862
wusb_dev_cap_desc_t
Definition: usb.h:888
UPACKED::bcdDevice
uWord bcdDevice
Definition: usb.h:273
u8
unsigned char u8
Definition: os_defs.h:45
ss_endpoint_companion_descriptor_t::bLength
uByte bLength
Definition: usb.h:345
u_char
unsigned char u_char
Definition: os_defs.h:57
usb_config_desc::ucd_config_index
int ucd_config_index
Definition: usb.h:652
usb_endpoint_descriptor_t::bLength
uByte bLength
Definition: usb.h:318
UPACKED::bDescriptorSubtype
uByte bDescriptorSubtype
Definition: usb.h:252
usb_device_info::udi_config
u8 udi_config
Definition: usb.h:705
usb_interface_desc::uid_interface_index
int uid_interface_index
Definition: usb.h:658
wusb_m4_data_t::_attributeTypeIdAndLength_7
uDWord _attributeTypeIdAndLength_7
Definition: usb.h:961
usb_endpoint_descriptor_t::wMaxPacketSize
uWord wMaxPacketSize
Definition: usb.h:339
UPACKED::bDescriptorType
uByte bDescriptorType
Definition: usb.h:251
usb_string_desc
Definition: usb.h:677
wusb_dev_cap_desc_t::bDevCapabilityType
uByte bDevCapabilityType
Definition: usb.h:891
uDWord
u8 uDWord[4]
Definition: usb.h:60
wusb_m2_data_t::hostFriendlyNameLength
uByte hostFriendlyNameLength
Definition: usb.h:932
usb_alt_interface::uai_alt_no
int uai_alt_no
Definition: usb.h:645
usb_endpoint_desc::ued_interface_index
int ued_interface_index
Definition: usb.h:665
UPACKED::bDeviceClass
uByte bDeviceClass
Definition: usb.h:266
UPACKED::wValue
uWord wValue
Definition: usb.h:106
UPACKED::bInterfaceClass
uByte bInterfaceClass
Definition: usb.h:307
wusb_m4_data_t::_attributeTypeIdAndLength_3
uDWord _attributeTypeIdAndLength_3
Definition: usb.h:949
UPACKED::bMaxPower
uByte bMaxPower
Definition: usb.h:296
UPACKED::iConfiguration
uByte iConfiguration
Definition: usb.h:287