Jump to main content

##

# 2.1.1 Introduction

The MPLAB Harmony USB Device Library (referred to as the USB Device Library) provides embedded application developers with a framework for designing and developing a wide variety of USB devices. A choice of Full-Speed or High-Speed USB operations is available, depending on the target microcontroller or microprocessor selected. The USB Device Library facilitates the development of standard USB devices through function drivers that implement the standard USB Device class specification. Vendor-specific USB devices can be implemented via USB Device Layer Endpoint functions. The USB Device Library is modular, thus allowing application developers to readily design composite USB devices. The USB Device Library is part of the MPLAB Harmony installation and is accompanied by demonstration applications that highlight the library's usage. These demonstrations can also be modified or updated to build custom applications. Additionally, the USB Device Library features the following:

- Support for different USB device classes, including CDC, HID, MSD, Audio, Printer, and Vendor
- Supports multiple instances of a device classes
- Supports multiple configurations at different speeds
- Supports Full-Speed and High-Speed operations
- Supports the utilization of multiple USB peripherals by allowing multiple instances of the USB device stack
- Features modular and layered architecture
- Supports deferred control transfer responses
- Is completely non-blocking
- Supports both polled and interrupt operation
- Works readily in an RTOS environment.

This document serves as a getting started guide and provides information on the following:

- USB Device Library architecture
- USB Device Library - application interaction
- Creating your own USB device

Note: It is assumed that the reader is familiar with the USB 2.0 specification (available at www.usb.org). While the document, for the sake completeness, does cover certain aspects of the USB 2.0 protocol, it is recommended that the reader refer to the specification for a complete description of USB operation.