Contents

IOUSBGetNextDescriptorWithType(_:_:_:)

Obtains the next descriptor in a configuration descriptor that matches the type.

Declaration

func IOUSBGetNextDescriptorWithType(_ configurationDescriptor: UnsafePointer<IOUSBConfigurationDescriptor>!, _ currentDescriptor: UnsafePointer<IOUSBDescriptorHeader>!, _ type: UInt8) -> UnsafePointer<IOUSBDescriptorHeader>!

Parameters

  • configurationDescriptor:

    A configuration descriptor that contains the descriptors to iterate through.

  • currentDescriptor:

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

  • type:

    The descriptor type to find.

Return Value

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

Discussion

This method uses IOUSBGetNextDescriptor(_:_:), and further validates that the returned descriptor’s bDescriptorType field matches the type parameter.

See Also

Configuration Descriptor Parsing