Jump to main content

##

# 2.2.4.4 USB_DEVICE_Tasks Function

## C

    void USB_DEVICE_Tasks(
        SYS_MODULE_OBJ devLayerObj
    );

## Summary

This function must be periodically called by the user application. The USB Device layer calls all other function driver tasks in this function. It also generates and forwards events to its clients.

## Precondition

Device layer must have been initialized by calling USB_DEVICE_Initialize.

## Parameters

Parameters | Description
devLayerObj | Pointer to the Device Layer Object that is returned from USB_DEVICE_Initialize

## Returns

None.

## Example

    // The USB_DEVICE_Tasks() function should be placed in the
    // SYS_Tasks() function of a MPLAB Harmony application.

    SYS_MODULE_OBJ usbDeviceLayerObj; // Returned by USB_DEVICE_Initialize().

    void SYS_Tasks(void)
    {
        USB_DEVICE_Tasks(usbDeviceLayerObj);
    }

## Remarks

None.