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

The function returns the enable status of the bus. It can be called after the USB_HOST_BusEnable() function is called, to check if the bus has been enabled yet. If the bus parameter is set to USB_HOST_BUS_ALL, then the function will check the enable status of all the busses and will return true only if all the busses are enabled.

C
USB_HOST_RESULT USB_HOST_BusIsEnabled(
    USB_HOST_BUS bus
);
Preconditions

The USB_HOST_Initialize() function should have been called before calling this function.

Parameters
Parameters 
Description 
bus 
the bus that needs to checked for enable status. If this is set to USB_HOST_BUS_ALL, all buses will be checked. 
Returns

USB_HOST_RESULT_TRUE if the bus is enabled. USB_HOST_RESULT_FALSE if the bus is not enabled.. USB_HOST_RESULT_BUS_UNKNOWN if the specified bus is invalid (it does not exist in the system). USB_HOST_RESULT_FAILURE if an unknown failure occurred.

Remarks

None.

Example
TBD.