Analysis of wince6.0 USB driver architecture

Source: Internet
Author: User

1. Role of the wince Device

USB is a master-slave structure, which is divided into the master end and the slave end. Generally, the master end is called the host and the slave end is called the client, but there are some differences in the wince system. The master end is called the host and the slave end is called the function.

For USB, embedded devices equipped with Wince can assume three different roles: Host, function, and OTG. Wince devices often connect to various USB devices, such as rndis, print, mass storage, and hid devices. In this case, it is used as the master end to implement the host function. When the wince device is connected to a PC, it is used as a slave to implement the function. However, at this time, the wince device can be displayed in multiple forms, including mass storage, rndis, or serial port Devices. For example, the serial port device is used when the wince device is connected to the PC for synchronization. When the wince device implements the OTG function, it can be used either as the master side or as the slave side. 2. Shows the USB driver architecture of the USB driver framework in wince6.0, contains three roles.

3. the USB directory structure in wince6.0 has good support for USB. Let's take a look at what Microsoft has done. From the preceding directory structure, we can see that the USB driver provided by Microsoft is divided by three different roles. USB corresponds to the USB Host function, usbfn corresponds to the USB function, and usbotg corresponds to the usb otg function. (1) The lower-level directory of wince600 \ public \ common \ oak \ drivers \ USB is as follows: According to the architecture diagram, the class folder corresponds to the USB Host client driver part, which is the upper-layer application protocol, each folder has applications such as hid devices, printers, large-capacity storage devices, and USB serial ports. The clientcen and common folders are the public code of various applications.

The HCD folder implements the controller driver module and provides underlying support for the usbd module. The HCD module provides support for various protocols, including OHCI (Open host controller inferface), uhci (Universal Host Controller Interface), and EHCI (enhanced Host Controller Interface ). For more information about these protocols, see the link below. The usbd folder is a universal serial bus driver module. With the support of the HCD module, various interface functions are provided to the upper layer so that the upper layer can communicate with peripheral devices. The common and INC folders implement the lock function, including lock. h and lock. cpp.

(2) The following table lists the subdirectories of wince600 \ public \ common \ oak \ drivers \ usbfn.

Combined with the architecture diagram, the class folder corresponds to the USB function client driver section. The following folders correspond to the display forms of the wince device. There are three common categories: rndis, serial, and storage. These are different from the USB Host drivers, which refer to peripheral devices. Here, they refer to the wince devices themselves. The compositefn and ufnprn folders share the same code.

The constroller folder implements the driver of the underlying controller. When the wince device is connected to the PC using a USB cable, it may take multiple forms: large-capacity storage (mass storage), a network adapter (rndis), or a serial device (Serial class, therefore, a control system is required to separate this part into a layer-driven controller, which controls the form in which the wince device is represented, including detaching the old client and loading the new client. The MDD folder implements the MDD part of the driver. The hardware of the PDD part is the net2280 controller, which is implemented in the net2280 folder. Ufnclientlib is the basic public code of the driver.

(3) The lower-level directories of wince600 \ public \ common \ oak \ drivers \ usbotg are as follows:

The structure of usb otg is relatively simple, and the driver implementation is divided into MDD and PDD according to the standard stream interface form. The MDD part corresponds to the above folder, and the hardware of PDD part adopts the isp1301 transceiver, in the Trans folder. 4. USB customization for wince6.0 system includes two parts: Kernel service layer and device driver layer. For kernel service layer customization, choose "core OS"> "cebase"> "core OS Services"> "USB Host Support" in the catalog items view ", "device drivers"-> "USB function"-> "USB function clients" in the catalog items view ",

Wince system USB function customization http://blog.csdn.net/nanjianhui/article/details/4438599

This article is from the "snow to sword" blog

 

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.