USB Library
USB_HOST_APP_EVENT_HANDLER Function
Syntax
bool USB_HOST_APP_EVENT_HANDLER(
    uint8_t address, 
    USB_EVENT event, 
    void * data, 
    uint32_t size
);
Description

This function is implemented by the application. The function name can be anything - the macro USB_HOST_APP_EVENT_HANDLER must be set in usb_config.h to the name of the application function. 

In the application layer, this function is responsible for handling all application-level events that are generated by the stack. See the enumeration USB_EVENT for a complete list of all events that can occur. Note that some of these events are intended for client drivers (e.g. EVENT_TRANSFER), while some are intended for for the application layer (e.g. EVENT_UNSUPPORTED_DEVICE). 

If the application can handle the event successfully, the function should return true. For example, if the function receives the event EVENT_VBUS_REQUEST_POWER and the system can allocate that much power to an attached device, the function should return true. If, however, the system cannot allocate that much power to an attached device, the function should return false.

Preconditions

None

Return Values
Return Values 
Description 
true 
Event was processed successfully 
false 
Event was not processed successfully 
Remarks

If this function is not provided by the application, then all application events are assumed to function without error.

MLA - USB Library Help Version : 2.16
http://www.microchip.com/mla