sniper167
驱动中牛
驱动中牛
  • 注册日期2006-07-12
  • 最后登录2016-01-09
  • 粉丝1
  • 关注0
  • 积分13分
  • 威望411点
  • 贡献值0点
  • 好评度321点
  • 原创分0分
  • 专家分0分
阅读:1137回复:4

关于USB设备类定义,请教下

楼主#
更多 发布于:2007-04-11 15:56
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盘,在电脑上对其进行操作。
[url]http://sniper167.bokee.com[/url]
square690410
驱动牛犊
驱动牛犊
  • 注册日期2007-01-31
  • 最后登录2007-07-09
  • 粉丝0
  • 关注0
  • 积分190分
  • 威望20点
  • 贡献值0点
  • 好评度19点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2007-04-30 11:31
給你一個更詳細的鏈結吧

http://www.usb.org/developers/defined_class
square690410
驱动牛犊
驱动牛犊
  • 注册日期2007-01-31
  • 最后登录2007-07-09
  • 粉丝0
  • 关注0
  • 积分190分
  • 威望20点
  • 贡献值0点
  • 好评度19点
  • 原创分0分
  • 专家分0分
板凳#
发布于: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
rayyang2000
管理员
管理员
  • 注册日期2001-03-23
  • 最后登录2012-09-13
  • 粉丝3
  • 关注0
  • 积分1036分
  • 威望925点
  • 贡献值3点
  • 好评度823点
  • 原创分0分
  • 专家分0分
地板#
发布于: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.
天天coding-debugging中----超稀饭memory dump file ======================================================== [b]Windows Device Driver Development and Consulting Service[/b] [color=blue][url]http://www.ybwork.com[/url][/color] ========================================================
angel525
驱动牛犊
驱动牛犊
  • 注册日期2006-07-18
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分320分
  • 威望33点
  • 贡献值0点
  • 好评度32点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2007-04-27 08:22
我个问题我也想知道
关注。。。
游客

返回顶部