USB Libraries Help > USB Host Libraries > USB Host Layer Library > Library Interface > a) Functions > USB_HOST_DeviceSpeedGet Function
MPLAB Harmony USB Stack
USB_HOST_DeviceSpeedGet Function

This function returns the speed at which this device is operating.

C
USB_HOST_RESULT USB_HOST_DeviceSpeedGet(
    USB_HOST_DEVICE_OBJ_HANDLE deviceHandle, 
    USB_SPEED * speed
);
Preconditions

The USB_HOST_Initialize() function should have been called.

Parameters
Parameters 
Description 
deviceObjHandle 
handle to the device whose speed is required.
 
speed 
output parameter. Will contain the speed of the device if the function was successful. 
Returns

USB_HOST_RESULT_SUCCESS - The function was successful. speed will contain the speed of the device. USB_HOST_RESULT_DEVICE_UNKNOWN - The device does not exist in the system. speed will contain USB_SPEED_ERROR. USB_HOST_RESULT_FAILURE - an unknown error occurred.

Remarks

None.

Example