2.2.4.18 USB_DEVICE_ActiveConfigurationGet Function

C

uint8_t USB_DEVICE_ActiveConfigurationGet(
    USB_DEVICE_HANDLE usbDeviceHandle
);

Summary

This function returns the current active USB device configuration.

Precondition

The USB Device Layer must have been initialized and opened before calling this function.

Parameters

Parameters Description
usbDeviceHandle Pointer to the Device Layer Handle that is returned from USB_DEVICE_Open

Returns

Present active configuration.

Example

// This code example shows how the
// USB_DEVICE_ActiveConfigurationGet function can be called to obtain
// the configuration that has been set by the host. Note that this
// information is also available in the macro USB_DEVICE_EVENT_CONFIGURED.

uint8_t currentConfiguration;
USB_DEVICE_HANDLE usbDeviceHandle;

currentConfiguration = USB_DEVICE_ActiveConfigurationGet(usbDeviceHandle);

Remarks

None.