3.2.4.16 USB_HOST_EventHandlerSet Function

C

USB_HOST_RESULT USB_HOST_EventHandlerSet(
    USB_HOST_EVENT_HANDLER eventHandler, 
    uintptr_t context
);

Summary

This is the USB Host Layer Event Handler Callback Set function. An application can receive USB Host Layer events by using this function to register and event handler callback function. The application can additionally specify a specific context which will returned with the event handler callback function. The event handler must be set (this function must be called) before any of the USB buses are enabled.

Precondition

The host layer should have been initialized.

Parameters

Parameters Description
eventHandler Pointer to the call back function. The host layer notifies the application about host layer events by calling this function. If this is NULL, then events will not be generated.
context application specific context.

Returns

USB_HOST_RESULT_SUCCESS - The function was successful.

USB_HOST_RESULT_FAILURE - An unknown failure occurred.

Remarks

None.