Contents

CopyConfigurationDescriptorWithValue

Returns the configuration descriptor with the specified configuration value.

Declaration

virtual const IOUSBConfigurationDescriptor * CopyConfigurationDescriptorWithValue(uint8_t bConfigurationValue);

Parameters

Return Value

A pointer to the configuration descriptor if found, or NULL if the device isn’t configured. It’s your responsibility to free the returned descriptor.

Discussion

This method searches the descriptor cache for the specified descriptor. If the descriptor isn’t in the cache, the method retrieves it from the device using a GET_DESCRIPTOR control request (USB 2.0, section 9.4.3) and adds it to the cache. When making a GET_DESCRIPTOR control request, this method acquires the service’s workloop lock and may call commandSleep.

See Also

Getting the Device Descriptors