Introduction: The embedded linux system environment has been widely used in the embedded field due to its ease of transplantation and reduction, high kernel filial piety efficiency, integrity, open source code, and excellent performance. Linux USB device Source code mainly includes USB device's massive storage devices, serial devices, network devices, and other device drivers and drivers of various USB device controller chips.
Introduction
The embedded linux system environment is widely used in the embedded field because of its ease of transplantation and cutting, small kernel, high efficiency, integrity, open source code, and excellent performance. Linux USB device Source code mainly includes the massive storage devices of USB device, serial devices, network devices, and other device drivers and drivers of various USB device controller chips. There are many types of USB device controller chips on the market. most users need to develop related USB device controller drivers for specific applications to make the devices work normally in linux.
1 USB driver
The Linux Gadget subsystem is divided into three layers: the first layer is the chip driver layer, which abstracts various USB device controllers into unified function interfaces for upper-layer drivers to call; the second layer is a simple encapsulation of operation functions. The third layer is the device driver layer, which can implement the corresponding functions according to system requirements. Shows the driver level of the Linux Gadget subsystem. The device driver layer of the Linux Gadget subsystem is used to implement drivers for various devices according to various specifications and protocols. In this design, an embedded device must have the mobile hard disk function, this function can be implemented based on the specifications and protocols of the massive storage class.