Simple analysis of the USB driver

Written in front, after reading this article, you can not fully grasp the USB driver, here is mainly to bring you some ideas, I hope to be helpful to everyone.

I. Overall framework

Simple analysis of the USB driver

2. Hardware foundation

Simple analysis of the USB driver

The hardware of USB is very simple. There are four wires in total, one power in total, and two data cables. The four lines in this area seem to be simple, and the role should not be underestimated.

Identification process: As seen in the above figure, inside the USB port of the PC, D- and D+ are connected with a pull-down resistor of 15K, which is low when the USB device is not connected. Inside the USB port of the USB device, D- or D+ is connected with a pull-up resistor of 1.5K; when it is connected to the PC, the power supply is grounded through two resistors, and then divided, the D- or D+ of the PC USB port will be pulled high. From the hardware point of view, the PC is notified of new device access.

Third, the software concept

1.USB device overview

Simple analysis of the USB driver

A picture can be seen:

• Devices usually have one or more configurations. • Configurations often have one or more interfaces • Interfaces often have one or more settings. • Interfaces have zero or more endpoints.

2. End point

Endpoints are the most basic form of USB communication, and USB endpoints can only transfer data in one direction. The output endpoint (host to device), the input endpoint (device to host) is relative to the host.

Four types of endpoints:

Control Endpoint: The Control Endpoint is used to control access to different parts of the USB device, typically used to formulate devices, obtain device information, send commands to devices, or obtain status reports for devices. The data is reliable and time guaranteed.

Interrupt endpoint: Each time the USB host asks the device to transmit data, the interrupt endpoint transmits a small amount of data at a fixed rate. Note that the interrupts mentioned here are not the interrupts on the hardware we said before. Because the device does not send data without the requirements of the main controller, it is the USB host responsible for whether each USB device has data to send. These endpoints are the primary transport used by USB mice and keyboards.

Bulk endpoints: Bulk endpoints transfer large amounts of data. The USB protocol does not guarantee that these transfers will always be completed within a certain amount of time. U disk and other devices use multiple transmission methods

Isochronous endpoints: Isochronous endpoints can also transfer large amounts of data, but there is no guarantee that the data will arrive. USB microphones, USB video use these endpoints.

3. Interface

The USB interface only handles one USB logical connection. For example: the current USB camera basically has a microphone function. To achieve its driver, you need two drivers, a USB camera driver and a microphone driver. So you need two interfaces. Because a USB interface represents a basic function. Therefore, not a hardware only corresponds to a driver, there is a one-to-many situation.

4. Configuration

A USB device can have multiple configurations and can be switched between them to change the state of the device. For example, some devices that allow firmware to be downloaded to them contain multiple configurations to implement this, one configuration can only be done at one point in time. Was enabled.

Diaphragm Seal Systems

Product Description
E-CHEN Diaphragm RO Booster Pump 802 Series

Diaphragm Seal Systems are economical pumps but still as powerful as the 103 series. The Absolute Pressure Gauge is a kit for pipe pressures up to 30 psi. Analog Pressure Gauge provides reliable outlet pressure, Manometer Pressure Gauge for efficient membrane utilization. Available in 50 and 75 GPD.

Diaphragm Seal Systems,Absolute Pressure Gauge,Analog Pressure Gauge,Manometer Pressure Gauge,Accutire Pressure Gauge

Changshu Herun Import & Export Co.,Ltd , https://www.herunchina.com

Posted on