阅读:1135回复:4
关于USB设备类定义,请教下
typedef struct {
UCHAR bLength; UCHAR bDescriptorType; USHORT bcdUSB; UCHAR bDeviceClass; UCHAR bDeviceSubClass; UCHAR bDeviceProtocol; UCHAR bMaxPacketSize0; USHORT idVendor; USHORT idProduct; USHORT bcdDevice; UCHAR iManufacturer; UCHAR iSerialNumber; UCHAR bNumConfigurations; } USB_DEVICE; 这是USB的设备描述符,里面的bDeviceClass, bDeviceSubClass 和 bDeviceProtocol的定义码在哪可以找到呢? 还有里面的idVendor 和 idProduct, 我看资料上说是USB分配的,这个码又在哪里可以查到呢? 我目前是在做2440 + wince上的USB驱动。我是想把2440+wince平台通过USB连接电脑,把2440+wince平台的flash多余空间做成U盘,在电脑上对其进行操作。 |
|
|
沙发#
发布于:2007-04-27 08:22
我个问题我也想知道
关注。。。 |
|
板凳#
发布于:2007-04-27 13:08
idVendor 和 idProduct - buy from usb.org
others - defined by you. but if you put a wrong value which your device doesn't support, you device will not work. |
|
|
地板#
发布于:2007-04-27 13:38
0 表示在界面描述元中的類型代碼 (interface descriptor)
1 audio 2 communication 3 hid (keyboard , mouse) 4 monitor 5 real time hid (exp: joystick) 6 power 7 printer 8 storage 9 usb hub 10 通訊資料 11 smart card 12 security 220 設備診斷 224 無線控制器 (exp: bluetooth) 254 特殊應用 (exp: firmware update , IrDA) 255 vendor custom define |
|
地下室#
发布于:2007-04-30 11:31
|
|