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

This routine maintains the USB Host layer's state machine. It must be called frequently to ensure proper operation of the USB. This function should be called from the SYS_Tasks function.

C
void USB_HOST_Tasks(
    SYS_MODULE_OBJ hostLayerObject
);
Preconditions

The USB_HOST_Initialize routine must have been called for the specified USB Host Layer instance.

Parameters
Parameters 
Description 
object 
Object handle for the specified driver instance (returned from USB_HOST_Initialize
Returns

None.

Remarks

This routine is not intended to be called directly by an application. It is called by the MPLAB Harmony System Tasks function.

Example
SYS_MODULE_OBJ      object;     // Returned from USB_HOST_Initialize

void SYS_Tasks(void)
{
    USB_HOST_Tasks (object);
    
    // Do other tasks
}