Contents

IOUSBGetNextAssociatedDescriptor(_:_:_:)

Obtains the next associated descriptor in a configuration descriptor.

Declaration

func IOUSBGetNextAssociatedDescriptor(_ configurationDescriptor: UnsafePointer<IOUSBConfigurationDescriptor>!, _ parentDescriptor: UnsafePointer<IOUSBDescriptorHeader>!, _ currentDescriptor: UnsafePointer<IOUSBDescriptorHeader>!) -> UnsafePointer<IOUSBDescriptorHeader>!

Parameters

  • configurationDescriptor:

    A configuration descriptor that contains the descriptors to iterate through.

  • parentDescriptor:

    A descriptor pointer within the bounds of configurationDescriptor.

  • currentDescriptor:

    A descriptor pointer within the bounds of configurationDescriptor, or nil.

Return Value

A descriptor pointer, or nil if no matching descriptor returns.

Discussion

This method uses IOUSBGetNextDescriptor(_:_:), but returns nil if it finds another descriptor with a bDescriptorType field that matches the value for parentDescriptor’s bDescriptorType. Use nil for currentDescriptor to return the first descriptor after parentDescriptor.

See Also

Configuration Descriptor Parsing