IOUSBGetNextDescriptorWithType

Function IOUSBGetNextDescriptorWithType 

Source
pub unsafe extern "C-unwind" fn IOUSBGetNextDescriptorWithType(
    configuration_descriptor: *const IOUSBConfigurationDescriptor,
    current_descriptor: *const IOUSBDescriptorHeader,
    type: u8,
) -> *const IOUSBDescriptorHeader
Available on crate features AppleUSBDescriptorParsing and objc2-io-kit only.
Expand description

Find the next descriptor matching a given type within a configuration descriptor

This method uses getNextDescriptor, and further validates that the returned descriptor’s bDescriptorType field matches the type parameter.

Parameter configurationDescriptor: Configuration descriptor that contains the descriptors to iterate through

Parameter currentDescriptor: A descriptor pointer within the bounds of configurationDescriptor, or NULL

Parameter type: tDescriptorType representing the descriptor type to find

Returns: Descriptor pointer, or NULL if no matching descriptor can be found

§Safety

  • configuration_descriptor must be a valid pointer.
  • current_descriptor must be a valid pointer.