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

This routine provides the current status of the USB Host Layer.

C
SYS_STATUS USB_HOST_Status(
    SYS_MODULE_OBJ hostLayerObject
);
Preconditions

Function USB_HOST_Initialize should have been called before calling this function.

Parameters
Parameters 
Description 
object 
USB Host Layer object handle, returned from the USB_HOST_Initialize routine 
Returns

SYS_STATUS_READY - Indicates that the USB Host layer is ready for operations. 

SYS_STATUS_BUSY - The initialization is in progress. 

SYS_STATUS_DEINITIALIZED - Indicates that the driver has been deinitialized

Remarks

This function is typically called by the MPLAB Harmony System to check the system status of the USB Host Layer. This function is not intended to be called directly by the application tasks routine.

Example
SYS_MODULE_OBJ      object;     // Returned from USB_HOST_Initialize
SYS_STATUS          status;

status = USB_HOST_Status(object);
if (SYS_STATUS_READY == status)
{
    // The USB Host system is ready and is running.
}