Generic Client Driver for a USB Embedded Host
With the introduction of Microchip’s microcontrollers with the USB OTG peripheral, microcontroller applications can easily support USB embedded host functionality. Many devices fall under one of the defined USB classes, such as Mass Storage Device (thumb drives and external hard drives), Human Interface Device (or HID, such as computer mice), Printer and so on. Some devices, however, do not fit well within the restrictions of these classes. Instead, they utilize the fundamental USB transfers without any additional protocols.
Microchip provides a USB Generic Client Driver to facilitate USB communication with these unclassified or vendor-specific devices. This application note provides a brief overview on its configuration and use.
The USB Specification defines four different types of transfers:
- Control Transfers: Used to configure a device at attach time and can be used for other device specific purposes, including control of other pipes on the device.
- Bulk Data Transfers: Generated or consumed in relatively large and “bursty” quantities and have wide dynamic latitude in transmission constraints (e.g., printers and mass storage devices).
- Interrupt Data Transfers: Used for timely but reliable delivery of data. For example, characters or coordinates with human perceptible echo or feedback response characteristics (e.g.,keyboards, mice and joysticks).
- Isochronous Data Transfers: Occupy a pre-negotiated amount of USB bandwidth with a pre-negotiated delivery latency (e.g., audio data). These are also called streaming real-time transfers.