USB Libraries Help > USB Host Libraries > USB Host Layer Library > Library Interface > b) Data Types and Constants > USB_HOST_EVENT_HANDLER Type
MPLAB Harmony USB Stack
USB_HOST_EVENT_HANDLER Type

USB Host Layer Event Handler Function Pointer Type 

This data type defines the required function signature of the USB Host Layer Event handling callback function. The application must register a pointer to a Host Layer Event handling function who's function signature (parameter and return value types) match the types specified by this function pointer in order to receive event call backs from the Host Layer. The Host Layer will invoke this function with event relevant parameters. The description of the event handler function parameters is given here. 

event - Type of event generated. 

pData - This parameter should be type cast to an event specific pointer type based on the event that has occurred. Refer to the USB_HOST_EVENT enumeration description for more details. 

context - Value identifying the context of the application that was registered along with the event handling function.

C
typedef USB_HOST_EVENT_RESPONSE (* USB_HOST_EVENT_HANDLER)(USB_HOST_EVENT event, void * eventData, uintptr_t context);
Remarks

None.