USB device driver guide (1)

Source: Internet
Author: User
With the increasing number of USB devices, our developers also need to drive more USB devices. Program Development work. However, many beginners have the following three difficulties:
First, we have little knowledge about the driver structure of wince and cannot focus on the development of the driver;
Second, I did not understand the examples of the USB driver that comes with wince, and found a lot of folder structures and confused thinking of the source program;
Third, there is almost no reference material for Chinese. I don't know how to start.

Article 3 many developers have met each other. I am the same. Many friends asked me if I have any information. I can only say sorry, because I also have this problem, everything depends on your own dark, so this article will not talk about the third article.
The first article is to find information, such as Windows CE. Net System Analysis and Experiment tutorial. Therefore, this article does not intend to spend a lot of ink here.
In this way, the focus of this article is on the second article. Through this article, I hope that more friends can understand the implementation process of the USB driver model and the sample program in Windows CE, exampleCodeTo streamline the development of USB device drivers. Similarly, the readers in this article are expected to be the readers and those who are ready to start USB driver development. The driver development experts should naturally smile. At the same time, I wrote this article to fulfill my promise to many friends half a year ago and apologize for my laziness.

Well, before we look at the sample program, we need to know something about it. Let's look at it first:

In this figure, we can clearly see the structure between the host and physical peripherals. On the host end, the usbd module and the HCD module use the default pipe to access a common logical device, in fact, usbd and HCD are a set of abstract logical interfaces for accessing all USB devices. They are responsible for managing the connection, loading, removal, data transmission, and general configurations of all USB devices. HCd is a host control driver and provides underlying function access services for usbd. usbd is a USB bus driver and is located on the upper layer of HCD. the HCD Service provides high-level Abstract Functions.

Because both HCD and usbd are oriented to the same logical device interface, a unique device driver is required for a variety of physical devices, this is the physical device and USB device driver connected by the top-most special pipe.

With our understanding of this structure, we can make it clear that we want to write the top-end USB device driver, which is also called the USB client driver in the sample program of wince, it works on usbd, so in fact our work is to use the interfaces provided by usbd to complete the USB device driver for specific physical devices. It is not related to other parts for the time being.

Okay. Come here first, and you'll be ready to read some specific things next!

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.