mikroSDK Reference Manual
tusb_types.h
1/*
2 * The MIT License (MIT)
3 *
4 * Copyright (c) 2019 Ha Thach (tinyusb.org)
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 *
24 * This file is part of the TinyUSB stack.
25 */
26
31#ifndef _TUSB_TYPES_H_
32#define _TUSB_TYPES_H_
33
34#include <stdbool.h>
35#include <stdint.h>
36#include "tusb_compiler.h"
37
38#ifdef __cplusplus
39 extern "C" {
40#endif
41
42/*------------------------------------------------------------------*/
43/* CONSTANTS
44 *------------------------------------------------------------------*/
45
47typedef enum
48{
49 TUSB_SPEED_FULL = 0,
50 TUSB_SPEED_LOW = 1,
51 TUSB_SPEED_HIGH = 2,
52 TUSB_SPEED_INVALID = 0xff,
54
56typedef enum
57{
58 TUSB_XFER_CONTROL = 0 ,
59 TUSB_XFER_ISOCHRONOUS ,
60 TUSB_XFER_BULK ,
61 TUSB_XFER_INTERRUPT
63
64typedef enum
65{
66 TUSB_DIR_OUT = 0,
67 TUSB_DIR_IN = 1,
68
69 TUSB_DIR_IN_MASK = 0x80
70}tusb_dir_t;
71
72enum
73{
74 TUSB_EPSIZE_BULK_FS = 64,
75 TUSB_EPSIZE_BULK_HS= 512,
76
77 TUSB_EPSIZE_ISO_FS_MAX = 1023,
78 TUSB_EPSIZE_ISO_HS_MAX = 1024,
79};
80
82typedef enum
83{
84 TUSB_ISO_EP_ATT_NO_SYNC = 0x00,
85 TUSB_ISO_EP_ATT_ASYNCHRONOUS = 0x04,
86 TUSB_ISO_EP_ATT_ADAPTIVE = 0x08,
87 TUSB_ISO_EP_ATT_SYNCHRONOUS = 0x0C,
92
94typedef enum
95{
96 TUSB_DESC_DEVICE = 0x01,
97 TUSB_DESC_CONFIGURATION = 0x02,
98 TUSB_DESC_STRING = 0x03,
99 TUSB_DESC_INTERFACE = 0x04,
100 TUSB_DESC_ENDPOINT = 0x05,
101 TUSB_DESC_DEVICE_QUALIFIER = 0x06,
102 TUSB_DESC_OTHER_SPEED_CONFIG = 0x07,
103 TUSB_DESC_INTERFACE_POWER = 0x08,
104 TUSB_DESC_OTG = 0x09,
105 TUSB_DESC_DEBUG = 0x0A,
106 TUSB_DESC_INTERFACE_ASSOCIATION = 0x0B,
107
108 TUSB_DESC_BOS = 0x0F,
109 TUSB_DESC_DEVICE_CAPABILITY = 0x10,
110
111 TUSB_DESC_FUNCTIONAL = 0x21,
112
113 // Class Specific Descriptor
114 TUSB_DESC_CS_DEVICE = 0x21,
115 TUSB_DESC_CS_CONFIGURATION = 0x22,
116 TUSB_DESC_CS_STRING = 0x23,
117 TUSB_DESC_CS_INTERFACE = 0x24,
118 TUSB_DESC_CS_ENDPOINT = 0x25,
119
120 TUSB_DESC_SUPERSPEED_ENDPOINT_COMPANION = 0x30,
121 TUSB_DESC_SUPERSPEED_ISO_ENDPOINT_COMPANION = 0x31
123
124typedef enum
125{
126 TUSB_REQ_GET_STATUS = 0 ,
127 TUSB_REQ_CLEAR_FEATURE = 1 ,
128 TUSB_REQ_RESERVED = 2 ,
129 TUSB_REQ_SET_FEATURE = 3 ,
130 TUSB_REQ_RESERVED2 = 4 ,
131 TUSB_REQ_SET_ADDRESS = 5 ,
132 TUSB_REQ_GET_DESCRIPTOR = 6 ,
133 TUSB_REQ_SET_DESCRIPTOR = 7 ,
134 TUSB_REQ_GET_CONFIGURATION = 8 ,
135 TUSB_REQ_SET_CONFIGURATION = 9 ,
136 TUSB_REQ_GET_INTERFACE = 10 ,
137 TUSB_REQ_SET_INTERFACE = 11 ,
138 TUSB_REQ_SYNCH_FRAME = 12
139}tusb_request_code_t;
140
141typedef enum
142{
143 TUSB_REQ_FEATURE_EDPT_HALT = 0,
144 TUSB_REQ_FEATURE_REMOTE_WAKEUP = 1,
145 TUSB_REQ_FEATURE_TEST_MODE = 2
146}tusb_request_feature_selector_t;
147
148typedef enum
149{
150 TUSB_REQ_TYPE_STANDARD = 0,
151 TUSB_REQ_TYPE_CLASS,
152 TUSB_REQ_TYPE_VENDOR,
153 TUSB_REQ_TYPE_INVALID
154} tusb_request_type_t;
155
156typedef enum
157{
158 TUSB_REQ_RCPT_DEVICE =0,
159 TUSB_REQ_RCPT_INTERFACE,
160 TUSB_REQ_RCPT_ENDPOINT,
161 TUSB_REQ_RCPT_OTHER
162} tusb_request_recipient_t;
163
164// https://www.usb.org/defined-class-codes
165typedef enum
166{
167 TUSB_CLASS_UNSPECIFIED = 0 ,
168 TUSB_CLASS_AUDIO = 1 ,
169 TUSB_CLASS_CDC = 2 ,
170 TUSB_CLASS_HID = 3 ,
171 TUSB_CLASS_RESERVED_4 = 4 ,
172 TUSB_CLASS_PHYSICAL = 5 ,
173 TUSB_CLASS_IMAGE = 6 ,
174 TUSB_CLASS_PRINTER = 7 ,
175 TUSB_CLASS_MSC = 8 ,
176 TUSB_CLASS_HUB = 9 ,
177 TUSB_CLASS_CDC_DATA = 10 ,
178 TUSB_CLASS_SMART_CARD = 11 ,
179 TUSB_CLASS_RESERVED_12 = 12 ,
180 TUSB_CLASS_CONTENT_SECURITY = 13 ,
181 TUSB_CLASS_VIDEO = 14 ,
182 TUSB_CLASS_PERSONAL_HEALTHCARE = 15 ,
183 TUSB_CLASS_AUDIO_VIDEO = 16 ,
184
185 TUSB_CLASS_DIAGNOSTIC = 0xDC ,
186 TUSB_CLASS_WIRELESS_CONTROLLER = 0xE0 ,
187 TUSB_CLASS_MISC = 0xEF ,
188 TUSB_CLASS_APPLICATION_SPECIFIC = 0xFE ,
189 TUSB_CLASS_VENDOR_SPECIFIC = 0xFF
190}tusb_class_code_t;
191
192typedef enum
193{
194 MISC_SUBCLASS_COMMON = 2
195}misc_subclass_type_t;
196
197typedef enum
198{
199 MISC_PROTOCOL_IAD = 1
200}misc_protocol_type_t;
201
202typedef enum
203{
204 APP_SUBCLASS_USBTMC = 0x03,
205 APP_SUBCLASS_DFU_RUNTIME = 0x01
206} app_subclass_type_t;
207
208typedef enum
209{
210 DEVICE_CAPABILITY_WIRELESS_USB = 0x01,
211 DEVICE_CAPABILITY_USB20_EXTENSION = 0x02,
212 DEVICE_CAPABILITY_SUPERSPEED_USB = 0x03,
213 DEVICE_CAPABILITY_CONTAINER_id = 0x04,
214 DEVICE_CAPABILITY_PLATFORM = 0x05,
215 DEVICE_CAPABILITY_POWER_DELIVERY = 0x06,
216 DEVICE_CAPABILITY_BATTERY_INFO = 0x07,
217 DEVICE_CAPABILITY_PD_CONSUMER_PORT = 0x08,
218 DEVICE_CAPABILITY_PD_PROVIDER_PORT = 0x09,
219 DEVICE_CAPABILITY_SUPERSPEED_PLUS = 0x0A,
220 DEVICE_CAPABILITY_PRECESION_TIME_MEASUREMENT = 0x0B,
221 DEVICE_CAPABILITY_WIRELESS_USB_EXT = 0x0C,
222 DEVICE_CAPABILITY_BILLBOARD = 0x0D,
223 DEVICE_CAPABILITY_AUTHENTICATION = 0x0E,
224 DEVICE_CAPABILITY_BILLBOARD_EX = 0x0F,
225 DEVICE_CAPABILITY_CONFIGURATION_SUMMARY = 0x10
226}device_capability_type_t;
227
228enum {
229 TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP = TU_BIT(5),
230 TUSB_DESC_CONFIG_ATT_SELF_POWERED = TU_BIT(6),
231};
232
233#define TUSB_DESC_CONFIG_POWER_MA(x) ((x)/2)
234
235//--------------------------------------------------------------------+
236//
237//--------------------------------------------------------------------+
238typedef enum
239{
240 XFER_RESULT_SUCCESS = 0,
241 XFER_RESULT_FAILED,
242 XFER_RESULT_STALLED,
243 XFER_RESULT_TIMEOUT,
244 XFER_RESULT_INVALID
245}xfer_result_t;
246
247enum // TODO remove
248{
249 DESC_OFFSET_LEN = 0,
250 DESC_OFFSET_TYPE = 1
251};
252
253enum
254{
255 INTERFACE_INVALID_NUMBER = 0xff
256};
257
258typedef enum
259{
260 MS_OS_20_SET_HEADER_DESCRIPTOR = 0x00,
261 MS_OS_20_SUBSET_HEADER_CONFIGURATION = 0x01,
262 MS_OS_20_SUBSET_HEADER_FUNCTION = 0x02,
263 MS_OS_20_FEATURE_COMPATBLE_ID = 0x03,
264 MS_OS_20_FEATURE_REG_PROPERTY = 0x04,
265 MS_OS_20_FEATURE_MIN_RESUME_TIME = 0x05,
266 MS_OS_20_FEATURE_MODEL_ID = 0x06,
267 MS_OS_20_FEATURE_CCGP_DEVICE = 0x07,
268 MS_OS_20_FEATURE_VENDOR_REVISION = 0x08
269} microsoft_os_20_type_t;
270
271enum
272{
273 CONTROL_STAGE_IDLE,
274 CONTROL_STAGE_SETUP,
275 CONTROL_STAGE_DATA,
276 CONTROL_STAGE_ACK
277};
278
279enum
280{
281 TUSB_INDEX_INVALID_8 = 0xFFu
282};
283
284//--------------------------------------------------------------------+
285// USB Descriptors
286//--------------------------------------------------------------------+
287
288// Start of all packed definitions for compiler without per-type packed
289TU_ATTR_PACKED_BEGIN
290TU_ATTR_BIT_FIELD_ORDER_BEGIN
291
293typedef struct TU_ATTR_PACKED
294{
295 uint8_t bLength ;
296 uint8_t bDescriptorType ;
297 uint16_t bcdUSB ;
298
299 uint8_t bDeviceClass ;
303
304 uint16_t idVendor ;
305 uint16_t idProduct ;
306 uint16_t bcdDevice ;
307 uint8_t iManufacturer ;
308 uint8_t iProduct ;
309 uint8_t iSerialNumber ;
310
313
314TU_VERIFY_STATIC( sizeof(tusb_desc_device_t) == 18, "size is not correct");
315
316// USB Binary Device Object Store (BOS) Descriptor
317typedef struct TU_ATTR_PACKED
318{
319 uint8_t bLength ;
320 uint8_t bDescriptorType ;
321 uint16_t wTotalLength ;
322 uint8_t bNumDeviceCaps ;
324
325TU_VERIFY_STATIC( sizeof(tusb_desc_bos_t) == 5, "size is not correct");
326
328typedef struct TU_ATTR_PACKED
329{
330 uint8_t bLength ;
331 uint8_t bDescriptorType ;
332 uint16_t wTotalLength ;
333
334 uint8_t bNumInterfaces ;
336 uint8_t iConfiguration ;
337 uint8_t bmAttributes ;
338 uint8_t bMaxPower ;
340
341TU_VERIFY_STATIC( sizeof(tusb_desc_configuration_t) == 9, "size is not correct");
342
344typedef struct TU_ATTR_PACKED
345{
346 uint8_t bLength ;
347 uint8_t bDescriptorType ;
348
351 uint8_t bNumEndpoints ;
355 uint8_t iInterface ;
357
358TU_VERIFY_STATIC( sizeof(tusb_desc_interface_t) == 9, "size is not correct");
359
361typedef struct TU_ATTR_PACKED
362{
363 uint8_t bLength ; // Size of this descriptor in bytes
364 uint8_t bDescriptorType ; // ENDPOINT Descriptor Type
365
366 uint8_t bEndpointAddress ; // The address of the endpoint
367
368 struct TU_ATTR_PACKED {
369 uint8_t xfer : 2; // Control, ISO, Bulk, Interrupt
370 uint8_t sync : 2; // None, Asynchronous, Adaptive, Synchronous
371 uint8_t usage : 2; // Data, Feedback, Implicit feedback
372 uint8_t : 2;
373 } bmAttributes;
374
375 uint16_t wMaxPacketSize ; // Bit 10..0 : max packet size, bit 12..11 additional transaction per highspeed micro-frame
376 uint8_t bInterval ; // Polling interval, in frames or microframes depending on the operating speed
378
379TU_VERIFY_STATIC( sizeof(tusb_desc_endpoint_t) == 7, "size is not correct");
380
382typedef struct TU_ATTR_PACKED
383{
384 uint8_t bLength ;
385 uint8_t bDescriptorType ;
386 uint16_t wTotalLength ;
387
388 uint8_t bNumInterfaces ;
389 uint8_t bConfigurationValue ;
390 uint8_t iConfiguration ;
391 uint8_t bmAttributes ;
392 uint8_t bMaxPower ;
394
396typedef struct TU_ATTR_PACKED
397{
398 uint8_t bLength ;
399 uint8_t bDescriptorType ;
400 uint16_t bcdUSB ;
401
402 uint8_t bDeviceClass ;
403 uint8_t bDeviceSubClass ;
404 uint8_t bDeviceProtocol ;
405
406 uint8_t bMaxPacketSize0 ;
407 uint8_t bNumConfigurations ;
408 uint8_t bReserved ;
410
411TU_VERIFY_STATIC( sizeof(tusb_desc_device_qualifier_t) == 10, "size is not correct");
412
414typedef struct TU_ATTR_PACKED
415{
416 uint8_t bLength ;
417 uint8_t bDescriptorType ;
418
421
422 uint8_t bFunctionClass ;
425
426 uint8_t iFunction ;
428
429// USB String Descriptor
430typedef struct TU_ATTR_PACKED
431{
432 uint8_t bLength ;
433 uint8_t bDescriptorType ;
434 uint16_t unicode_string[];
436
437// USB Binary Device Object Store (BOS)
438typedef struct TU_ATTR_PACKED
439{
440 uint8_t bLength;
441 uint8_t bDescriptorType ;
442 uint8_t bDevCapabilityType;
443 uint8_t bReserved;
444 uint8_t PlatformCapabilityUUID[16];
445 uint8_t CapabilityData[];
447
448// USB WebuSB URL Descriptor
449typedef struct TU_ATTR_PACKED
450{
451 uint8_t bLength;
452 uint8_t bDescriptorType;
453 uint8_t bScheme;
454 char url[];
456
457// DFU Functional Descriptor
458typedef struct TU_ATTR_PACKED
459{
460 uint8_t bLength;
461 uint8_t bDescriptorType;
462
463 union {
464 struct TU_ATTR_PACKED {
465 uint8_t bitCanDnload : 1;
466 uint8_t bitCanUpload : 1;
467 uint8_t bitManifestationTolerant : 1;
468 uint8_t bitWillDetach : 1;
469 uint8_t reserved : 4;
470 } bmAttributes;
471
472 uint8_t bAttributes;
473 };
474
475 uint16_t wDetachTimeOut;
476 uint16_t wTransferSize;
477 uint16_t bcdDFUVersion;
479
480//--------------------------------------------------------------------+
481//
482//--------------------------------------------------------------------+
483
484typedef struct TU_ATTR_PACKED{
485 union {
486 struct TU_ATTR_PACKED {
487 uint8_t recipient : 5;
488 uint8_t type : 2;
489 uint8_t direction : 1;
490 } bmRequestType_bit;
491
492 uint8_t bmRequestType;
493 };
494
495 uint8_t bRequest;
496 uint16_t wValue;
497 uint16_t wIndex;
498 uint16_t wLength;
500
501TU_VERIFY_STATIC( sizeof(tusb_control_request_t) == 8, "size is not correct");
502
503
504TU_ATTR_PACKED_END // End of all packed definitions
505TU_ATTR_BIT_FIELD_ORDER_END
506
507//--------------------------------------------------------------------+
508// Endpoint helper
509//--------------------------------------------------------------------+
510
511// Get direction from Endpoint address
512TU_ATTR_ALWAYS_INLINE static inline tusb_dir_t tu_edpt_dir(uint8_t addr)
513{
514 return (addr & TUSB_DIR_IN_MASK) ? TUSB_DIR_IN : TUSB_DIR_OUT;
515}
516
517// Get Endpoint number from address
518TU_ATTR_ALWAYS_INLINE static inline uint8_t tu_edpt_number(uint8_t addr)
519{
520 return (uint8_t)(addr & (~TUSB_DIR_IN_MASK));
521}
522
523TU_ATTR_ALWAYS_INLINE static inline uint8_t tu_edpt_addr(uint8_t num, uint8_t dir)
524{
525 return (uint8_t)(num | (dir ? TUSB_DIR_IN_MASK : 0));
526}
527
528TU_ATTR_ALWAYS_INLINE static inline uint16_t tu_edpt_packet_size(tusb_desc_endpoint_t const* desc_ep)
529{
530 return tu_le16toh(desc_ep->wMaxPacketSize) & TU_GENMASK(10, 0);
531}
532
533#if CFG_TUSB_DEBUG
534TU_ATTR_ALWAYS_INLINE static inline const char *tu_edpt_dir_str(tusb_dir_t dir)
535{
536 tu_static const char *str[] = {"out", "in"};
537 return str[dir];
538}
539
540TU_ATTR_ALWAYS_INLINE static inline const char *tu_edpt_type_str(tusb_xfer_type_t t)
541{
542 tu_static const char *str[] = {"control", "isochronous", "bulk", "interrupt"};
543 return str[t];
544}
545#endif
546
547//--------------------------------------------------------------------+
548// Descriptor helper
549//--------------------------------------------------------------------+
550
551// return next descriptor
552TU_ATTR_ALWAYS_INLINE static inline uint8_t const * tu_desc_next(void const* desc)
553{
554 uint8_t const* desc8 = (uint8_t const*) desc;
555 return desc8 + desc8[DESC_OFFSET_LEN];
556}
557
558// get descriptor type
559TU_ATTR_ALWAYS_INLINE static inline uint8_t tu_desc_type(void const* desc)
560{
561 return ((uint8_t const*) desc)[DESC_OFFSET_TYPE];
562}
563
564// get descriptor length
565TU_ATTR_ALWAYS_INLINE static inline uint8_t tu_desc_len(void const* desc)
566{
567 return ((uint8_t const*) desc)[DESC_OFFSET_LEN];
568}
569
570// find descriptor that match byte1 (type)
571uint8_t const * tu_desc_find(uint8_t const* desc, uint8_t const* end, uint8_t byte1);
572
573// find descriptor that match byte1 (type) and byte2
574uint8_t const * tu_desc_find2(uint8_t const* desc, uint8_t const* end, uint8_t byte1, uint8_t byte2);
575
576// find descriptor that match byte1 (type) and byte2
577uint8_t const * tu_desc_find3(uint8_t const* desc, uint8_t const* end, uint8_t byte1, uint8_t byte2, uint8_t byte3);
578
579#ifdef __cplusplus
580 }
581#endif
582
583#endif /* _TUSB_TYPES_H_ */
584
uint8_t bDescriptorType
Descriptor Type. Value: TUSB_DESC_CS_INTERFACE.
Definition audio.h:657
uint8_t bLength
Size of this descriptor in bytes: 9.
Definition audio.h:656
tusb_speed_t
defined base on EHCI specs value for Endpoint Speed
Definition tusb_types.h:48
tusb_iso_ep_attribute_t
Isochronous End Point Attributes.
Definition tusb_types.h:83
struct TU_ATTR_PACKED tusb_desc_device_qualifier_t
USB Device Qualifier Descriptor.
TU_ATTR_PACKED_BEGIN TU_ATTR_BIT_FIELD_ORDER_BEGIN struct TU_ATTR_PACKED tusb_desc_device_t
USB Device Descriptor.
struct TU_ATTR_PACKED tusb_desc_other_speed_t
USB Other Speed Configuration Descriptor.
tusb_xfer_type_t
defined base on USB Specs Endpoint's bmAttributes
Definition tusb_types.h:57
struct TU_ATTR_PACKED tusb_desc_endpoint_t
USB Endpoint Descriptor.
struct TU_ATTR_PACKED tusb_desc_interface_assoc_t
USB Interface Association Descriptor (IAD ECN)
struct TU_ATTR_PACKED tusb_desc_interface_t
USB Interface Descriptor.
tusb_desc_type_t
USB Descriptor Types.
Definition tusb_types.h:95
struct TU_ATTR_PACKED tusb_desc_configuration_t
USB Configuration Descriptor.
@ TUSB_ISO_EP_ATT_IMPLICIT_FB
Data endpoint that also serves as an implicit feedback.
Definition tusb_types.h:90
@ TUSB_ISO_EP_ATT_EXPLICIT_FB
Feedback End Point.
Definition tusb_types.h:89
@ TUSB_ISO_EP_ATT_DATA
Data End Point.
Definition tusb_types.h:88
AUDIO Channel Cluster Descriptor (4.1)
Definition audio.h:647
uint8_t iFunction
Index of the string descriptor describing the interface association.
Definition tusb_types.h:426
uint8_t bFunctionSubClass
Interface subclass ID.
Definition tusb_types.h:423
uint8_t bFunctionClass
Interface class ID.
Definition tusb_types.h:422
uint8_t bNumInterfaces
Number of interfaces supported by this configuration.
Definition tusb_types.h:334
uint8_t bConfigurationValue
Value to use as an argument to the SetConfiguration() request to select this configuration.
Definition tusb_types.h:335
uint8_t iConfiguration
Index of string descriptor describing this configuration.
Definition tusb_types.h:336
uint8_t bNumConfigurations
Number of possible configurations.
Definition tusb_types.h:311
uint8_t type
Request type tusb_request_type_t.
Definition audio.h:824
uint16_t wTotalLength
Total number of bytes returned for the class-specific AudioControl interface descriptor....
Definition audio.h:661
uint16_t idProduct
Product ID (assigned by the manufacturer).
Definition tusb_types.h:305
uint8_t iSerialNumber
Index of string descriptor describing the device's serial number.
Definition tusb_types.h:309
uint8_t bDeviceProtocol
Protocol code (assigned by the USB-IF). These codes are qualified by the value of the bDeviceClass an...
Definition tusb_types.h:301
uint8_t bmAttributes
See: audio_clock_source_attribute_t.
Definition audio.h:672
uint8_t bDeviceClass
Class code (assigned by the USB-IF).
Definition tusb_types.h:299
uint16_t idVendor
Vendor ID (assigned by the USB-IF).
Definition tusb_types.h:304
uint8_t direction
Direction type. tusb_dir_t.
Definition audio.h:825
uint8_t bDeviceSubClass
Subclass code (assigned by the USB-IF). These codes are qualified by the value of the bDeviceClass fi...
Definition tusb_types.h:300
uint8_t iManufacturer
Index of string descriptor describing manufacturer.
Definition tusb_types.h:307
uint8_t bInterfaceCount
Total number of associated interfaces.
Definition tusb_types.h:420
uint8_t bFunctionProtocol
Interface protocol ID.
Definition tusb_types.h:424
uint8_t iInterface
Index of string descriptor describing this interface.
Definition tusb_types.h:355
uint8_t bInterfaceClass
Class code (assigned by the USB-IF).
Definition tusb_types.h:352
uint8_t bMaxPower
Maximum power consumption of the USB device from the bus in this specific configuration when the devi...
Definition tusb_types.h:338
uint8_t iProduct
Index of string descriptor describing product.
Definition tusb_types.h:308
uint8_t bMaxPacketSize0
Maximum packet size for endpoint zero (only 8, 16, 32, or 64 are valid). For HS devices is fixed to 6...
Definition tusb_types.h:302
uint8_t bInterfaceSubClass
Subclass code (assigned by the USB-IF). These codes are qualified by the value of the bInterfaceCla...
Definition tusb_types.h:353
uint8_t recipient
Recipient type tusb_request_recipient_t.
Definition audio.h:823
uint16_t bcdUSB
BUSB Specification Release Number in Binary-Coded Decimal (i.e., 2.10 is 210H). This field identifies...
Definition tusb_types.h:297
uint8_t bRequest
Request type audio_cs_req_t.
Definition audio.h:831
uint8_t bReserved
Reserved for future use, must be zero.
Definition tusb_types.h:408
uint8_t reserved
Definition hid.h:325
uint16_t bcdDevice
Device release number in binary-coded decimal.
Definition tusb_types.h:306
uint8_t bNumEndpoints
Number of endpoints used by this interface (excluding endpoint zero). If this value is zero,...
Definition tusb_types.h:351
uint8_t bInterfaceProtocol
Protocol code (assigned by the USB). These codes are qualified by the value of the bInterfaceClass ...
Definition tusb_types.h:354
uint8_t bFirstInterface
Index of the first associated interface.
Definition tusb_types.h:419
uint8_t bInterfaceNumber
Number of this interface. Zero-based value identifying the index in the array of concurrent interface...
Definition tusb_types.h:349
uint8_t bAlternateSetting
Value used to select this alternate setting for the interface identified in the prior field.
Definition tusb_types.h:350
uint8_t bNumDeviceCaps
Number of device capability descriptors in the BOS.
Definition tusb_types.h:322