Contents

IOUSBGetNextDescriptor

Gets the next descriptor in a configuration descriptor.

Declaration

const IOUSBDescriptorHeader *IOUSBGetNextDescriptor(const IOUSBConfigurationDescriptor *configurationDescriptor, const IOUSBDescriptorHeader *currentDescriptor);

Parameters

  • configurationDescriptor:

    The configuration descriptor that contains the descriptors to iterate through.

  • currentDescriptor:

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

Return Value

The descriptor pointer, or NULL if no descriptor can be returned.

Discussion

This method advances the current descriptor by its length, and validates that the new descriptor fits within the bounds of the configuration descriptor. Passing NULL for the currentDescriptor argument returns the first descriptor after the configuration descriptor.

See Also

Configuration Descriptors