objc2_io_kit/generated/usb/
AppleUSBDefinitions.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousb20bitratelow?language=objc)
10pub const kIOUSB20BitrateLow: c_uint = 1500 * 1000;
11/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousb20bitratefull?language=objc)
12pub const kIOUSB20BitrateFull: c_uint = 12 * 1000 * 1000;
13/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousb20bitratehigh?language=objc)
14pub const kIOUSB20BitrateHigh: c_uint = 480 * 1000 * 1000;
15/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbapplevendorid?language=objc)
16pub const kIOUSBAppleVendorID: c_uint = 0x05AC;
17
18/// Descriptor types defined by USB 2.0 Table 9-5 and USB 3.0 Table 9-6
19///
20/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousbdescriptortype?language=objc)
21#[repr(transparent)]
22#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
23pub struct tIOUSBDescriptorType(pub c_uint);
24impl tIOUSBDescriptorType {
25    #[doc(alias = "kIOUSBDescriptorTypeDevice")]
26    pub const IOUSBDescriptorTypeDevice: Self = Self(1);
27    #[doc(alias = "kIOUSBDescriptorTypeConfiguration")]
28    pub const IOUSBDescriptorTypeConfiguration: Self = Self(2);
29    #[doc(alias = "kIOUSBDescriptorTypeString")]
30    pub const IOUSBDescriptorTypeString: Self = Self(3);
31    #[doc(alias = "kIOUSBDescriptorTypeInterface")]
32    pub const IOUSBDescriptorTypeInterface: Self = Self(4);
33    #[doc(alias = "kIOUSBDescriptorTypeEndpoint")]
34    pub const IOUSBDescriptorTypeEndpoint: Self = Self(5);
35    #[doc(alias = "kIOUSBDescriptorTypeDeviceQualifier")]
36    pub const IOUSBDescriptorTypeDeviceQualifier: Self = Self(6);
37    #[doc(alias = "kIOUSBDescriptorTypeOtherSpeedConfiguration")]
38    pub const IOUSBDescriptorTypeOtherSpeedConfiguration: Self = Self(7);
39    #[doc(alias = "kIOUSBDescriptorTypeInterfacePower")]
40    pub const IOUSBDescriptorTypeInterfacePower: Self = Self(8);
41    #[doc(alias = "kIOUSBDescriptorTypeOTG")]
42    pub const IOUSBDescriptorTypeOTG: Self = Self(9);
43    #[doc(alias = "kIOUSBDescriptorTypeDebug")]
44    pub const IOUSBDescriptorTypeDebug: Self = Self(10);
45    #[doc(alias = "kIOUSBDescriptorTypeInterfaceAssociation")]
46    pub const IOUSBDescriptorTypeInterfaceAssociation: Self = Self(11);
47    #[doc(alias = "kIOUSBDescriptorTypeBOS")]
48    pub const IOUSBDescriptorTypeBOS: Self = Self(15);
49    #[doc(alias = "kIOUSBDescriptorTypeDeviceCapability")]
50    pub const IOUSBDescriptorTypeDeviceCapability: Self = Self(16);
51    #[doc(alias = "kIOUSBDecriptorTypeHID")]
52    pub const IOUSBDecriptorTypeHID: Self = Self(33);
53    #[doc(alias = "kIOUSBDecriptorTypeReport")]
54    pub const IOUSBDecriptorTypeReport: Self = Self(34);
55    #[doc(alias = "kIOUSBDescriptorTypePhysical")]
56    pub const IOUSBDescriptorTypePhysical: Self = Self(35);
57    #[doc(alias = "kIOUSBDescriptorTypeHub")]
58    pub const IOUSBDescriptorTypeHub: Self = Self(41);
59    #[doc(alias = "kIOUSBDescriptorTypeSuperSpeedHub")]
60    pub const IOUSBDescriptorTypeSuperSpeedHub: Self = Self(42);
61    #[doc(alias = "kIOUSBDescriptorTypeSuperSpeedUSBEndpointCompanion")]
62    pub const IOUSBDescriptorTypeSuperSpeedUSBEndpointCompanion: Self = Self(48);
63    #[doc(alias = "kIOUSBDescriptorTypeSuperSpeedPlusIsochronousEndpointCompanion")]
64    pub const IOUSBDescriptorTypeSuperSpeedPlusIsochronousEndpointCompanion: Self = Self(49);
65}
66
67#[cfg(feature = "objc2")]
68unsafe impl Encode for tIOUSBDescriptorType {
69    const ENCODING: Encoding = c_uint::ENCODING;
70}
71
72#[cfg(feature = "objc2")]
73unsafe impl RefEncode for tIOUSBDescriptorType {
74    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
75}
76
77/// Size in bytes for descriptor structures
78///
79/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousbdescriptorsize?language=objc)
80#[repr(transparent)]
81#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
82pub struct tIOUSBDescriptorSize(pub c_uint);
83impl tIOUSBDescriptorSize {
84    #[doc(alias = "kIOUSBDescriptorHeaderSize")]
85    pub const IOUSBDescriptorHeaderSize: Self = Self(2);
86    #[doc(alias = "kIOUSBDescriptorSizeDevice")]
87    pub const IOUSBDescriptorSizeDevice: Self = Self(18);
88    #[doc(alias = "kIOUSBDescriptorSizeConfiguration")]
89    pub const IOUSBDescriptorSizeConfiguration: Self = Self(9);
90    #[doc(alias = "kIOUSBDescriptorSizeInterface")]
91    pub const IOUSBDescriptorSizeInterface: Self = Self(9);
92    #[doc(alias = "kIOUSBDescriptorSizeEndpoint")]
93    pub const IOUSBDescriptorSizeEndpoint: Self = Self(7);
94    #[doc(alias = "kIOUSBDescriptorSizeStringMinimum")]
95    pub const IOUSBDescriptorSizeStringMinimum: Self =
96        Self(tIOUSBDescriptorSize::IOUSBDescriptorHeaderSize.0);
97    #[doc(alias = "kIOUSBDescriptorSizeStringMaximum")]
98    pub const IOUSBDescriptorSizeStringMaximum: Self = Self(255);
99    #[doc(alias = "kIOUSBDescriptorSizeDeviceQualifier")]
100    pub const IOUSBDescriptorSizeDeviceQualifier: Self = Self(10);
101    #[doc(alias = "kIOUSBDescriptorSizeInterfaceAssociation")]
102    pub const IOUSBDescriptorSizeInterfaceAssociation: Self = Self(8);
103    #[doc(alias = "kIOUSBDescriptorSizeBOS")]
104    pub const IOUSBDescriptorSizeBOS: Self = Self(5);
105    #[doc(alias = "kIOUSBDescriptorSizeDeviceCapability")]
106    pub const IOUSBDescriptorSizeDeviceCapability: Self = Self(3);
107    #[doc(alias = "kIOUSBDescriptorSizeUSB20ExtensionCapability")]
108    pub const IOUSBDescriptorSizeUSB20ExtensionCapability: Self = Self(7);
109    #[doc(alias = "kIOUSBDescriptorSizeSuperSpeedUSBDeviceCapability")]
110    pub const IOUSBDescriptorSizeSuperSpeedUSBDeviceCapability: Self = Self(10);
111    #[doc(alias = "kIOUSBDescriptorSizeContainerIDCapability")]
112    pub const IOUSBDescriptorSizeContainerIDCapability: Self = Self(20);
113    #[doc(alias = "kIOUSBDescriptorSizeHubMinimum")]
114    pub const IOUSBDescriptorSizeHubMinimum: Self = Self(9);
115    #[doc(alias = "kIOUSBDescriptorSizeHubMaximum")]
116    pub const IOUSBDescriptorSizeHubMaximum: Self = Self(21);
117    #[doc(alias = "kIOUSBDescriptorSizeSuperSpeedHub")]
118    pub const IOUSBDescriptorSizeSuperSpeedHub: Self = Self(12);
119    #[doc(alias = "kIOUSBDescriptorSizeSuperSpeedUSBEndpointCompanion")]
120    pub const IOUSBDescriptorSizeSuperSpeedUSBEndpointCompanion: Self = Self(6);
121    #[doc(alias = "kIOUSBDescriptorSizeSuperSpeedPlusIsochronousEndpointCompanion")]
122    pub const IOUSBDescriptorSizeSuperSpeedPlusIsochronousEndpointCompanion: Self = Self(8);
123    #[doc(alias = "kIOUSBDescriptorSizeBillboardDeviceMinimum")]
124    pub const IOUSBDescriptorSizeBillboardDeviceMinimum: Self = Self(44);
125    #[doc(alias = "kIOUSBDescriptorSizeBillboardDeviceMaximum")]
126    pub const IOUSBDescriptorSizeBillboardDeviceMaximum: Self = Self(256);
127    #[doc(alias = "kIOUSBDescriptorSizePlatformECIDCapability")]
128    pub const IOUSBDescriptorSizePlatformECIDCapability: Self = Self(28);
129    #[doc(alias = "kIOUSBDescriptorSizePlatformCapability")]
130    pub const IOUSBDescriptorSizePlatformCapability: Self = Self(20);
131}
132
133#[cfg(feature = "objc2")]
134unsafe impl Encode for tIOUSBDescriptorSize {
135    const ENCODING: Encoding = c_uint::ENCODING;
136}
137
138#[cfg(feature = "objc2")]
139unsafe impl RefEncode for tIOUSBDescriptorSize {
140    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
141}
142
143/// Base descriptor defined by USB 2.0 9.5
144///
145/// IOUSBDescriptorDefinitions declares structs to represent a variety of USB standard
146/// descriptors.
147///
148/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdescriptorheader?language=objc)
149#[repr(C)]
150#[derive(Clone, Copy, Debug, PartialEq)]
151pub struct IOUSBDescriptorHeader {
152    pub bLength: u8,
153    pub bDescriptorType: u8,
154}
155
156#[cfg(feature = "objc2")]
157unsafe impl Encode for IOUSBDescriptorHeader {
158    const ENCODING: Encoding =
159        Encoding::Struct("IOUSBDescriptorHeader", &[<u8>::ENCODING, <u8>::ENCODING]);
160}
161
162#[cfg(feature = "objc2")]
163unsafe impl RefEncode for IOUSBDescriptorHeader {
164    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
165}
166
167/// Base descriptor defined by USB 2.0 9.5
168///
169/// Used to represent generic descriptor definitions
170///
171/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdescriptor?language=objc)
172pub type IOUSBDescriptor = IOUSBDescriptorHeader;
173
174/// Descriptor for a USB Device.
175/// See the USB Specification at
176/// <a href="http://www.usb.org" target="_blank">
177/// http://www.usb.org
178/// </a>
179/// .
180///
181/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicedescriptor?language=objc)
182#[repr(C, packed)]
183#[derive(Clone, Copy, Debug, PartialEq)]
184pub struct IOUSBDeviceDescriptor {
185    pub bLength: u8,
186    pub bDescriptorType: u8,
187    pub bcdUSB: u16,
188    pub bDeviceClass: u8,
189    pub bDeviceSubClass: u8,
190    pub bDeviceProtocol: u8,
191    pub bMaxPacketSize0: u8,
192    pub idVendor: u16,
193    pub idProduct: u16,
194    pub bcdDevice: u16,
195    pub iManufacturer: u8,
196    pub iProduct: u8,
197    pub iSerialNumber: u8,
198    pub bNumConfigurations: u8,
199}
200
201#[cfg(feature = "objc2")]
202unsafe impl Encode for IOUSBDeviceDescriptor {
203    const ENCODING: Encoding = Encoding::Struct(
204        "IOUSBDeviceDescriptor",
205        &[
206            <u8>::ENCODING,
207            <u8>::ENCODING,
208            <u16>::ENCODING,
209            <u8>::ENCODING,
210            <u8>::ENCODING,
211            <u8>::ENCODING,
212            <u8>::ENCODING,
213            <u16>::ENCODING,
214            <u16>::ENCODING,
215            <u16>::ENCODING,
216            <u8>::ENCODING,
217            <u8>::ENCODING,
218            <u8>::ENCODING,
219            <u8>::ENCODING,
220        ],
221    );
222}
223
224#[cfg(feature = "objc2")]
225unsafe impl RefEncode for IOUSBDeviceDescriptor {
226    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
227}
228
229/// USB Device Qualifier Descriptor.
230/// See the USB Specification at
231/// <a href="http://www.usb.org" target="_blank">
232/// http://www.usb.org
233/// </a>
234/// .
235/// USB 2.0 9.6.2: Device Qualifier
236///
237/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicequalifierdescriptor?language=objc)
238#[repr(C, packed)]
239#[derive(Clone, Copy, Debug, PartialEq)]
240pub struct IOUSBDeviceQualifierDescriptor {
241    pub bLength: u8,
242    pub bDescriptorType: u8,
243    pub bcdUSB: u16,
244    pub bDeviceClass: u8,
245    pub bDeviceSubClass: u8,
246    pub bDeviceProtocol: u8,
247    pub bMaxPacketSize0: u8,
248    pub bNumConfigurations: u8,
249    pub bReserved: u8,
250}
251
252#[cfg(feature = "objc2")]
253unsafe impl Encode for IOUSBDeviceQualifierDescriptor {
254    const ENCODING: Encoding = Encoding::Struct(
255        "IOUSBDeviceQualifierDescriptor",
256        &[
257            <u8>::ENCODING,
258            <u8>::ENCODING,
259            <u16>::ENCODING,
260            <u8>::ENCODING,
261            <u8>::ENCODING,
262            <u8>::ENCODING,
263            <u8>::ENCODING,
264            <u8>::ENCODING,
265            <u8>::ENCODING,
266        ],
267    );
268}
269
270#[cfg(feature = "objc2")]
271unsafe impl RefEncode for IOUSBDeviceQualifierDescriptor {
272    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
273}
274
275/// Header of a IOUSBConfigurationDescriptor.  Used to get the total length of the descriptor.
276/// USB 2.0 9.6.3: Configuration
277///
278/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbconfigurationdescheader?language=objc)
279#[repr(C, packed)]
280#[derive(Clone, Copy, Debug, PartialEq)]
281pub struct IOUSBConfigurationDescHeader {
282    pub bLength: u8,
283    pub bDescriptorType: u8,
284    pub wTotalLength: u16,
285}
286
287#[cfg(feature = "objc2")]
288unsafe impl Encode for IOUSBConfigurationDescHeader {
289    const ENCODING: Encoding = Encoding::Struct(
290        "IOUSBConfigurationDescHeader",
291        &[<u8>::ENCODING, <u8>::ENCODING, <u16>::ENCODING],
292    );
293}
294
295#[cfg(feature = "objc2")]
296unsafe impl RefEncode for IOUSBConfigurationDescHeader {
297    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
298}
299
300/// Standard USB Configuration Descriptor.  It is variable length, so this only specifies
301/// the known fields.  We use the wTotalLength field to read the whole descriptor.
302/// See the USB Specification at
303/// <a href="http://www.usb.org" target="_blank">
304/// http://www.usb.org
305/// </a>
306/// .
307/// USB 2.0 9.6.3: Configuration
308///
309/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbconfigurationdescriptor?language=objc)
310#[repr(C, packed)]
311#[derive(Clone, Copy, Debug, PartialEq)]
312pub struct IOUSBConfigurationDescriptor {
313    pub bLength: u8,
314    pub bDescriptorType: u8,
315    pub wTotalLength: u16,
316    pub bNumInterfaces: u8,
317    pub bConfigurationValue: u8,
318    pub iConfiguration: u8,
319    pub bmAttributes: u8,
320    pub MaxPower: u8,
321}
322
323#[cfg(feature = "objc2")]
324unsafe impl Encode for IOUSBConfigurationDescriptor {
325    const ENCODING: Encoding = Encoding::Struct(
326        "IOUSBConfigurationDescriptor",
327        &[
328            <u8>::ENCODING,
329            <u8>::ENCODING,
330            <u16>::ENCODING,
331            <u8>::ENCODING,
332            <u8>::ENCODING,
333            <u8>::ENCODING,
334            <u8>::ENCODING,
335            <u8>::ENCODING,
336        ],
337    );
338}
339
340#[cfg(feature = "objc2")]
341unsafe impl RefEncode for IOUSBConfigurationDescriptor {
342    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
343}
344
345/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbconfigurationdescriptorattributeremotewakecapable?language=objc)
346pub const kIOUSBConfigurationDescriptorAttributeRemoteWakeCapable: c_uint = IOUSBBit!(5);
347/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbconfigurationdescriptorattributeselfpowered?language=objc)
348pub const kIOUSBConfigurationDescriptorAttributeSelfPowered: c_uint = IOUSBBit!(6);
349
350/// Descriptor for a USB Interface.  See the USB Specification at
351/// <a href="http://www.usb.org" target="_blank">
352/// http://www.usb.org
353/// </a>
354/// .
355/// USB 2.0 9.6.5: Interface
356///
357/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfacedescriptor?language=objc)
358#[repr(C)]
359#[derive(Clone, Copy, Debug, PartialEq)]
360pub struct IOUSBInterfaceDescriptor {
361    pub bLength: u8,
362    pub bDescriptorType: u8,
363    pub bInterfaceNumber: u8,
364    pub bAlternateSetting: u8,
365    pub bNumEndpoints: u8,
366    pub bInterfaceClass: u8,
367    pub bInterfaceSubClass: u8,
368    pub bInterfaceProtocol: u8,
369    pub iInterface: u8,
370}
371
372#[cfg(feature = "objc2")]
373unsafe impl Encode for IOUSBInterfaceDescriptor {
374    const ENCODING: Encoding = Encoding::Struct(
375        "IOUSBInterfaceDescriptor",
376        &[
377            <u8>::ENCODING,
378            <u8>::ENCODING,
379            <u8>::ENCODING,
380            <u8>::ENCODING,
381            <u8>::ENCODING,
382            <u8>::ENCODING,
383            <u8>::ENCODING,
384            <u8>::ENCODING,
385            <u8>::ENCODING,
386        ],
387    );
388}
389
390#[cfg(feature = "objc2")]
391unsafe impl RefEncode for IOUSBInterfaceDescriptor {
392    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
393}
394
395/// Descriptor for a USB Endpoint.  See the USB Specification at
396/// <a href="http://www.usb.org" target="_blank">
397/// http://www.usb.org
398/// </a>
399/// .
400/// USB 2.0 9.6.6: Endpoint
401///
402/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbendpointdescriptor?language=objc)
403#[repr(C, packed)]
404#[derive(Clone, Copy, Debug, PartialEq)]
405pub struct IOUSBEndpointDescriptor {
406    pub bLength: u8,
407    pub bDescriptorType: u8,
408    pub bEndpointAddress: u8,
409    pub bmAttributes: u8,
410    pub wMaxPacketSize: u16,
411    pub bInterval: u8,
412}
413
414#[cfg(feature = "objc2")]
415unsafe impl Encode for IOUSBEndpointDescriptor {
416    const ENCODING: Encoding = Encoding::Struct(
417        "IOUSBEndpointDescriptor",
418        &[
419            <u8>::ENCODING,
420            <u8>::ENCODING,
421            <u8>::ENCODING,
422            <u8>::ENCODING,
423            <u16>::ENCODING,
424            <u8>::ENCODING,
425        ],
426    );
427}
428
429#[cfg(feature = "objc2")]
430unsafe impl RefEncode for IOUSBEndpointDescriptor {
431    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
432}
433
434/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptornumber?language=objc)
435pub const kIOUSBEndpointDescriptorNumber: c_uint = IOUSBBitRange!(0, 3);
436/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptornumberphase?language=objc)
437pub const kIOUSBEndpointDescriptorNumberPhase: c_uint = IOUSBBitRangePhase!(0, 3);
438/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorendpointaddressreserved?language=objc)
439pub const kIOUSBEndpointDescriptorEndpointAddressReserved: c_uint = IOUSBBitRange!(4, 6);
440/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptordirection?language=objc)
441pub const kIOUSBEndpointDescriptorDirection: c_uint = IOUSBBit!(7);
442/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptordirectionphase?language=objc)
443pub const kIOUSBEndpointDescriptorDirectionPhase: c_uint = IOUSBBitRangePhase!(7, 7);
444/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptordirectionout?language=objc)
445pub const kIOUSBEndpointDescriptorDirectionOut: c_uint = 0;
446/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptordirectionin?language=objc)
447pub const kIOUSBEndpointDescriptorDirectionIn: c_uint = IOUSBBit!(7);
448/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptortransfertype?language=objc)
449pub const kIOUSBEndpointDescriptorTransferType: c_uint = IOUSBBitRange!(0, 1);
450/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptortransfertypephase?language=objc)
451pub const kIOUSBEndpointDescriptorTransferTypePhase: c_uint = IOUSBBitRangePhase!(0, 1);
452/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptortransfertypecontrol?language=objc)
453pub const kIOUSBEndpointDescriptorTransferTypeControl: c_uint = 0 << IOUSBBitRangePhase!(0, 1);
454/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptortransfertypeisochronous?language=objc)
455pub const kIOUSBEndpointDescriptorTransferTypeIsochronous: c_uint = 1 << IOUSBBitRangePhase!(0, 1);
456/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptortransfertypebulk?language=objc)
457pub const kIOUSBEndpointDescriptorTransferTypeBulk: c_uint = 2 << IOUSBBitRangePhase!(0, 1);
458/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptortransfertypeinterrupt?language=objc)
459pub const kIOUSBEndpointDescriptorTransferTypeInterrupt: c_uint = 3 << IOUSBBitRangePhase!(0, 1);
460/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorsynchronizationtype?language=objc)
461pub const kIOUSBEndpointDescriptorSynchronizationType: c_uint = IOUSBBitRange!(2, 3);
462/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorsynchronizationtypephase?language=objc)
463pub const kIOUSBEndpointDescriptorSynchronizationTypePhase: c_uint = IOUSBBitRangePhase!(2, 3);
464/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorsynchronizationtypenone?language=objc)
465pub const kIOUSBEndpointDescriptorSynchronizationTypeNone: c_uint = 0 << IOUSBBitRangePhase!(2, 3);
466/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorsynchronizationtypeasynchronous?language=objc)
467pub const kIOUSBEndpointDescriptorSynchronizationTypeAsynchronous: c_uint =
468    1 << IOUSBBitRangePhase!(2, 3);
469/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorsynchronizationtypeadaptive?language=objc)
470pub const kIOUSBEndpointDescriptorSynchronizationTypeAdaptive: c_uint =
471    2 << IOUSBBitRangePhase!(2, 3);
472/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorsynchronizationtypesynchronous?language=objc)
473pub const kIOUSBEndpointDescriptorSynchronizationTypeSynchronous: c_uint =
474    3 << IOUSBBitRangePhase!(2, 3);
475/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorusagetype?language=objc)
476pub const kIOUSBEndpointDescriptorUsageType: c_uint = IOUSBBitRange!(4, 5);
477/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorusagetypephase?language=objc)
478pub const kIOUSBEndpointDescriptorUsageTypePhase: c_uint = IOUSBBitRangePhase!(4, 5);
479/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorusagetypeinterruptperiodic?language=objc)
480pub const kIOUSBEndpointDescriptorUsageTypeInterruptPeriodic: c_uint =
481    0 << IOUSBBitRangePhase!(4, 5);
482/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorusagetypeinterruptnotification?language=objc)
483pub const kIOUSBEndpointDescriptorUsageTypeInterruptNotification: c_uint =
484    1 << IOUSBBitRangePhase!(4, 5);
485/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorusagetypeinterruptreserved1?language=objc)
486pub const kIOUSBEndpointDescriptorUsageTypeInterruptReserved1: c_uint =
487    2 << IOUSBBitRangePhase!(4, 5);
488/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorusagetypeinterruptreserved2?language=objc)
489pub const kIOUSBEndpointDescriptorUsageTypeInterruptReserved2: c_uint =
490    3 << IOUSBBitRangePhase!(4, 5);
491/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorusagetypeisocdata?language=objc)
492pub const kIOUSBEndpointDescriptorUsageTypeIsocData: c_uint = 0 << IOUSBBitRangePhase!(4, 5);
493/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorusagetypeisocfeedback?language=objc)
494pub const kIOUSBEndpointDescriptorUsageTypeIsocFeedback: c_uint = 1 << IOUSBBitRangePhase!(4, 5);
495/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorusagetypeisocimplicit?language=objc)
496pub const kIOUSBEndpointDescriptorUsageTypeIsocImplicit: c_uint = 2 << IOUSBBitRangePhase!(4, 5);
497/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorusagetypeisocreserved?language=objc)
498pub const kIOUSBEndpointDescriptorUsageTypeIsocReserved: c_uint = 3 << IOUSBBitRangePhase!(4, 5);
499/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorpacketsize?language=objc)
500pub const kIOUSBEndpointDescriptorPacketSize: c_uint = IOUSBBitRange!(0, 10);
501/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorpacketsizephase?language=objc)
502pub const kIOUSBEndpointDescriptorPacketSizePhase: c_uint = IOUSBBitRangePhase!(0, 10);
503/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorpacketsizemult?language=objc)
504pub const kIOUSBEndpointDescriptorPacketSizeMult: c_uint = IOUSBBitRange!(11, 12);
505/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorpacketsizemultphase?language=objc)
506pub const kIOUSBEndpointDescriptorPacketSizeMultPhase: c_uint = IOUSBBitRangePhase!(11, 12);
507/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorreserved?language=objc)
508pub const kIOUSBEndpointDescriptorReserved: c_uint = IOUSBBitRange!(13, 15);
509/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbendpointdescriptorreservedphase?language=objc)
510pub const kIOUSBEndpointDescriptorReservedPhase: c_uint = IOUSBBitRangePhase!(13, 15);
511
512/// IO Direction of an endpoint
513///
514/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousbendpointdirection?language=objc)
515#[repr(transparent)]
516#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
517pub struct tIOUSBEndpointDirection(pub c_uint);
518impl tIOUSBEndpointDirection {
519    #[doc(alias = "kIOUSBEndpointDirectionOut")]
520    pub const IOUSBEndpointDirectionOut: Self =
521        Self(kIOUSBEndpointDescriptorDirectionOut >> kIOUSBEndpointDescriptorDirectionPhase);
522    #[doc(alias = "kIOUSBEndpointDirectionIn")]
523    pub const IOUSBEndpointDirectionIn: Self =
524        Self(kIOUSBEndpointDescriptorDirectionIn >> kIOUSBEndpointDescriptorDirectionPhase);
525    #[doc(alias = "kIOUSBEndpointDirectionUnknown")]
526    pub const IOUSBEndpointDirectionUnknown: Self = Self(2);
527}
528
529#[cfg(feature = "objc2")]
530unsafe impl Encode for tIOUSBEndpointDirection {
531    const ENCODING: Encoding = c_uint::ENCODING;
532}
533
534#[cfg(feature = "objc2")]
535unsafe impl RefEncode for tIOUSBEndpointDirection {
536    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
537}
538
539/// Describes the type of endpoint
540///
541/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousbendpointtype?language=objc)
542#[repr(transparent)]
543#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
544pub struct tIOUSBEndpointType(pub c_uint);
545impl tIOUSBEndpointType {
546    #[doc(alias = "kIOUSBEndpointTypeControl")]
547    pub const IOUSBEndpointTypeControl: Self = Self(
548        kIOUSBEndpointDescriptorTransferTypeControl >> kIOUSBEndpointDescriptorTransferTypePhase,
549    );
550    #[doc(alias = "kIOUSBEndpointTypeIsochronous")]
551    pub const IOUSBEndpointTypeIsochronous: Self = Self(
552        kIOUSBEndpointDescriptorTransferTypeIsochronous
553            >> kIOUSBEndpointDescriptorTransferTypePhase,
554    );
555    #[doc(alias = "kIOUSBEndpointTypeBulk")]
556    pub const IOUSBEndpointTypeBulk: Self =
557        Self(kIOUSBEndpointDescriptorTransferTypeBulk >> kIOUSBEndpointDescriptorTransferTypePhase);
558    #[doc(alias = "kIOUSBEndpointTypeInterrupt")]
559    pub const IOUSBEndpointTypeInterrupt: Self = Self(
560        kIOUSBEndpointDescriptorTransferTypeInterrupt >> kIOUSBEndpointDescriptorTransferTypePhase,
561    );
562}
563
564#[cfg(feature = "objc2")]
565unsafe impl Encode for tIOUSBEndpointType {
566    const ENCODING: Encoding = c_uint::ENCODING;
567}
568
569#[cfg(feature = "objc2")]
570unsafe impl RefEncode for tIOUSBEndpointType {
571    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
572}
573
574/// [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousbendpointsynchronizationtype?language=objc)
575#[repr(transparent)]
576#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
577pub struct tIOUSBEndpointSynchronizationType(pub c_uint);
578impl tIOUSBEndpointSynchronizationType {
579    #[doc(alias = "kIOUSBEndpointSynchronizationTypeNone")]
580    pub const IOUSBEndpointSynchronizationTypeNone: Self = Self(
581        kIOUSBEndpointDescriptorSynchronizationTypeNone
582            >> kIOUSBEndpointDescriptorSynchronizationTypePhase,
583    );
584    #[doc(alias = "kIOUSBEndpointSynchronizationTypeAsynchronous")]
585    pub const IOUSBEndpointSynchronizationTypeAsynchronous: Self = Self(
586        kIOUSBEndpointDescriptorSynchronizationTypeAsynchronous
587            >> kIOUSBEndpointDescriptorSynchronizationTypePhase,
588    );
589    #[doc(alias = "kIOUSBEndpointSynchronizationTypeAdaptive")]
590    pub const IOUSBEndpointSynchronizationTypeAdaptive: Self = Self(
591        kIOUSBEndpointDescriptorSynchronizationTypeAdaptive
592            >> kIOUSBEndpointDescriptorSynchronizationTypePhase,
593    );
594    #[doc(alias = "kIOUSBEndpointSynchronizationTypeSynchronous")]
595    pub const IOUSBEndpointSynchronizationTypeSynchronous: Self = Self(
596        kIOUSBEndpointDescriptorSynchronizationTypeSynchronous
597            >> kIOUSBEndpointDescriptorSynchronizationTypePhase,
598    );
599}
600
601#[cfg(feature = "objc2")]
602unsafe impl Encode for tIOUSBEndpointSynchronizationType {
603    const ENCODING: Encoding = c_uint::ENCODING;
604}
605
606#[cfg(feature = "objc2")]
607unsafe impl RefEncode for tIOUSBEndpointSynchronizationType {
608    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
609}
610
611/// [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousbendpointusagetype?language=objc)
612#[repr(transparent)]
613#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
614pub struct tIOUSBEndpointUsageType(pub c_uint);
615impl tIOUSBEndpointUsageType {
616    #[doc(alias = "kIOUSBEndpointUsageTypeIsocData")]
617    pub const IOUSBEndpointUsageTypeIsocData: Self =
618        Self(kIOUSBEndpointDescriptorUsageTypeIsocData >> kIOUSBEndpointDescriptorUsageTypePhase);
619    #[doc(alias = "kIOUSBEndpointUsageTypeIsocFeedback")]
620    pub const IOUSBEndpointUsageTypeIsocFeedback: Self = Self(
621        kIOUSBEndpointDescriptorUsageTypeIsocFeedback >> kIOUSBEndpointDescriptorUsageTypePhase,
622    );
623    #[doc(alias = "kIOUSBEndpointUsageTypeIsocImplicit")]
624    pub const IOUSBEndpointUsageTypeIsocImplicit: Self = Self(
625        kIOUSBEndpointDescriptorUsageTypeIsocImplicit >> kIOUSBEndpointDescriptorUsageTypePhase,
626    );
627}
628
629#[cfg(feature = "objc2")]
630unsafe impl Encode for tIOUSBEndpointUsageType {
631    const ENCODING: Encoding = c_uint::ENCODING;
632}
633
634#[cfg(feature = "objc2")]
635unsafe impl RefEncode for tIOUSBEndpointUsageType {
636    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
637}
638
639/// USB Language Identifiers 1.0
640///
641/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousblanguageid?language=objc)
642#[repr(transparent)]
643#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
644pub struct tIOUSBLanguageID(pub c_uint);
645impl tIOUSBLanguageID {
646    #[doc(alias = "kIOUSBLanguageIDEnglishUS")]
647    pub const IOUSBLanguageIDEnglishUS: Self = Self(0x0409);
648}
649
650#[cfg(feature = "objc2")]
651unsafe impl Encode for tIOUSBLanguageID {
652    const ENCODING: Encoding = c_uint::ENCODING;
653}
654
655#[cfg(feature = "objc2")]
656unsafe impl RefEncode for tIOUSBLanguageID {
657    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
658}
659
660/// Descriptor for a USB Strings.  See the USB Specification at
661/// <a href="http://www.usb.org" target="_blank">
662/// http://www.usb.org
663/// </a>
664/// .
665/// USB 2.0 9.6.7: String
666///
667/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbstringdescriptor?language=objc)
668#[repr(C)]
669#[derive(Clone, Copy, Debug, PartialEq)]
670pub struct IOUSBStringDescriptor {
671    pub bLength: u8,
672    pub bDescriptorType: u8,
673    pub bString: [u8; 1],
674}
675
676#[cfg(feature = "objc2")]
677unsafe impl Encode for IOUSBStringDescriptor {
678    const ENCODING: Encoding = Encoding::Struct(
679        "IOUSBStringDescriptor",
680        &[<u8>::ENCODING, <u8>::ENCODING, <[u8; 1]>::ENCODING],
681    );
682}
683
684#[cfg(feature = "objc2")]
685unsafe impl RefEncode for IOUSBStringDescriptor {
686    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
687}
688
689/// [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousbdevicecapabilitytype?language=objc)
690#[repr(transparent)]
691#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
692pub struct tIOUSBDeviceCapabilityType(pub c_uint);
693impl tIOUSBDeviceCapabilityType {
694    #[doc(alias = "kIOUSBDeviceCapabilityTypeWireless")]
695    pub const IOUSBDeviceCapabilityTypeWireless: Self = Self(1);
696    #[doc(alias = "kIOUSBDeviceCapabilityTypeUSB20Extension")]
697    pub const IOUSBDeviceCapabilityTypeUSB20Extension: Self = Self(2);
698    #[doc(alias = "kIOUSBDeviceCapabilityTypeSuperSpeed")]
699    pub const IOUSBDeviceCapabilityTypeSuperSpeed: Self = Self(3);
700    #[doc(alias = "kIOUSBDeviceCapabilityTypeContainerID")]
701    pub const IOUSBDeviceCapabilityTypeContainerID: Self = Self(4);
702    #[doc(alias = "kIOUSBDeviceCapabilityTypePlatform")]
703    pub const IOUSBDeviceCapabilityTypePlatform: Self = Self(5);
704    #[doc(alias = "kIOUSBDeviceCapabilityTypePowerDelivery")]
705    pub const IOUSBDeviceCapabilityTypePowerDelivery: Self = Self(6);
706    #[doc(alias = "kIOUSBDeviceCapabilityTypeBatteryInfo")]
707    pub const IOUSBDeviceCapabilityTypeBatteryInfo: Self = Self(7);
708    #[doc(alias = "kIOUSBDeviceCapabilityTypePdConsumerPort")]
709    pub const IOUSBDeviceCapabilityTypePdConsumerPort: Self = Self(8);
710    #[doc(alias = "kIOUSBDeviceCapabilityTypePdProviderPort")]
711    pub const IOUSBDeviceCapabilityTypePdProviderPort: Self = Self(9);
712    #[doc(alias = "kIOUSBDeviceCapabilityTypeSuperSpeedPlus")]
713    pub const IOUSBDeviceCapabilityTypeSuperSpeedPlus: Self = Self(10);
714    #[doc(alias = "kIOUSBDeviceCapabilityTypePrecisionMeasurement")]
715    pub const IOUSBDeviceCapabilityTypePrecisionMeasurement: Self = Self(11);
716    #[doc(alias = "kIOUSBDeviceCapabilityTypeWirelessExt")]
717    pub const IOUSBDeviceCapabilityTypeWirelessExt: Self = Self(12);
718    #[doc(alias = "kIOUSBDeviceCapabilityTypeBillboard")]
719    pub const IOUSBDeviceCapabilityTypeBillboard: Self = Self(13);
720    #[doc(alias = "kIOUSBDeviceCapabilityTypeBillboardAltMode")]
721    pub const IOUSBDeviceCapabilityTypeBillboardAltMode: Self = Self(15);
722}
723
724#[cfg(feature = "objc2")]
725unsafe impl Encode for tIOUSBDeviceCapabilityType {
726    const ENCODING: Encoding = c_uint::ENCODING;
727}
728
729#[cfg(feature = "objc2")]
730unsafe impl RefEncode for tIOUSBDeviceCapabilityType {
731    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
732}
733
734/// USB BOS descriptor. See the USB Specification at
735/// <a href="http://www.usb.org" target="_blank">
736/// http://www.usb.org
737/// </a>
738/// .
739/// USB 3.0 9.6.2: Binary Device Object Store (BOS)
740///
741/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbbosdescriptor?language=objc)
742#[repr(C, packed)]
743#[derive(Clone, Copy, Debug, PartialEq)]
744pub struct IOUSBBOSDescriptor {
745    pub bLength: u8,
746    pub bDescriptorType: u8,
747    pub wTotalLength: u16,
748    pub bNumDeviceCaps: u8,
749}
750
751#[cfg(feature = "objc2")]
752unsafe impl Encode for IOUSBBOSDescriptor {
753    const ENCODING: Encoding = Encoding::Struct(
754        "IOUSBBOSDescriptor",
755        &[
756            <u8>::ENCODING,
757            <u8>::ENCODING,
758            <u16>::ENCODING,
759            <u8>::ENCODING,
760        ],
761    );
762}
763
764#[cfg(feature = "objc2")]
765unsafe impl RefEncode for IOUSBBOSDescriptor {
766    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
767}
768
769/// Device Capability descriptor.  See the USB Specification at
770/// <a href="http://www.usb.org" target="_blank">
771/// http://www.usb.org
772/// </a>
773/// .
774/// USB 3.0 9.6.2: Binary Device Object Store (BOS)
775///
776/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicecapabilitydescriptorheader?language=objc)
777#[repr(C)]
778#[derive(Clone, Copy, Debug, PartialEq)]
779pub struct IOUSBDeviceCapabilityDescriptorHeader {
780    pub bLength: u8,
781    pub bDescriptorType: u8,
782    pub bDevCapabilityType: u8,
783}
784
785#[cfg(feature = "objc2")]
786unsafe impl Encode for IOUSBDeviceCapabilityDescriptorHeader {
787    const ENCODING: Encoding = Encoding::Struct(
788        "IOUSBDeviceCapabilityDescriptorHeader",
789        &[<u8>::ENCODING, <u8>::ENCODING, <u8>::ENCODING],
790    );
791}
792
793#[cfg(feature = "objc2")]
794unsafe impl RefEncode for IOUSBDeviceCapabilityDescriptorHeader {
795    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
796}
797
798/// Device Capability USB 2.0 Extension.
799/// USB 3.0 9.6.2.1: USB 2.0 Extension
800///
801/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicecapabilityusb2extension?language=objc)
802#[repr(C, packed)]
803#[derive(Clone, Copy, Debug, PartialEq)]
804pub struct IOUSBDeviceCapabilityUSB2Extension {
805    pub bLength: u8,
806    pub bDescriptorType: u8,
807    pub bDevCapabilityType: u8,
808    pub bmAttributes: u32,
809}
810
811#[cfg(feature = "objc2")]
812unsafe impl Encode for IOUSBDeviceCapabilityUSB2Extension {
813    const ENCODING: Encoding = Encoding::Struct(
814        "IOUSBDeviceCapabilityUSB2Extension",
815        &[
816            <u8>::ENCODING,
817            <u8>::ENCODING,
818            <u8>::ENCODING,
819            <u32>::ENCODING,
820        ],
821    );
822}
823
824#[cfg(feature = "objc2")]
825unsafe impl RefEncode for IOUSBDeviceCapabilityUSB2Extension {
826    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
827}
828
829/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbusb20extensioncapabilitylpm?language=objc)
830pub const kIOUSBUSB20ExtensionCapabilityLPM: c_uint = IOUSBBit!(1);
831/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbusb20extensioncapabilitybeslsupport?language=objc)
832pub const kIOUSBUSB20ExtensionCapabilityBESLSupport: c_uint = IOUSBBit!(2);
833/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbusb20extensioncapabilitybeslvalid?language=objc)
834pub const kIOUSBUSB20ExtensionCapabilityBESLValid: c_uint = IOUSBBit!(3);
835/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbusb20extensioncapabilitybesldvalid?language=objc)
836pub const kIOUSBUSB20ExtensionCapabilityBESLDValid: c_uint = IOUSBBit!(4);
837/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbusb20extensioncapabilitybesl?language=objc)
838pub const kIOUSBUSB20ExtensionCapabilityBESL: c_uint = IOUSBBitRange!(8, 11);
839/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbusb20extensioncapabilitybeslphase?language=objc)
840pub const kIOUSBUSB20ExtensionCapabilityBESLPhase: c_uint = IOUSBBitRangePhase!(8, 11);
841/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbusb20extensioncapabilitybesld?language=objc)
842pub const kIOUSBUSB20ExtensionCapabilityBESLD: c_uint = IOUSBBitRange!(12, 15);
843/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbusb20extensioncapabilitybesldphase?language=objc)
844pub const kIOUSBUSB20ExtensionCapabilityBESLDPhase: c_uint = IOUSBBitRangePhase!(12, 15);
845
846/// Device Capability SuperSpeed USB. USB 3.0 9.6.2.2: SuperSpeed USB Device Capability
847///
848/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicecapabilitysuperspeedusb?language=objc)
849#[repr(C, packed)]
850#[derive(Clone, Copy, Debug, PartialEq)]
851pub struct IOUSBDeviceCapabilitySuperSpeedUSB {
852    pub bLength: u8,
853    pub bDescriptorType: u8,
854    pub bDevCapabilityType: u8,
855    pub bmAttributes: u8,
856    pub wSpeedsSupported: u16,
857    pub bFunctionalitySupport: u8,
858    pub bU1DevExitLat: u8,
859    pub wU2DevExitLat: u16,
860}
861
862#[cfg(feature = "objc2")]
863unsafe impl Encode for IOUSBDeviceCapabilitySuperSpeedUSB {
864    const ENCODING: Encoding = Encoding::Struct(
865        "IOUSBDeviceCapabilitySuperSpeedUSB",
866        &[
867            <u8>::ENCODING,
868            <u8>::ENCODING,
869            <u8>::ENCODING,
870            <u8>::ENCODING,
871            <u16>::ENCODING,
872            <u8>::ENCODING,
873            <u8>::ENCODING,
874            <u16>::ENCODING,
875        ],
876    );
877}
878
879#[cfg(feature = "objc2")]
880unsafe impl RefEncode for IOUSBDeviceCapabilitySuperSpeedUSB {
881    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
882}
883
884/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeeddevicecapabilityltm?language=objc)
885pub const kIOUSBSuperSpeedDeviceCapabilityLTM: c_uint = IOUSBBit!(1);
886/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeeddevicecapabilitylowspeed?language=objc)
887pub const kIOUSBSuperSpeedDeviceCapabilityLowSpeed: c_uint = IOUSBBit!(0);
888/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeeddevicecapabilityfullspeed?language=objc)
889pub const kIOUSBSuperSpeedDeviceCapabilityFullSpeed: c_uint = IOUSBBit!(1);
890/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeeddevicecapabilityhighspeed?language=objc)
891pub const kIOUSBSuperSpeedDeviceCapabilityHighSpeed: c_uint = IOUSBBit!(2);
892/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeeddevicecapability5gb?language=objc)
893pub const kIOUSBSuperSpeedDeviceCapability5Gb: c_uint = IOUSBBit!(3);
894/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeeddevicecapabilitysupportlowspeed?language=objc)
895pub const kIOUSBSuperSpeedDeviceCapabilitySupportLowSpeed: c_uint = 0;
896/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeeddevicecapabilitysupportfullspeed?language=objc)
897pub const kIOUSBSuperSpeedDeviceCapabilitySupportFullSpeed: c_uint = 1;
898/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeeddevicecapabilitysupporthighspeed?language=objc)
899pub const kIOUSBSuperSpeedDeviceCapabilitySupportHighSpeed: c_uint = 2;
900/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeeddevicecapabilitysupport5gb?language=objc)
901pub const kIOUSBSuperSpeedDeviceCapabilitySupport5Gb: c_uint = 3;
902/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeeddevicecapabilityu1devexitlatmax?language=objc)
903pub const kIOUSBSuperSpeedDeviceCapabilityU1DevExitLatMax: c_uint = 0xa;
904/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeeddevicecapabilityu2devexitlatmax?language=objc)
905pub const kIOUSBSuperSpeedDeviceCapabilityU2DevExitLatMax: c_uint = 0x7ff;
906
907/// Device Capability SuperSpeedPlus USB.
908/// USB 3.1 9.6.2.5: SuperSpeedPlus USB Device Capability
909///
910/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicecapabilitysuperspeedplususb?language=objc)
911#[repr(C, packed)]
912#[derive(Clone, Copy, Debug, PartialEq)]
913pub struct IOUSBDeviceCapabilitySuperSpeedPlusUSB {
914    pub bLength: u8,
915    pub bDescriptorType: u8,
916    pub bDevCapabilityType: u8,
917    pub bReserved: u8,
918    pub bmAttributes: u32,
919    pub wFunctionalitySupport: u16,
920    pub wReserved: u16,
921    pub bmSublinkSpeedAttr: *mut u32,
922}
923
924#[cfg(feature = "objc2")]
925unsafe impl Encode for IOUSBDeviceCapabilitySuperSpeedPlusUSB {
926    const ENCODING: Encoding = Encoding::Struct(
927        "IOUSBDeviceCapabilitySuperSpeedPlusUSB",
928        &[
929            <u8>::ENCODING,
930            <u8>::ENCODING,
931            <u8>::ENCODING,
932            <u8>::ENCODING,
933            <u32>::ENCODING,
934            <u16>::ENCODING,
935            <u16>::ENCODING,
936            <*mut u32>::ENCODING,
937        ],
938    );
939}
940
941#[cfg(feature = "objc2")]
942unsafe impl RefEncode for IOUSBDeviceCapabilitySuperSpeedPlusUSB {
943    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
944}
945
946/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkspeedattrcount?language=objc)
947pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkSpeedAttrCount: c_uint = IOUSBBitRange!(0, 4);
948/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkspeedattrcountphase?language=objc)
949pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkSpeedAttrCountPhase: c_uint =
950    IOUSBBitRangePhase!(0, 4);
951/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkspeedidcount?language=objc)
952pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkSpeedIdCount: c_uint = IOUSBBitRange!(5, 8);
953/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkspeedidcountphase?language=objc)
954pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkSpeedIdCountPhase: c_uint =
955    IOUSBBitRangePhase!(5, 8);
956/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkminspeedid?language=objc)
957pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkMinSpeedId: c_uint = IOUSBBitRange!(0, 3);
958/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkminspeedidphase?language=objc)
959pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkMinSpeedIdPhase: c_uint =
960    IOUSBBitRangePhase!(0, 3);
961/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilityreserved?language=objc)
962pub const kIOUSBSuperSpeedPlusDeviceCapabilityReserved: c_uint = IOUSBBitRange!(4, 7);
963/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilityreservedphase?language=objc)
964pub const kIOUSBSuperSpeedPlusDeviceCapabilityReservedPhase: c_uint = IOUSBBitRangePhase!(4, 7);
965/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilityminrxlanecount?language=objc)
966pub const kIOUSBSuperSpeedPlusDeviceCapabilityMinRxLaneCount: c_uint = IOUSBBitRange!(8, 11);
967/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilityminrxlanecountphase?language=objc)
968pub const kIOUSBSuperSpeedPlusDeviceCapabilityMinRxLaneCountPhase: c_uint =
969    IOUSBBitRangePhase!(8, 11);
970/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitymintxlanecount?language=objc)
971pub const kIOUSBSuperSpeedPlusDeviceCapabilityMinTxLaneCount: c_uint = IOUSBBitRange!(12, 15);
972/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitymintxlanecountphase?language=objc)
973pub const kIOUSBSuperSpeedPlusDeviceCapabilityMinTxLaneCountPhase: c_uint =
974    IOUSBBitRangePhase!(12, 15);
975/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkspeedid?language=objc)
976pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkSpeedId: c_uint = IOUSBBitRange!(0, 3);
977/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkspeedidphase?language=objc)
978pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkSpeedIdPhase: c_uint =
979    IOUSBBitRangePhase!(0, 3);
980/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinklse?language=objc)
981pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkLSE: c_uint = IOUSBBitRange!(4, 5);
982/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinklsephase?language=objc)
983pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkLSEPhase: c_uint = IOUSBBitRangePhase!(4, 5);
984/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinklsebits?language=objc)
985pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkLSEBits: c_uint =
986    0 << kIOUSBSuperSpeedPlusDeviceCapabilitySublinkLSEPhase;
987/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinklsekbits?language=objc)
988pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkLSEKbits: c_uint =
989    1 << kIOUSBSuperSpeedPlusDeviceCapabilitySublinkLSEPhase;
990/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinklsembits?language=objc)
991pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkLSEMbits: c_uint =
992    2 << kIOUSBSuperSpeedPlusDeviceCapabilitySublinkLSEPhase;
993/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinklsegbits?language=objc)
994pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkLSEGbits: c_uint =
995    3 << kIOUSBSuperSpeedPlusDeviceCapabilitySublinkLSEPhase;
996/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinktype?language=objc)
997pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkType: c_uint = IOUSBBitRange!(6, 7);
998/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinktypephase?language=objc)
999pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkTypePhase: c_uint = IOUSBBitRangePhase!(6, 7);
1000/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinksymmetry?language=objc)
1001pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkSymmetry: c_uint = IOUSBBit!(6);
1002/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinksymmetryphase?language=objc)
1003pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkSymmetryPhase: c_uint =
1004    IOUSBBitRangePhase!(6, 6);
1005/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinksymmetric?language=objc)
1006pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkSymmetric: c_uint =
1007    0 << kIOUSBSuperSpeedPlusDeviceCapabilitySublinkSymmetryPhase;
1008/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkasymmetric?language=objc)
1009pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkAsymmetric: c_uint =
1010    1 << kIOUSBSuperSpeedPlusDeviceCapabilitySublinkSymmetryPhase;
1011/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkdirection?language=objc)
1012pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkDirection: c_uint = IOUSBBit!(7);
1013/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkdirectionphase?language=objc)
1014pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkDirectionPhase: c_uint =
1015    IOUSBBitRangePhase!(7, 7);
1016/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkdirectionrx?language=objc)
1017pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkDirectionRx: c_uint =
1018    0 << kIOUSBSuperSpeedPlusDeviceCapabilitySublinkDirectionPhase;
1019/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkdirectiontx?language=objc)
1020pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkDirectionTx: c_uint =
1021    1 << kIOUSBSuperSpeedPlusDeviceCapabilitySublinkDirectionPhase;
1022/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkreserved?language=objc)
1023pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkReserved: c_uint = IOUSBBitRange!(8, 13);
1024/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkreservedphase?language=objc)
1025pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkReservedPhase: c_uint =
1026    IOUSBBitRangePhase!(8, 13);
1027/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkprotocol?language=objc)
1028pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkProtocol: c_uint = IOUSBBitRange!(14, 15);
1029/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkprotocolphase?language=objc)
1030pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkProtocolPhase: c_uint =
1031    IOUSBBitRangePhase!(14, 15);
1032/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkspeedmantissa?language=objc)
1033pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkSpeedMantissa: c_uint = IOUSBBitRange!(16, 31);
1034/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedplusdevicecapabilitysublinkspeedmantissaphase?language=objc)
1035pub const kIOUSBSuperSpeedPlusDeviceCapabilitySublinkSpeedMantissaPhase: c_uint =
1036    IOUSBBitRangePhase!(16, 31);
1037
1038/// Device Capability Container ID.
1039/// USB 3.0 9.6.2.3: Container ID
1040///
1041/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicecapabilitycontainerid?language=objc)
1042#[repr(C)]
1043#[derive(Clone, Copy, Debug, PartialEq)]
1044pub struct IOUSBDeviceCapabilityContainerID {
1045    pub bLength: u8,
1046    pub bDescriptorType: u8,
1047    pub bDevCapabilityType: u8,
1048    pub bReservedID: u8,
1049    pub containerID: [u8; 16],
1050}
1051
1052#[cfg(feature = "objc2")]
1053unsafe impl Encode for IOUSBDeviceCapabilityContainerID {
1054    const ENCODING: Encoding = Encoding::Struct(
1055        "IOUSBDeviceCapabilityContainerID",
1056        &[
1057            <u8>::ENCODING,
1058            <u8>::ENCODING,
1059            <u8>::ENCODING,
1060            <u8>::ENCODING,
1061            <[u8; 16]>::ENCODING,
1062        ],
1063    );
1064}
1065
1066#[cfg(feature = "objc2")]
1067unsafe impl RefEncode for IOUSBDeviceCapabilityContainerID {
1068    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1069}
1070
1071/// Device Capability Platform Descriptor.
1072/// USB 3.1 9.6.2.4: Platform Descriptor
1073///
1074/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbplatformcapabilitydescriptor?language=objc)
1075#[repr(C)]
1076#[derive(Clone, Copy, Debug, PartialEq)]
1077pub struct IOUSBPlatformCapabilityDescriptor {
1078    pub bLength: u8,
1079    pub bDescriptorType: u8,
1080    pub bDevCapabilityType: u8,
1081    pub bReserved: u8,
1082    pub PlatformCapabilityUUID: uuid_t,
1083}
1084
1085#[cfg(feature = "objc2")]
1086unsafe impl Encode for IOUSBPlatformCapabilityDescriptor {
1087    const ENCODING: Encoding = Encoding::Struct(
1088        "IOUSBPlatformCapabilityDescriptor",
1089        &[
1090            <u8>::ENCODING,
1091            <u8>::ENCODING,
1092            <u8>::ENCODING,
1093            <u8>::ENCODING,
1094            <uuid_t>::ENCODING,
1095        ],
1096    );
1097}
1098
1099#[cfg(feature = "objc2")]
1100unsafe impl RefEncode for IOUSBPlatformCapabilityDescriptor {
1101    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1102}
1103
1104/// Device Capability Billboard Alternate Setting Info.
1105/// USB Billboard 3.1.6.2: Billboard Capability Descriptor V1.2
1106///
1107/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicecapabilitybillboardaltconfigcompatibility?language=objc)
1108#[repr(C, packed)]
1109#[derive(Clone, Copy, Debug, PartialEq)]
1110pub struct IOUSBDeviceCapabilityBillboardAltConfigCompatibility {
1111    pub wSVID: u16,
1112    pub dwAlternateMode: u32,
1113    pub iAlternateModeString: u8,
1114}
1115
1116#[cfg(feature = "objc2")]
1117unsafe impl Encode for IOUSBDeviceCapabilityBillboardAltConfigCompatibility {
1118    const ENCODING: Encoding = Encoding::Struct(
1119        "IOUSBDeviceCapabilityBillboardAltConfigCompatibility",
1120        &[<u16>::ENCODING, <u32>::ENCODING, <u8>::ENCODING],
1121    );
1122}
1123
1124#[cfg(feature = "objc2")]
1125unsafe impl RefEncode for IOUSBDeviceCapabilityBillboardAltConfigCompatibility {
1126    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1127}
1128
1129/// Device Capability Billboard Alternate Setting Info.
1130/// USB Billboard 3.1.6.2: Billboard Capability Descriptor V1.1 and 1.21+
1131///
1132/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicecapabilitybillboardaltconfig?language=objc)
1133#[repr(C, packed)]
1134#[derive(Clone, Copy, Debug, PartialEq)]
1135pub struct IOUSBDeviceCapabilityBillboardAltConfig {
1136    pub wSVID: u16,
1137    pub bAltenateMode: u8,
1138    pub iAlternateModeString: u8,
1139}
1140
1141#[cfg(feature = "objc2")]
1142unsafe impl Encode for IOUSBDeviceCapabilityBillboardAltConfig {
1143    const ENCODING: Encoding = Encoding::Struct(
1144        "IOUSBDeviceCapabilityBillboardAltConfig",
1145        &[<u16>::ENCODING, <u8>::ENCODING, <u8>::ENCODING],
1146    );
1147}
1148
1149#[cfg(feature = "objc2")]
1150unsafe impl RefEncode for IOUSBDeviceCapabilityBillboardAltConfig {
1151    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1152}
1153
1154/// Device Capability Billboard.
1155/// USB Billboard 3.1.6.2: Billboard Capability Descriptor
1156///
1157/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicecapabilitybillboard?language=objc)
1158#[repr(C, packed)]
1159#[derive(Clone, Copy, Debug, PartialEq)]
1160pub struct IOUSBDeviceCapabilityBillboard {
1161    pub bLength: u8,
1162    pub bDescriptorType: u8,
1163    pub bDevCapabilityType: u8,
1164    pub iAdditionalInfoURL: u8,
1165    pub bNumberOfAlternateModes: u8,
1166    pub bPreferredAlternateMode: u8,
1167    pub vCONNPower: u16,
1168    pub bmConfigured: [u8; 32],
1169    pub bcdVersion: u16,
1170    pub bAdditionalFailureInfo: u8,
1171    pub bReserved: u8,
1172    pub pAltConfigurations: *mut IOUSBDeviceCapabilityBillboardAltConfig,
1173}
1174
1175#[cfg(feature = "objc2")]
1176unsafe impl Encode for IOUSBDeviceCapabilityBillboard {
1177    const ENCODING: Encoding = Encoding::Struct(
1178        "IOUSBDeviceCapabilityBillboard",
1179        &[
1180            <u8>::ENCODING,
1181            <u8>::ENCODING,
1182            <u8>::ENCODING,
1183            <u8>::ENCODING,
1184            <u8>::ENCODING,
1185            <u8>::ENCODING,
1186            <u16>::ENCODING,
1187            <[u8; 32]>::ENCODING,
1188            <u16>::ENCODING,
1189            <u8>::ENCODING,
1190            <u8>::ENCODING,
1191            <*mut IOUSBDeviceCapabilityBillboardAltConfig>::ENCODING,
1192        ],
1193    );
1194}
1195
1196#[cfg(feature = "objc2")]
1197unsafe impl RefEncode for IOUSBDeviceCapabilityBillboard {
1198    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1199}
1200
1201/// Device Capability Billboard Alternate mode.
1202/// USB Billboard 3.1.6.3: Billboard Capability Descriptor V1.21
1203///
1204/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicecapabilitybillboardaltmode?language=objc)
1205#[repr(C, packed)]
1206#[derive(Clone, Copy, Debug, PartialEq)]
1207pub struct IOUSBDeviceCapabilityBillboardAltMode {
1208    pub bLength: u8,
1209    pub bDescriptorType: u8,
1210    pub bDevCapabilityType: u8,
1211    pub bIndex: u8,
1212    pub dwAlternateModeVdo: u16,
1213}
1214
1215#[cfg(feature = "objc2")]
1216unsafe impl Encode for IOUSBDeviceCapabilityBillboardAltMode {
1217    const ENCODING: Encoding = Encoding::Struct(
1218        "IOUSBDeviceCapabilityBillboardAltMode",
1219        &[
1220            <u8>::ENCODING,
1221            <u8>::ENCODING,
1222            <u8>::ENCODING,
1223            <u8>::ENCODING,
1224            <u16>::ENCODING,
1225        ],
1226    );
1227}
1228
1229#[cfg(feature = "objc2")]
1230unsafe impl RefEncode for IOUSBDeviceCapabilityBillboardAltMode {
1231    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1232}
1233
1234/// USB Inerface Association Descriptor.  ECN to the USB 2.0 Spec.
1235/// See the USB Specification at
1236/// <a href="http://www.usb.org" target="_blank">
1237/// http://www.usb.org
1238/// </a>
1239/// .
1240/// USB 3.0 9.6.4: Interface Association
1241///
1242/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbinterfaceassociationdescriptor?language=objc)
1243#[repr(C)]
1244#[derive(Clone, Copy, Debug, PartialEq)]
1245pub struct IOUSBInterfaceAssociationDescriptor {
1246    pub bLength: u8,
1247    pub bDescriptorType: u8,
1248    pub bFirstInterface: u8,
1249    pub bInterfaceCount: u8,
1250    pub bFunctionClass: u8,
1251    pub bFunctionSubClass: u8,
1252    pub bFunctionProtocol: u8,
1253    pub iFunction: u8,
1254}
1255
1256#[cfg(feature = "objc2")]
1257unsafe impl Encode for IOUSBInterfaceAssociationDescriptor {
1258    const ENCODING: Encoding = Encoding::Struct(
1259        "IOUSBInterfaceAssociationDescriptor",
1260        &[
1261            <u8>::ENCODING,
1262            <u8>::ENCODING,
1263            <u8>::ENCODING,
1264            <u8>::ENCODING,
1265            <u8>::ENCODING,
1266            <u8>::ENCODING,
1267            <u8>::ENCODING,
1268            <u8>::ENCODING,
1269        ],
1270    );
1271}
1272
1273#[cfg(feature = "objc2")]
1274unsafe impl RefEncode for IOUSBInterfaceAssociationDescriptor {
1275    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1276}
1277
1278/// Descriptor for a SuperSpeed USB Endpoint Companion.
1279/// See the USB Specification at
1280/// <a href="http://www.usb.org" TARGET="_blank">
1281/// http://www.usb.org
1282/// </a>
1283/// .
1284/// USB 3.1 9.6.7: SuperSpeed Endpoint Companion
1285///
1286/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbsuperspeedendpointcompaniondescriptor?language=objc)
1287#[repr(C, packed)]
1288#[derive(Clone, Copy, Debug, PartialEq)]
1289pub struct IOUSBSuperSpeedEndpointCompanionDescriptor {
1290    pub bLength: u8,
1291    pub bDescriptorType: u8,
1292    pub bMaxBurst: u8,
1293    pub bmAttributes: u8,
1294    pub wBytesPerInterval: u16,
1295}
1296
1297#[cfg(feature = "objc2")]
1298unsafe impl Encode for IOUSBSuperSpeedEndpointCompanionDescriptor {
1299    const ENCODING: Encoding = Encoding::Struct(
1300        "IOUSBSuperSpeedEndpointCompanionDescriptor",
1301        &[
1302            <u8>::ENCODING,
1303            <u8>::ENCODING,
1304            <u8>::ENCODING,
1305            <u8>::ENCODING,
1306            <u16>::ENCODING,
1307        ],
1308    );
1309}
1310
1311#[cfg(feature = "objc2")]
1312unsafe impl RefEncode for IOUSBSuperSpeedEndpointCompanionDescriptor {
1313    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1314}
1315
1316/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedendpointcompaniondescriptormaxburst?language=objc)
1317pub const kIOUSBSuperSpeedEndpointCompanionDescriptorMaxBurst: c_uint = IOUSBBitRange!(0, 4);
1318/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedendpointcompaniondescriptormaxburstphase?language=objc)
1319pub const kIOUSBSuperSpeedEndpointCompanionDescriptorMaxBurstPhase: c_uint =
1320    IOUSBBitRangePhase!(0, 4);
1321/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedendpointcompaniondescriptorbulkmaxstreams?language=objc)
1322pub const kIOUSBSuperSpeedEndpointCompanionDescriptorBulkMaxStreams: c_uint = IOUSBBitRange!(0, 4);
1323/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedendpointcompaniondescriptorbulkmaxstreamsphase?language=objc)
1324pub const kIOUSBSuperSpeedEndpointCompanionDescriptorBulkMaxStreamsPhase: c_uint =
1325    IOUSBBitRangePhase!(0, 4);
1326/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedendpointcompaniondescriptorbulkreserved?language=objc)
1327pub const kIOUSBSuperSpeedEndpointCompanionDescriptorBulkReserved: c_uint = IOUSBBitRange!(5, 7);
1328/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedendpointcompaniondescriptorbulkreservedphase?language=objc)
1329pub const kIOUSBSuperSpeedEndpointCompanionDescriptorBulkReservedPhase: c_uint =
1330    IOUSBBitRangePhase!(5, 7);
1331/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedendpointcompaniondescriptorisocmult?language=objc)
1332pub const kIOUSBSuperSpeedEndpointCompanionDescriptorIsocMult: c_uint = IOUSBBitRange!(0, 1);
1333/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedendpointcompaniondescriptorisocmultphase?language=objc)
1334pub const kIOUSBSuperSpeedEndpointCompanionDescriptorIsocMultPhase: c_uint =
1335    IOUSBBitRangePhase!(0, 1);
1336/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedendpointcompaniondescriptorisocreserved?language=objc)
1337pub const kIOUSBSuperSpeedEndpointCompanionDescriptorIsocReserved: c_uint = IOUSBBitRange!(2, 6);
1338/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedendpointcompaniondescriptorisocreservedphase?language=objc)
1339pub const kIOUSBSuperSpeedEndpointCompanionDescriptorIsocReservedPhase: c_uint =
1340    IOUSBBitRangePhase!(2, 6);
1341/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedendpointcompaniondescriptorsspisoccompanion?language=objc)
1342pub const kIOUSBSuperSpeedEndpointCompanionDescriptorSSPIsocCompanion: c_uint = IOUSBBit!(7);
1343
1344/// Descriptor for a SuperSpeedPlus Isochronout USB Endpoint Companion.
1345/// See the USB Specification at
1346/// <a href="http://www.usb.org" TARGET="_blank">
1347/// http://www.usb.org
1348/// </a>
1349/// .
1350/// USB 3.1 9.6.8: SuperSpeedPlus Isochronous Endpoint Companion
1351///
1352/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbsuperspeedplusisochronousendpointcompaniondescriptor?language=objc)
1353#[repr(C, packed)]
1354#[derive(Clone, Copy, Debug, PartialEq)]
1355pub struct IOUSBSuperSpeedPlusIsochronousEndpointCompanionDescriptor {
1356    pub bLength: u8,
1357    pub bDescriptorType: u8,
1358    pub wReserved: u16,
1359    pub dwBytesPerInterval: u32,
1360}
1361
1362#[cfg(feature = "objc2")]
1363unsafe impl Encode for IOUSBSuperSpeedPlusIsochronousEndpointCompanionDescriptor {
1364    const ENCODING: Encoding = Encoding::Struct(
1365        "IOUSBSuperSpeedPlusIsochronousEndpointCompanionDescriptor",
1366        &[
1367            <u8>::ENCODING,
1368            <u8>::ENCODING,
1369            <u16>::ENCODING,
1370            <u32>::ENCODING,
1371        ],
1372    );
1373}
1374
1375#[cfg(feature = "objc2")]
1376unsafe impl RefEncode for IOUSBSuperSpeedPlusIsochronousEndpointCompanionDescriptor {
1377    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1378}
1379
1380/// Descriptor for a USB hub.
1381/// See the USB Specification at
1382/// <a href="http://www.usb.org" TARGET="_blank">
1383/// http://www.usb.org
1384/// </a>
1385/// .
1386/// USB 2.0 11.23.2.1: Hub Descriptor
1387///
1388/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousb20hubdescriptor?language=objc)
1389#[repr(C, packed)]
1390#[derive(Clone, Copy, Debug, PartialEq)]
1391pub struct IOUSB20HubDescriptor {
1392    pub bLength: u8,
1393    pub bDescriptorType: u8,
1394    pub bNumberPorts: u8,
1395    pub wHubCharacteristics: u16,
1396    pub bPowerOnToPowerGood: u8,
1397    pub bHubControllerCurrent: u8,
1398    pub deviceRemovable: [u8; 2],
1399    pub reserved: [u8; 2],
1400}
1401
1402#[cfg(feature = "objc2")]
1403unsafe impl Encode for IOUSB20HubDescriptor {
1404    const ENCODING: Encoding = Encoding::Struct(
1405        "IOUSB20HubDescriptor",
1406        &[
1407            <u8>::ENCODING,
1408            <u8>::ENCODING,
1409            <u8>::ENCODING,
1410            <u16>::ENCODING,
1411            <u8>::ENCODING,
1412            <u8>::ENCODING,
1413            <[u8; 2]>::ENCODING,
1414            <[u8; 2]>::ENCODING,
1415        ],
1416    );
1417}
1418
1419#[cfg(feature = "objc2")]
1420unsafe impl RefEncode for IOUSB20HubDescriptor {
1421    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1422}
1423
1424/// Descriptor for a Super Speed USB hub.
1425/// See the USB Specification at
1426/// <a href="http://www.usb.org" TARGET="_blank">
1427/// http://www.usb.org
1428/// </a>
1429/// .
1430/// USB 3.0 10.13.2.1: SuperSpeed Hub Descriptor
1431///
1432/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbsuperspeedhubdescriptor?language=objc)
1433#[repr(C, packed)]
1434#[derive(Clone, Copy, Debug, PartialEq)]
1435pub struct IOUSBSuperSpeedHubDescriptor {
1436    pub bLength: u8,
1437    pub bDescriptorType: u8,
1438    pub bNumberPorts: u8,
1439    pub wHubCharacteristics: u16,
1440    pub bPowerOnToPowerGood: u8,
1441    pub bHubControllerCurrent: u8,
1442    pub bHubDecodeLatency: u8,
1443    pub wHubDelay: u16,
1444    pub deviceRemovable: u16,
1445}
1446
1447#[cfg(feature = "objc2")]
1448unsafe impl Encode for IOUSBSuperSpeedHubDescriptor {
1449    const ENCODING: Encoding = Encoding::Struct(
1450        "IOUSBSuperSpeedHubDescriptor",
1451        &[
1452            <u8>::ENCODING,
1453            <u8>::ENCODING,
1454            <u8>::ENCODING,
1455            <u16>::ENCODING,
1456            <u8>::ENCODING,
1457            <u8>::ENCODING,
1458            <u8>::ENCODING,
1459            <u16>::ENCODING,
1460            <u16>::ENCODING,
1461        ],
1462    );
1463}
1464
1465#[cfg(feature = "objc2")]
1466unsafe impl RefEncode for IOUSBSuperSpeedHubDescriptor {
1467    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1468}
1469
1470/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedhubcharacteristicspowerswitchingmask?language=objc)
1471pub const kIOUSBSuperSpeedHubCharacteristicsPowerSwitchingMask: c_uint = IOUSBBitRange!(0, 1);
1472/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedhubcharacteristicspowerswitchingganged?language=objc)
1473pub const kIOUSBSuperSpeedHubCharacteristicsPowerSwitchingGanged: c_uint =
1474    0 << IOUSBBitRangePhase!(0, 1);
1475/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedhubcharacteristicspowerswitchingindividual?language=objc)
1476pub const kIOUSBSuperSpeedHubCharacteristicsPowerSwitchingIndividual: c_uint =
1477    1 << IOUSBBitRangePhase!(0, 1);
1478/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedhubcharacteristicscompounddevice?language=objc)
1479pub const kIOUSBSuperSpeedHubCharacteristicsCompoundDevice: c_uint = IOUSBBit!(2);
1480/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedhubcharacteristicsovercurrentmask?language=objc)
1481pub const kIOUSBSuperSpeedHubCharacteristicsOverCurrentMask: c_uint = IOUSBBitRange!(3, 4);
1482/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedhubcharacteristicsovercurrentglobal?language=objc)
1483pub const kIOUSBSuperSpeedHubCharacteristicsOverCurrentGlobal: c_uint =
1484    0 << IOUSBBitRangePhase!(3, 4);
1485/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedhubcharacteristicsovercurrentindividual?language=objc)
1486pub const kIOUSBSuperSpeedHubCharacteristicsOverCurrentIndividual: c_uint =
1487    1 << IOUSBBitRangePhase!(3, 4);
1488/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedhubcharacteristicsreserved?language=objc)
1489pub const kIOUSBSuperSpeedHubCharacteristicsReserved: c_uint = IOUSBBitRange!(5, 15);
1490/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedhubdecodelatencymax?language=objc)
1491pub const kIOUSBSuperSpeedHubDecodeLatencyMax: c_uint = 10;
1492/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbsuperspeedhubdelaymax?language=objc)
1493pub const kIOUSBSuperSpeedHubDelayMax: c_uint = 400;
1494
1495/// Structure used to specify the Mass Storage Specific UAS pipe usage descriptor
1496///
1497/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/uaspipedescriptor?language=objc)
1498#[repr(C)]
1499#[derive(Clone, Copy, Debug, PartialEq)]
1500pub struct UASPipeDescriptor {
1501    pub bLength: u8,
1502    pub bDescriptorType: u8,
1503    pub bPipeID: u8,
1504    pub bReserved: u8,
1505}
1506
1507#[cfg(feature = "objc2")]
1508unsafe impl Encode for UASPipeDescriptor {
1509    const ENCODING: Encoding = Encoding::Struct(
1510        "UASPipeDescriptor",
1511        &[
1512            <u8>::ENCODING,
1513            <u8>::ENCODING,
1514            <u8>::ENCODING,
1515            <u8>::ENCODING,
1516        ],
1517    );
1518}
1519
1520#[cfg(feature = "objc2")]
1521unsafe impl RefEncode for UASPipeDescriptor {
1522    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1523}
1524
1525/// USB HID Descriptor.  See the USB HID Specification at
1526/// <a href="http://www.usb.org" target="_blank">
1527/// http://www.usb.org
1528/// </a>
1529/// .
1530///
1531/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbhiddescriptor?language=objc)
1532#[repr(C, packed)]
1533#[derive(Clone, Copy, Debug, PartialEq)]
1534pub struct IOUSBHIDDescriptor {
1535    pub descLen: u8,
1536    pub descType: u8,
1537    pub descVersNum: u16,
1538    pub hidCountryCode: u8,
1539    pub hidNumDescriptors: u8,
1540    pub hidDescriptorType: u8,
1541    pub hidDescriptorLengthLo: u8,
1542    pub hidDescriptorLengthHi: u8,
1543}
1544
1545#[cfg(feature = "objc2")]
1546unsafe impl Encode for IOUSBHIDDescriptor {
1547    const ENCODING: Encoding = Encoding::Struct(
1548        "IOUSBHIDDescriptor",
1549        &[
1550            <u8>::ENCODING,
1551            <u8>::ENCODING,
1552            <u16>::ENCODING,
1553            <u8>::ENCODING,
1554            <u8>::ENCODING,
1555            <u8>::ENCODING,
1556            <u8>::ENCODING,
1557            <u8>::ENCODING,
1558        ],
1559    );
1560}
1561
1562#[cfg(feature = "objc2")]
1563unsafe impl RefEncode for IOUSBHIDDescriptor {
1564    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1565}
1566
1567/// USB HID Report Descriptor header.  See the USB HID Specification at
1568/// <a href="http://www.usb.org" target="_blank">
1569/// http://www.usb.org
1570/// </a>
1571/// .
1572///
1573/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbhidreportdesc?language=objc)
1574#[repr(C)]
1575#[derive(Clone, Copy, Debug, PartialEq)]
1576pub struct IOUSBHIDReportDesc {
1577    pub hidDescriptorType: u8,
1578    pub hidDescriptorLengthLo: u8,
1579    pub hidDescriptorLengthHi: u8,
1580}
1581
1582#[cfg(feature = "objc2")]
1583unsafe impl Encode for IOUSBHIDReportDesc {
1584    const ENCODING: Encoding = Encoding::Struct(
1585        "IOUSBHIDReportDesc",
1586        &[<u8>::ENCODING, <u8>::ENCODING, <u8>::ENCODING],
1587    );
1588}
1589
1590#[cfg(feature = "objc2")]
1591unsafe impl RefEncode for IOUSBHIDReportDesc {
1592    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1593}
1594
1595/// USB Device Firmware Update Descriptor. See the USB Device Firmware Update
1596/// Specification at
1597/// <a href="http://www.usb.org" target="_blank">
1598/// http://www.usb.org
1599/// </a>
1600/// .
1601///
1602/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdfudescriptor?language=objc)
1603#[repr(C, packed)]
1604#[derive(Clone, Copy, Debug, PartialEq)]
1605pub struct IOUSBDFUDescriptor {
1606    pub bLength: u8,
1607    pub bDescriptorType: u8,
1608    pub bmAttributes: u8,
1609    pub wDetachTimeout: u16,
1610    pub wTransferSize: u16,
1611}
1612
1613#[cfg(feature = "objc2")]
1614unsafe impl Encode for IOUSBDFUDescriptor {
1615    const ENCODING: Encoding = Encoding::Struct(
1616        "IOUSBDFUDescriptor",
1617        &[
1618            <u8>::ENCODING,
1619            <u8>::ENCODING,
1620            <u8>::ENCODING,
1621            <u16>::ENCODING,
1622            <u16>::ENCODING,
1623        ],
1624    );
1625}
1626
1627#[cfg(feature = "objc2")]
1628unsafe impl RefEncode for IOUSBDFUDescriptor {
1629    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1630}
1631
1632/// Standard device request.
1633/// See the USB Specification at
1634/// <a href="http://www.usb.org" TARGET="_blank">
1635/// http://www.usb.org
1636/// </a>
1637/// .
1638/// USB 2.0 9.3: USB Device Requests
1639///
1640/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicerequest?language=objc)
1641#[repr(C, packed)]
1642#[derive(Clone, Copy, Debug, PartialEq)]
1643pub struct IOUSBDeviceRequest {
1644    pub bmRequestType: u8,
1645    pub bRequest: u8,
1646    pub wValue: u16,
1647    pub wIndex: u16,
1648    pub wLength: u16,
1649}
1650
1651#[cfg(feature = "objc2")]
1652unsafe impl Encode for IOUSBDeviceRequest {
1653    const ENCODING: Encoding = Encoding::Struct(
1654        "IOUSBDeviceRequest",
1655        &[
1656            <u8>::ENCODING,
1657            <u8>::ENCODING,
1658            <u16>::ENCODING,
1659            <u16>::ENCODING,
1660            <u16>::ENCODING,
1661        ],
1662    );
1663}
1664
1665#[cfg(feature = "objc2")]
1666unsafe impl RefEncode for IOUSBDeviceRequest {
1667    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1668}
1669
1670/// See the USB Specification at
1671/// <a href="http://www.usb.org" TARGET="_blank">
1672/// http://www.usb.org
1673/// </a>
1674/// .
1675/// USB 3.0 9.4.12: Set SEL Standard Device Request
1676///
1677/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbdevicerequestsetseldata?language=objc)
1678#[repr(C, packed)]
1679#[derive(Clone, Copy, Debug, PartialEq)]
1680pub struct IOUSBDeviceRequestSetSELData {
1681    pub u1Sel: u8,
1682    pub u1Pel: u8,
1683    pub u2Sel: u16,
1684    pub u2Pel: u16,
1685}
1686
1687#[cfg(feature = "objc2")]
1688unsafe impl Encode for IOUSBDeviceRequestSetSELData {
1689    const ENCODING: Encoding = Encoding::Struct(
1690        "IOUSBDeviceRequestSetSELData",
1691        &[
1692            <u8>::ENCODING,
1693            <u8>::ENCODING,
1694            <u16>::ENCODING,
1695            <u16>::ENCODING,
1696        ],
1697    );
1698}
1699
1700#[cfg(feature = "objc2")]
1701unsafe impl RefEncode for IOUSBDeviceRequestSetSELData {
1702    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1703}
1704
1705/// Values of 'direction' field of a device request
1706///
1707/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousbdevicerequestdirectionvalue?language=objc)
1708#[repr(transparent)]
1709#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1710pub struct tIOUSBDeviceRequestDirectionValue(pub c_uint);
1711impl tIOUSBDeviceRequestDirectionValue {
1712    #[doc(alias = "kIOUSBDeviceRequestDirectionValueOut")]
1713    pub const IOUSBDeviceRequestDirectionValueOut: Self = Self(0);
1714    #[doc(alias = "kIOUSBDeviceRequestDirectionValueIn")]
1715    pub const IOUSBDeviceRequestDirectionValueIn: Self = Self(1);
1716}
1717
1718#[cfg(feature = "objc2")]
1719unsafe impl Encode for tIOUSBDeviceRequestDirectionValue {
1720    const ENCODING: Encoding = c_uint::ENCODING;
1721}
1722
1723#[cfg(feature = "objc2")]
1724unsafe impl RefEncode for tIOUSBDeviceRequestDirectionValue {
1725    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1726}
1727
1728/// Values of 'type' field of a device request
1729///
1730/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousbdevicerequesttypevalue?language=objc)
1731#[repr(transparent)]
1732#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1733pub struct tIOUSBDeviceRequestTypeValue(pub c_uint);
1734impl tIOUSBDeviceRequestTypeValue {
1735    #[doc(alias = "kIOUSBDeviceRequestTypeValueStandard")]
1736    pub const IOUSBDeviceRequestTypeValueStandard: Self = Self(0);
1737    #[doc(alias = "kIOUSBDeviceRequestTypeValueClass")]
1738    pub const IOUSBDeviceRequestTypeValueClass: Self = Self(1);
1739    #[doc(alias = "kIOUSBDeviceRequestTypeValueVendor")]
1740    pub const IOUSBDeviceRequestTypeValueVendor: Self = Self(2);
1741}
1742
1743#[cfg(feature = "objc2")]
1744unsafe impl Encode for tIOUSBDeviceRequestTypeValue {
1745    const ENCODING: Encoding = c_uint::ENCODING;
1746}
1747
1748#[cfg(feature = "objc2")]
1749unsafe impl RefEncode for tIOUSBDeviceRequestTypeValue {
1750    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1751}
1752
1753/// Values of 'recipient' field of a device request
1754///
1755/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousbdevicerequestrecipientvalue?language=objc)
1756#[repr(transparent)]
1757#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1758pub struct tIOUSBDeviceRequestRecipientValue(pub c_uint);
1759impl tIOUSBDeviceRequestRecipientValue {
1760    #[doc(alias = "kIOUSBDeviceRequestRecipientValueDevice")]
1761    pub const IOUSBDeviceRequestRecipientValueDevice: Self = Self(0);
1762    #[doc(alias = "kIOUSBDeviceRequestRecipientValueInterface")]
1763    pub const IOUSBDeviceRequestRecipientValueInterface: Self = Self(1);
1764    #[doc(alias = "kIOUSBDeviceRequestRecipientValueEndpoint")]
1765    pub const IOUSBDeviceRequestRecipientValueEndpoint: Self = Self(2);
1766    #[doc(alias = "kIOUSBDeviceRequestRecipientValueOther")]
1767    pub const IOUSBDeviceRequestRecipientValueOther: Self = Self(3);
1768}
1769
1770#[cfg(feature = "objc2")]
1771unsafe impl Encode for tIOUSBDeviceRequestRecipientValue {
1772    const ENCODING: Encoding = c_uint::ENCODING;
1773}
1774
1775#[cfg(feature = "objc2")]
1776unsafe impl RefEncode for tIOUSBDeviceRequestRecipientValue {
1777    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1778}
1779
1780/// [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousbdevicerequest?language=objc)
1781#[repr(transparent)]
1782#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1783pub struct tIOUSBDeviceRequest(pub c_uint);
1784impl tIOUSBDeviceRequest {
1785    #[doc(alias = "kIOUSBDeviceRequestSize")]
1786    pub const IOUSBDeviceRequestSize: Self = Self(8);
1787    #[doc(alias = "kIOUSBDeviceRequestDirectionMask")]
1788    pub const IOUSBDeviceRequestDirectionMask: Self = Self(IOUSBBit!(7));
1789    #[doc(alias = "kIOUSBDeviceRequestDirectionPhase")]
1790    pub const IOUSBDeviceRequestDirectionPhase: Self = Self(IOUSBBitRangePhase!(7, 7));
1791    #[doc(alias = "kIOUSBDeviceRequestDirectionOut")]
1792    pub const IOUSBDeviceRequestDirectionOut: Self = Self(
1793        tIOUSBDeviceRequestDirectionValue::IOUSBDeviceRequestDirectionValueOut.0
1794            << tIOUSBDeviceRequest::IOUSBDeviceRequestDirectionPhase.0,
1795    );
1796    #[doc(alias = "kIOUSBDeviceRequestDirectionIn")]
1797    pub const IOUSBDeviceRequestDirectionIn: Self = Self(
1798        tIOUSBDeviceRequestDirectionValue::IOUSBDeviceRequestDirectionValueIn.0
1799            << tIOUSBDeviceRequest::IOUSBDeviceRequestDirectionPhase.0,
1800    );
1801    #[doc(alias = "kIOUSBDeviceRequestTypeMask")]
1802    pub const IOUSBDeviceRequestTypeMask: Self = Self(IOUSBBitRange!(5, 6));
1803    #[doc(alias = "kIOUSBDeviceRequestTypePhase")]
1804    pub const IOUSBDeviceRequestTypePhase: Self = Self(IOUSBBitRangePhase!(5, 6));
1805    #[doc(alias = "kIOUSBDeviceRequestTypeStandard")]
1806    pub const IOUSBDeviceRequestTypeStandard: Self = Self(
1807        tIOUSBDeviceRequestTypeValue::IOUSBDeviceRequestTypeValueStandard.0
1808            << tIOUSBDeviceRequest::IOUSBDeviceRequestTypePhase.0,
1809    );
1810    #[doc(alias = "kIOUSBDeviceRequestTypeClass")]
1811    pub const IOUSBDeviceRequestTypeClass: Self = Self(
1812        tIOUSBDeviceRequestTypeValue::IOUSBDeviceRequestTypeValueClass.0
1813            << tIOUSBDeviceRequest::IOUSBDeviceRequestTypePhase.0,
1814    );
1815    #[doc(alias = "kIOUSBDeviceRequestTypeVendor")]
1816    pub const IOUSBDeviceRequestTypeVendor: Self = Self(
1817        tIOUSBDeviceRequestTypeValue::IOUSBDeviceRequestTypeValueVendor.0
1818            << tIOUSBDeviceRequest::IOUSBDeviceRequestTypePhase.0,
1819    );
1820    #[doc(alias = "kIOUSBDeviceRequestRecipientMask")]
1821    pub const IOUSBDeviceRequestRecipientMask: Self = Self(IOUSBBitRange!(0, 4));
1822    #[doc(alias = "kIOUSBDeviceRequestRecipientPhase")]
1823    pub const IOUSBDeviceRequestRecipientPhase: Self = Self(IOUSBBitRangePhase!(0, 4));
1824    #[doc(alias = "kIOUSBDeviceRequestRecipientDevice")]
1825    pub const IOUSBDeviceRequestRecipientDevice: Self = Self(
1826        tIOUSBDeviceRequestRecipientValue::IOUSBDeviceRequestRecipientValueDevice.0
1827            << tIOUSBDeviceRequest::IOUSBDeviceRequestRecipientPhase.0,
1828    );
1829    #[doc(alias = "kIOUSBDeviceRequestRecipientInterface")]
1830    pub const IOUSBDeviceRequestRecipientInterface: Self = Self(
1831        tIOUSBDeviceRequestRecipientValue::IOUSBDeviceRequestRecipientValueInterface.0
1832            << tIOUSBDeviceRequest::IOUSBDeviceRequestRecipientPhase.0,
1833    );
1834    #[doc(alias = "kIOUSBDeviceRequestRecipientEndpoint")]
1835    pub const IOUSBDeviceRequestRecipientEndpoint: Self = Self(
1836        tIOUSBDeviceRequestRecipientValue::IOUSBDeviceRequestRecipientValueEndpoint.0
1837            << tIOUSBDeviceRequest::IOUSBDeviceRequestRecipientPhase.0,
1838    );
1839    #[doc(alias = "kIOUSBDeviceRequestRecipientOther")]
1840    pub const IOUSBDeviceRequestRecipientOther: Self = Self(
1841        tIOUSBDeviceRequestRecipientValue::IOUSBDeviceRequestRecipientValueOther.0
1842            << tIOUSBDeviceRequest::IOUSBDeviceRequestRecipientPhase.0,
1843    );
1844}
1845
1846#[cfg(feature = "objc2")]
1847unsafe impl Encode for tIOUSBDeviceRequest {
1848    const ENCODING: Encoding = c_uint::ENCODING;
1849}
1850
1851#[cfg(feature = "objc2")]
1852unsafe impl RefEncode for tIOUSBDeviceRequest {
1853    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1854}
1855
1856/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicerequestgetstatus?language=objc)
1857pub const kIOUSBDeviceRequestGetStatus: c_uint = 0;
1858/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicerequestclearfeature?language=objc)
1859pub const kIOUSBDeviceRequestClearFeature: c_uint = 1;
1860/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicerequestgetstate?language=objc)
1861pub const kIOUSBDeviceRequestGetState: c_uint = 2;
1862/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicerequestsetfeature?language=objc)
1863pub const kIOUSBDeviceRequestSetFeature: c_uint = 3;
1864/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicerequestsetaddress?language=objc)
1865pub const kIOUSBDeviceRequestSetAddress: c_uint = 5;
1866/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicerequestgetdescriptor?language=objc)
1867pub const kIOUSBDeviceRequestGetDescriptor: c_uint = 6;
1868/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicerequestsetdescriptor?language=objc)
1869pub const kIOUSBDeviceRequestSetDescriptor: c_uint = 7;
1870/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicerequestgetconfiguration?language=objc)
1871pub const kIOUSBDeviceRequestGetConfiguration: c_uint = 8;
1872/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicerequestsetconfiguration?language=objc)
1873pub const kIOUSBDeviceRequestSetConfiguration: c_uint = 9;
1874/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicerequestgetinterface?language=objc)
1875pub const kIOUSBDeviceRequestGetInterface: c_uint = 10;
1876/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicerequestsetinterface?language=objc)
1877pub const kIOUSBDeviceRequestSetInterface: c_uint = 11;
1878/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicerequestsynchframe?language=objc)
1879pub const kIOUSBDeviceRequestSynchFrame: c_uint = 12;
1880/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicerequestsetsel?language=objc)
1881pub const kIOUSBDeviceRequestSetSel: c_uint = 48;
1882/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicerequestsetisochronousdelay?language=objc)
1883pub const kIOUSBDeviceRequestSetIsochronousDelay: c_uint = 49;
1884
1885/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicestatusselfpowered?language=objc)
1886pub const kIOUSBDeviceStatusSelfPowered: c_uint = IOUSBBit!(0);
1887/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicestatusremotewakeenable?language=objc)
1888pub const kIOUSBDeviceStatusRemoteWakeEnable: c_uint = IOUSBBit!(1);
1889/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicestatusu1enable?language=objc)
1890pub const kIOUSBDeviceStatusU1Enable: c_uint = IOUSBBit!(2);
1891/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicestatusu2enable?language=objc)
1892pub const kIOUSBDeviceStatusU2Enable: c_uint = IOUSBBit!(3);
1893/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicestatusltmenable?language=objc)
1894pub const kIOUSBDeviceStatusLTMEnable: c_uint = IOUSBBit!(4);
1895/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbinterfacestatusremotewakecapable?language=objc)
1896pub const kIOUSBInterfaceStatusRemoteWakeCapable: c_uint = IOUSBBit!(0);
1897/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbinterfacestatusremotewakeenable?language=objc)
1898pub const kIOUSBInterfaceStatusRemoteWakeEnable: c_uint = IOUSBBit!(1);
1899/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbendpointstatushalt?language=objc)
1900pub const IOUSBEndpointStatusHalt: c_uint = IOUSBBit!(0);
1901
1902/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicefeatureselectorremotewakeup?language=objc)
1903pub const kIOUSBDeviceFeatureSelectorRemoteWakeup: c_uint = 1;
1904/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicefeatureselectortestmode?language=objc)
1905pub const kIOUSBDeviceFeatureSelectorTestMode: c_uint = 2;
1906/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicefeatureselectoru1enable?language=objc)
1907pub const kIOUSBDeviceFeatureSelectorU1Enable: c_uint = 48;
1908/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicefeatureselectoru2enable?language=objc)
1909pub const kIOUSBDeviceFeatureSelectorU2Enable: c_uint = 49;
1910/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbdevicefeatureselectorltmenable?language=objc)
1911pub const kIOUSBDeviceFeatureSelectorLTMEnable: c_uint = 50;
1912/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbinterfacefeatureselectorsuspend?language=objc)
1913pub const kIOUSBInterfaceFeatureSelectorSuspend: c_uint = 0;
1914/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iousbendpointfeatureselectorstall?language=objc)
1915pub const IOUSBEndpointFeatureSelectorStall: c_uint = 0;
1916
1917/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbinterfacesuspendlowpower?language=objc)
1918pub const kIOUSBInterfaceSuspendLowPower: c_uint = IOUSBBit!(0);
1919/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbinterfacesuspendremotewakeenable?language=objc)
1920pub const kIOUSBInterfaceSuspendRemoteWakeEnable: c_uint = IOUSBBit!(1);
1921
1922/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbhubport2portexitlatencyns?language=objc)
1923pub const kIOUSBHubPort2PortExitLatencyNs: c_uint = 1000;
1924/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbhubdelayns?language=objc)
1925pub const kIOUSBHubDelayNs: c_uint = 400;
1926
1927/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousbpingresponsetimens?language=objc)
1928pub const kIOUSBPingResponseTimeNs: c_uint = 400;
1929
1930/// [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousbbusvoltage?language=objc)
1931#[repr(transparent)]
1932#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1933pub struct tIOUSBBusVoltage(pub c_uint);
1934impl tIOUSBBusVoltage {
1935    #[doc(alias = "kIOUSBBusVoltageDefault")]
1936    pub const IOUSBBusVoltageDefault: Self = Self(5);
1937}
1938
1939#[cfg(feature = "objc2")]
1940unsafe impl Encode for tIOUSBBusVoltage {
1941    const ENCODING: Encoding = c_uint::ENCODING;
1942}
1943
1944#[cfg(feature = "objc2")]
1945unsafe impl RefEncode for tIOUSBBusVoltage {
1946    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1947}
1948
1949/// [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousb20buscurrent?language=objc)
1950#[repr(transparent)]
1951#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1952pub struct tIOUSB20BusCurrent(pub c_uint);
1953impl tIOUSB20BusCurrent {
1954    #[doc(alias = "kIOUSB20BusCurrentMinimum")]
1955    pub const IOUSB20BusCurrentMinimum: Self = Self(100);
1956    #[doc(alias = "kIOUSB20BusCurrentDefault")]
1957    pub const IOUSB20BusCurrentDefault: Self = Self(500);
1958    #[doc(alias = "kIOUSB20BusCurrentMaxPowerUnits")]
1959    pub const IOUSB20BusCurrentMaxPowerUnits: Self = Self(2);
1960}
1961
1962#[cfg(feature = "objc2")]
1963unsafe impl Encode for tIOUSB20BusCurrent {
1964    const ENCODING: Encoding = c_uint::ENCODING;
1965}
1966
1967#[cfg(feature = "objc2")]
1968unsafe impl RefEncode for tIOUSB20BusCurrent {
1969    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1970}
1971
1972/// [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousb30buscurrent?language=objc)
1973#[repr(transparent)]
1974#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1975pub struct tIOUSB30BusCurrent(pub c_uint);
1976impl tIOUSB30BusCurrent {
1977    #[doc(alias = "kIOUSB30BusCurrentMinimum")]
1978    pub const IOUSB30BusCurrentMinimum: Self = Self(150);
1979    #[doc(alias = "kIOUSB30BusCurrentDefault")]
1980    pub const IOUSB30BusCurrentDefault: Self = Self(900);
1981    #[doc(alias = "kIOUSB30BusCurrentMaxPowerUnits")]
1982    pub const IOUSB30BusCurrentMaxPowerUnits: Self = Self(8);
1983}
1984
1985#[cfg(feature = "objc2")]
1986unsafe impl Encode for tIOUSB30BusCurrent {
1987    const ENCODING: Encoding = c_uint::ENCODING;
1988}
1989
1990#[cfg(feature = "objc2")]
1991unsafe impl RefEncode for tIOUSB30BusCurrent {
1992    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1993}
1994
1995/// [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousbtopology?language=objc)
1996#[repr(transparent)]
1997#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1998pub struct tIOUSBTopology(pub c_uint);
1999impl tIOUSBTopology {
2000    #[doc(alias = "kIOUSBTopologyHost")]
2001    pub const IOUSBTopologyHost: Self = Self(1);
2002    #[doc(alias = "kIOUSBTopologyRootPort")]
2003    pub const IOUSBTopologyRootPort: Self = Self(2);
2004    #[doc(alias = "kIOUSBTopology1Hub")]
2005    pub const IOUSBTopology1Hub: Self = Self(3);
2006    #[doc(alias = "kIOUSBTopology2Hub")]
2007    pub const IOUSBTopology2Hub: Self = Self(4);
2008    #[doc(alias = "kIOUSBTopology3Hub")]
2009    pub const IOUSBTopology3Hub: Self = Self(5);
2010    #[doc(alias = "kIOUSBTopology4Hub")]
2011    pub const IOUSBTopology4Hub: Self = Self(6);
2012    #[doc(alias = "kIOUSBTopology5Hub")]
2013    pub const IOUSBTopology5Hub: Self = Self(7);
2014    #[doc(alias = "kIOUSBTopologyTierLimit")]
2015    pub const IOUSBTopologyTierLimit: Self = Self(tIOUSBTopology::IOUSBTopology5Hub.0);
2016}
2017
2018#[cfg(feature = "objc2")]
2019unsafe impl Encode for tIOUSBTopology {
2020    const ENCODING: Encoding = c_uint::ENCODING;
2021}
2022
2023#[cfg(feature = "objc2")]
2024unsafe impl RefEncode for tIOUSBTopology {
2025    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2026}
2027
2028/// [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousb30resettimeout?language=objc)
2029#[repr(transparent)]
2030#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2031pub struct tIOUSB30ResetTimeout(pub c_uint);
2032impl tIOUSB30ResetTimeout {
2033    #[doc(alias = "kIOUSB30ResetMinimumTimeout")]
2034    pub const IOUSB30ResetMinimumTimeout: Self = Self(80);
2035    #[doc(alias = "kIOUSB30ResetTypicalTimeout")]
2036    pub const IOUSB30ResetTypicalTimeout: Self = Self(100);
2037    #[doc(alias = "kIOUSB30ResetMaximumTimeout")]
2038    pub const IOUSB30ResetMaximumTimeout: Self = Self(120);
2039    #[doc(alias = "kIOUSB30ResetMaximumWithMarginTimeout")]
2040    pub const IOUSB30ResetMaximumWithMarginTimeout: Self = Self(150);
2041}
2042
2043#[cfg(feature = "objc2")]
2044unsafe impl Encode for tIOUSB30ResetTimeout {
2045    const ENCODING: Encoding = c_uint::ENCODING;
2046}
2047
2048#[cfg(feature = "objc2")]
2049unsafe impl RefEncode for tIOUSB30ResetTimeout {
2050    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2051}
2052
2053/// [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousb30linkstatetimeout?language=objc)
2054#[repr(transparent)]
2055#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2056pub struct tIOUSB30LinkStateTimeout(pub c_uint);
2057impl tIOUSB30LinkStateTimeout {
2058    #[doc(alias = "kIOUSB30LinkStateSSInactiveQuietTimeout")]
2059    pub const IOUSB30LinkStateSSInactiveQuietTimeout: Self = Self(12);
2060    #[doc(alias = "kIOUSB30LinkStateRxDetectQuietTimeout")]
2061    pub const IOUSB30LinkStateRxDetectQuietTimeout: Self = Self(12);
2062    #[doc(alias = "kIOUSB30LinkStatePollingLFPSTimeout")]
2063    pub const IOUSB30LinkStatePollingLFPSTimeout: Self = Self(360);
2064    #[doc(alias = "kIOUSB30LinkStatePollingActiveTimeout")]
2065    pub const IOUSB30LinkStatePollingActiveTimeout: Self = Self(12);
2066    #[doc(alias = "kIOUSB30LinkStatePollingConfigurationTimeout")]
2067    pub const IOUSB30LinkStatePollingConfigurationTimeout: Self = Self(12);
2068    #[doc(alias = "kIOUSB30LinkStatePollingIdleTimeout")]
2069    pub const IOUSB30LinkStatePollingIdleTimeout: Self = Self(2);
2070    #[doc(alias = "kIOUSB30LinkStateU0RecoveryTimeout")]
2071    pub const IOUSB30LinkStateU0RecoveryTimeout: Self = Self(1);
2072    #[doc(alias = "kIOUSB30LinkStateU0LTimeout")]
2073    pub const IOUSB30LinkStateU0LTimeout: Self = Self(0);
2074    #[doc(alias = "kIOUSB30LinkStateU1NoLFPSResponseTimeout")]
2075    pub const IOUSB30LinkStateU1NoLFPSResponseTimeout: Self = Self(2);
2076    #[doc(alias = "kIOUSB30LinkStateU1PingTimeout")]
2077    pub const IOUSB30LinkStateU1PingTimeout: Self = Self(300);
2078    #[doc(alias = "kIOUSB30LinkStateU2NoLFPSResponseTimeout")]
2079    pub const IOUSB30LinkStateU2NoLFPSResponseTimeout: Self = Self(2);
2080    #[doc(alias = "kIOUSB30LinKStateU2RxDetectDelay")]
2081    pub const IOUSB30LinKStateU2RxDetectDelay: Self = Self(100);
2082    #[doc(alias = "kIOUSB30LinkStateU3NoLFPSResponseTimeout")]
2083    pub const IOUSB30LinkStateU3NoLFPSResponseTimeout: Self = Self(10);
2084    #[doc(alias = "kIOUSB30LinkStateU3WakeupRetryDelay")]
2085    pub const IOUSB30LinkStateU3WakeupRetryDelay: Self = Self(100);
2086    #[doc(alias = "kIOUSB30LinkStateU3RxDetectDelay")]
2087    pub const IOUSB30LinkStateU3RxDetectDelay: Self = Self(100);
2088    #[doc(alias = "kIOUSB30LinkStateRecoveryActiveTimeout")]
2089    pub const IOUSB30LinkStateRecoveryActiveTimeout: Self = Self(12);
2090    #[doc(alias = "kIOUSB30LinkStateRecoveryConfigurationTimeout")]
2091    pub const IOUSB30LinkStateRecoveryConfigurationTimeout: Self = Self(6);
2092    #[doc(alias = "kIOUSB30LinkStateRecoveryIdleTimeout")]
2093    pub const IOUSB30LinkStateRecoveryIdleTimeout: Self = Self(2);
2094    #[doc(alias = "kIOUSB30LinkStateLoopbackExitTimeout")]
2095    pub const IOUSB30LinkStateLoopbackExitTimeout: Self = Self(2);
2096    #[doc(alias = "kIOUSB30LinkStateHotResetActiveTimeout")]
2097    pub const IOUSB30LinkStateHotResetActiveTimeout: Self = Self(12);
2098    #[doc(alias = "kIOUSB30LinkStateHotResetExitTimeout")]
2099    pub const IOUSB30LinkStateHotResetExitTimeout: Self = Self(2);
2100    #[doc(alias = "kIOUSB30LinkStatePollingDeadline")]
2101    pub const IOUSB30LinkStatePollingDeadline: Self = Self(
2102        tIOUSB30LinkStateTimeout::IOUSB30LinkStatePollingLFPSTimeout.0
2103            + 1
2104            + tIOUSB30LinkStateTimeout::IOUSB30LinkStatePollingActiveTimeout.0
2105            + tIOUSB30LinkStateTimeout::IOUSB30LinkStatePollingConfigurationTimeout.0
2106            + tIOUSB30LinkStateTimeout::IOUSB30LinkStatePollingIdleTimeout.0,
2107    );
2108    #[doc(alias = "kIOUSB30LinkStateSSResumeDeadline")]
2109    pub const IOUSB30LinkStateSSResumeDeadline: Self = Self(
2110        tIOUSB30LinkStateTimeout::IOUSB30LinkStateU3WakeupRetryDelay.0/* accomodation for retimer */+tIOUSB30LinkStateTimeout::IOUSB30LinkStateU3NoLFPSResponseTimeout.0+tIOUSB30LinkStateTimeout::IOUSB30LinkStateRecoveryActiveTimeout.0+tIOUSB30LinkStateTimeout::IOUSB30LinkStateRecoveryConfigurationTimeout.0+tIOUSB30LinkStateTimeout::IOUSB30LinkStateRecoveryIdleTimeout.0,
2111    );
2112    #[doc(alias = "kIOUSB30LinkStateRecoveryDeadline")]
2113    pub const IOUSB30LinkStateRecoveryDeadline: Self = Self(
2114        tIOUSB30LinkStateTimeout::IOUSB30LinkStateRecoveryActiveTimeout.0
2115            + tIOUSB30LinkStateTimeout::IOUSB30LinkStateRecoveryConfigurationTimeout.0
2116            + tIOUSB30LinkStateTimeout::IOUSB30LinkStateRecoveryIdleTimeout.0
2117            + 1, /* margin */
2118    );
2119    #[doc(alias = "kIOUSB30LinkStateHotResetDeadline")]
2120    pub const IOUSB30LinkStateHotResetDeadline: Self = Self(
2121        tIOUSB30LinkStateTimeout::IOUSB30LinkStateHotResetActiveTimeout.0
2122            + tIOUSB30LinkStateTimeout::IOUSB30LinkStateHotResetExitTimeout.0
2123            + 1,
2124    );
2125}
2126
2127#[cfg(feature = "objc2")]
2128unsafe impl Encode for tIOUSB30LinkStateTimeout {
2129    const ENCODING: Encoding = c_uint::ENCODING;
2130}
2131
2132#[cfg(feature = "objc2")]
2133unsafe impl RefEncode for tIOUSB30LinkStateTimeout {
2134    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2135}
2136
2137/// [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousb30devicenotificationtype?language=objc)
2138#[repr(transparent)]
2139#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2140pub struct tIOUSB30DeviceNotificationType(pub c_uint);
2141impl tIOUSB30DeviceNotificationType {
2142    #[doc(alias = "kIOUSB30DeviceNotificationTypeFunctionWake")]
2143    pub const IOUSB30DeviceNotificationTypeFunctionWake: Self = Self(1);
2144    #[doc(alias = "kIOUSB30DeviceNotificationTypeLatencyTolerance")]
2145    pub const IOUSB30DeviceNotificationTypeLatencyTolerance: Self = Self(2);
2146    #[doc(alias = "kIOUSB30DeviceNotificationTypeBusIntervalAdjustment")]
2147    pub const IOUSB30DeviceNotificationTypeBusIntervalAdjustment: Self = Self(3);
2148    #[doc(alias = "kIOUSB30DeviceNotificationTypeHostRoleRequest")]
2149    pub const IOUSB30DeviceNotificationTypeHostRoleRequest: Self = Self(4);
2150    #[doc(alias = "kIOUSB30DeviceNotificationTypeSublinkSpeed")]
2151    pub const IOUSB30DeviceNotificationTypeSublinkSpeed: Self = Self(5);
2152}
2153
2154#[cfg(feature = "objc2")]
2155unsafe impl Encode for tIOUSB30DeviceNotificationType {
2156    const ENCODING: Encoding = c_uint::ENCODING;
2157}
2158
2159#[cfg(feature = "objc2")]
2160unsafe impl RefEncode for tIOUSB30DeviceNotificationType {
2161    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2162}
2163
2164/// [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousb30timingparameters?language=objc)
2165#[repr(transparent)]
2166#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2167pub struct tIOUSB30TimingParameters(pub c_uint);
2168impl tIOUSB30TimingParameters {
2169    #[doc(alias = "kIOUSB30TimingParameterBELTDefaultNs")]
2170    pub const IOUSB30TimingParameterBELTDefaultNs: Self = Self(1 * 1000 * 1000);
2171    #[doc(alias = "kIOUSB30TimingParameterBELTMinNs")]
2172    pub const IOUSB30TimingParameterBELTMinNs: Self = Self(125 * 1000);
2173}
2174
2175#[cfg(feature = "objc2")]
2176unsafe impl Encode for tIOUSB30TimingParameters {
2177    const ENCODING: Encoding = c_uint::ENCODING;
2178}
2179
2180#[cfg(feature = "objc2")]
2181unsafe impl RefEncode for tIOUSB30TimingParameters {
2182    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2183}
2184
2185/// [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousb30hubportstatuscode?language=objc)
2186#[repr(transparent)]
2187#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2188pub struct tIOUSB30HubPortStatusCode(pub c_uint);
2189impl tIOUSB30HubPortStatusCode {
2190    #[doc(alias = "kIOUSB30HubPortStatusCodeStandard")]
2191    pub const IOUSB30HubPortStatusCodeStandard: Self = Self(0);
2192    #[doc(alias = "kIOUSB30HubPortStatusCodePD")]
2193    pub const IOUSB30HubPortStatusCodePD: Self = Self(1);
2194    #[doc(alias = "kIOUSB30HubPortStatusCodeExt")]
2195    pub const IOUSB30HubPortStatusCodeExt: Self = Self(2);
2196    #[doc(alias = "kIOUSB30HubPortStatusCodeCount")]
2197    pub const IOUSB30HubPortStatusCodeCount: Self = Self(3);
2198}
2199
2200#[cfg(feature = "objc2")]
2201unsafe impl Encode for tIOUSB30HubPortStatusCode {
2202    const ENCODING: Encoding = c_uint::ENCODING;
2203}
2204
2205#[cfg(feature = "objc2")]
2206unsafe impl RefEncode for tIOUSB30HubPortStatusCode {
2207    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2208}
2209
2210/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiousb30retimerdepthlimit?language=objc)
2211pub const kIOUSB30RetimerDepthLimit: c_uint = 4;
2212
2213/// See the USB Specification at
2214/// <a href="http://www.usb.org" TARGET="_blank">
2215/// http://www.usb.org
2216/// </a>
2217/// .
2218/// USB 3.1 10.16.2.6 Get Port Status
2219///
2220/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iousb30hubportstatusext?language=objc)
2221#[repr(C, packed)]
2222#[derive(Clone, Copy, Debug, PartialEq)]
2223pub struct IOUSB30HubPortStatusExt {
2224    pub wPortStatus: u16,
2225    pub wPortChange: u16,
2226    pub dwExtPortStatus: u32,
2227}
2228
2229#[cfg(feature = "objc2")]
2230unsafe impl Encode for IOUSB30HubPortStatusExt {
2231    const ENCODING: Encoding = Encoding::Struct(
2232        "IOUSB30HubPortStatusExt",
2233        &[<u16>::ENCODING, <u16>::ENCODING, <u32>::ENCODING],
2234    );
2235}
2236
2237#[cfg(feature = "objc2")]
2238unsafe impl RefEncode for IOUSB30HubPortStatusExt {
2239    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2240}
2241
2242/// [Apple's documentation](https://developer.apple.com/documentation/iokit/tiousb30hubextstatus?language=objc)
2243#[repr(transparent)]
2244#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2245pub struct tIOUSB30HubExtStatus(pub c_uint);
2246impl tIOUSB30HubExtStatus {
2247    #[doc(alias = "kIOUSB30HubExtStatusRxSublinkSpeedID")]
2248    pub const IOUSB30HubExtStatusRxSublinkSpeedID: Self = Self(IOUSBBitRange!(0, 3));
2249    #[doc(alias = "kIOUSB30HubExtStatusRxSublinkSpeedIDPhase")]
2250    pub const IOUSB30HubExtStatusRxSublinkSpeedIDPhase: Self = Self(IOUSBBitRangePhase!(0, 3));
2251    #[doc(alias = "kIOUSB30HubExtStatusTxSublinkSpeedID")]
2252    pub const IOUSB30HubExtStatusTxSublinkSpeedID: Self = Self(IOUSBBitRange!(4, 7));
2253    #[doc(alias = "kIOUSB30HubExtStatusTxSublinkSpeedIDPhase")]
2254    pub const IOUSB30HubExtStatusTxSublinkSpeedIDPhase: Self = Self(IOUSBBitRangePhase!(4, 7));
2255    #[doc(alias = "kIOUSB30HubExtStatusRxLaneCount")]
2256    pub const IOUSB30HubExtStatusRxLaneCount: Self = Self(IOUSBBitRange!(8, 11));
2257    #[doc(alias = "kIOUSB30HubExtStatusRxLaneCountPhase")]
2258    pub const IOUSB30HubExtStatusRxLaneCountPhase: Self = Self(IOUSBBitRangePhase!(8, 11));
2259    #[doc(alias = "kIOUSB30HubExtStatusTxLaneCount")]
2260    pub const IOUSB30HubExtStatusTxLaneCount: Self = Self(IOUSBBitRange!(12, 15));
2261    #[doc(alias = "kIOUSB30HubExtStatusTxLaneCountPhase")]
2262    pub const IOUSB30HubExtStatusTxLaneCountPhase: Self = Self(IOUSBBitRangePhase!(12, 15));
2263}
2264
2265#[cfg(feature = "objc2")]
2266unsafe impl Encode for tIOUSB30HubExtStatus {
2267    const ENCODING: Encoding = c_uint::ENCODING;
2268}
2269
2270#[cfg(feature = "objc2")]
2271unsafe impl RefEncode for tIOUSB30HubExtStatus {
2272    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2273}