USB Libraries Help > USB Device Libraries > Generic USB Device Library > Using the Library > How the Library Works > Event Handling
MPLAB Harmony USB Stack
Event Handling

The USB Device Layer generates two different types of events for a Generic USB Device.

  • Control transfer events
  • Endpoint data transfer events

While handing Device Layer events, it is recommended that computationally intensive operations or hardware access should not be performed with in the event handler. Doing so may affect the capability of the Device Stack to respond to changes on the USB and could cause the Device to become non-compliant. 

A Generic USB Device application must handle the above events along with the other Device Layer events.

Topics
Name 
Description 
Describes control transfer events and provides a code example. 
Describes endpoint data transfer events and provides a code example.