您的位置:首页 > 移动开发 > Android开发

windows是如何处理android复合设备驱动的?

2015-03-11 00:42 239 查看
windows是如何处理android复合设备驱动的?
2012-05-01 21:16:49

分类: LINUX

找了好几天,终于找到windows是如何处理android这样的复合设备啦,心里那叫一个爽!
下面把该段英文贴出来,原文的出处在这里:
http://www.cygnal.org/ubb/Forum9/HTML/001050.html
感谢google大神!
由于英文水平有限,怕翻译错误,就不翻译啦,自己搞定,有google大神呢,怕啥!
How Windows handles a composite device?
When a device satisfies these three requirement, Windows system recognizes the device as a composite device.

The class field of the device descriptor equals to zero: (bDeviceClass) = (0x00)

Single Configuration

Multiple Interfaces

[Note]

WinXP SP2, Win2k3 SP1 and Vista supports this alternative requirement.

1'. The class, subclass and protocol fields of the device are that of Interface Association Descriptor:

(bDeviceClass, bDeviceSubClass, bDeviceProtocol) = (0xEF, 0x02, 0x01)

When an USB device is plugged in to a PC, the system reads out the device descriptor of the device and makes these Device ID.

USB\VID_vvvv&PID_pppp

USB\VID_vvvv&PID_pppp&REV_rrrr

(vvvv, pppp, rrrr: four digit hex number for the VID, PID, device release number. Matches to idVendor/ idProduct/ bcdDevice, defined in the device descriptor)

The system searches device database on the registry, installed by INF files. When the system finds the Device ID in a device record, it assigns the device driver specified by the record. However, when it cannot find any matched record, and the device Configuration
satisfies above criteria, the generic composite parent driver is loaded. This parent driver parses the Configuration of the device, and assigns this Device ID to each Interfaces.

USB\VID_vvvv&PID_pppp&MI_mm

USB\VID_vvvv&PID_pppp&REV_rrrr&MI_mm

(mm: Interface number of the corresponding function, two digit hex number)

As of the Interface which specifies a class, the system also assigns this Compatible ID.

USB\CLASS_cc

USB\CLASS_cc&SUBCLASS_ss

USB\CLASS_cc&SUBCLASS_ss&PROT_pp

(cc/ ss / pp: two digits hex number.

bInterfaceClass/ bInterfaceSubClass/ bInterfaceProtocol, from the Interface descriptor)

The system searches these Device ID and Compatible ID in the device database again. When it finds a matched record, it assigns the specified device driver to the Interface. However, when it cannot find any matched record, it shows 'New Hardware Wizard' to users
and asks them to install the device driver.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐