Download Bootstrap Yourself with Linux-USB Stack

Transcript
144
Chapter 11
n
Linux USB Gadget Driver
Figure 11.1
A generic USB device software architecture.
Figure 11.1 illustrates a typical USB software stack architecture. It consists of three
major parts: a device firmware driver, a Chapter—9 driver, and a USB class driver.
Device Firmware Driver
The USB device firmware driver implements hardware-specific routines that
allow access to the registers, memory space, and interrupts. Generally, the
registers help configure the device endpoints, control the interrupts, and control
the USB activity. The firmware driver exports the facilities that the USB
controller provides to the upper layers. The device firmware layer is specific
to the controller for which the firmware driver is written. The firmware driver
can also implement service routines for the USB interrupts and interrupt events.
Chapter—9: Driver/USB Device Framework
The USB device framework, or the Chapter—9 driver layer, acts as an interface
between the upper class drivers and the endpoints in the device controller
through the firmware driver. This layer also implements the state machine
defined by the USB specification during the enumeration process. Thus, the
typical functions of this layer are to support the USB enumeration process and
to transfer data from the upper layers.
USB Class Driver
The USB class driver layer implements the application functionality of the
device, which is generally independent of the USB protocol. This layer is