Jump to main content

##

# 3.2.4.17 USB_HOST_Initialize Function

## C

    SYS_MODULE_OBJ USB_HOST_Initialize(
        const SYS_MODULE_INIT * init
    );

## Summary

This routine initializes the USB Host Layer. This function must be called before any other Host layer function can be called. The initialization data is specified by the init parameter. This function is typically called in the SYS_Initialize() function. The initialization completion may require the USB_HOST_Tasks() routine to execute. The initialization function does not start the operation of the Host on the USB. This must be done explicitly via the USB_HOST_BusEnable() function. This function will initialize all client drivers listed in the TPL.

## Description

Description of the function.

## Precondition

The USB Host Controller driver initialization should be called somewhere in the SYS_Initialize() function.

## Parameters

Parameters | Description
init | Pointer to a USB_HOST_INIT data structure containing data necessary to initialize the driver.

## Returns

Return a SYS_MODULE_OBJ_INVALID if the initialization failed.

## Remarks

This routine must be called before any other USB Host routine is called. This routine should only be called once during system initialization unless USB_HOST_Deinitialize is called to deinitialize the Host Layer instance. This routine will NEVER block for hardware access. The USB_HOST_Tasks() function should be called to complete the initialization.