2.7.2.2 Abstraction Model
The Generic USB Device Library consists of USB Device Layer Endpoint API and events. The API allows the application to configure, enable, and disable endpoints. Endpoints can be configured for bulk, isochronous, and interrupt transfers. The events allow the application to track the completion of transfers and respond to control transfer events. It should be noted that the Generic USB Device Library in the MPLAB Harmony USB Device Stack does not have its own implementation, but rather, uses a subset of the Device Layer API to access the USB, as shown in the following diagram.
As seen in the previous figure, the application must implement the logic to implement the Generic USB Device behavior. It must respond to interface, class, and other control transfers. It must configure endpoints when the Host sets the configuration. Thus, the application implements the function driver for the Generic USB Function Driver.
The Generic USB Device Endpoint function and events provided by the Device Layer API abstract the details of configuring the USB peripheral. The Device Layer responds to standard USB requests as a part of the device enumeration process. The Device Layer control transfer functions and events allow the application to complete control transfers that are targeted to an endpoint, interface or others. The Device Layer endpoint read and write API provide a USB transaction or transfer level interface. Transactions or transfers can be queued.