IOUSBGetNextCapabilityDescriptor(_:_:)
Obtains the next device capability descriptor in a BOS descriptor.
Declaration
func IOUSBGetNextCapabilityDescriptor(_ bosDescriptor: UnsafePointer<IOUSBBOSDescriptor>!, _ currentDescriptor: UnsafePointer<IOUSBDeviceCapabilityDescriptorHeader>!) -> UnsafePointer<IOUSBDeviceCapabilityDescriptorHeader>!Parameters
- bosDescriptor:
A BOS descriptor that contains the descriptors to iterate through.
- currentDescriptor:
A descriptor pointer within the bounds of
configurationDescriptor, ornil.
Return Value
A device capability descriptor pointer, or nil if no descriptor returns.
Discussion
This method advances the current descriptor by its length, and validates that the new descriptor fits within the bounds of bosDescriptor. Use nil for currentDescriptor to return the first descriptor after the BOS descriptor.