USB Libraries Help > USB Host Libraries > USB Host Layer Library > Using the Library > How the Library Works > Event Handling
MPLAB Harmony USB Stack
Event Handling

The USB Host Layer provides general device related events to the application. The application must register an event handling function by using the USB_HOST_EventHandlerSet function. A context specified at the time of calling this function, is returned in the event handler. The event handler must be registered before the bus is enabled. Refer to the description of USB_HOST_DEVICE_EVENT events for details on the available events.