USB设备分类
时间: 2017-08-10来源:OSCHINA
前景提要
USB设备分类
And you can get the USB spec from http://www.usb.org/developers/docs

USB从设备的分类可以从USB设备接口描述符(Standard Interface Descriptor)对应的的bInterfaceClass这一个byte得到。
bInterfaceClass的典型代码为1,2,3,6,7,8,9,10,11,255。分别代表意思为
1-audio:表示一个音频设 备。
2-communication device:通讯设备,如电话,moden等等。
3-HID:人机交互设备,如键盘,鼠标等。
6-image图象设备,如扫描仪,摄像头等,有时数码相 机也可归到这一类。
7-打印机类。如单向,双向打印机等。
8-mass storage海量存储类。所有带有一定存储功能的都可以归到这一类。如数码相机大多数都归这一类。
9-hub类。
11-chip card/smart card。
255-vendor specific.厂家的自定义类,主要用于一些特殊的设备。如接口转接卡等。

#define USB_DEVICE_CLASS_RESERVED 0x00
#define USB_DEVICE_CLASS_AUDIO 0x01
#define USB_DEVICE_CLASS_COMMUNICATIONS 0x02
#define USB_DEVICE_CLASS_HUMAN_INTERFACE 0x03
#define USB_DEVICE_CLASS_MONITOR 0x04
#define USB_DEVICE_CLASS_PHYSICAL_INTERFACE 0x05
#define USB_DEVICE_CLASS_POWER 0x06
#define USB_DEVICE_CLASS_PRINTER 0x07
#define USB_DEVICE_CLASS_STORAGE 0x08
#define USB_DEVICE_CLASS_HUB 0x09
#define USB_DEVICE_CLASS_VENDOR_SPECIFIC 0xFF

http://www.usb.org/developers/defined_class 官方更全的分类
Base Class Descriptor Usage Description
00h Device Use class information in the Interface Descriptors
01h Interface Audio
02h Both Communications and CDC Control
03h Interface HID (Human Interface Device)
05h Interface Physical
06h Interface Image
07h Interface Printer
08h Interface Mass Storage
09h Device Hub
0Ah Interface CDC-Data
0Bh Interface Smart Card
0Dh Interface Content Security
0Eh Interface Video
0Fh Interface Personal Healthcare
10h Interface Audio/Video Devices
11h Device Billboard Device Class
12h Interface USB Type-C Bridge Class
DCh Both Diagnostic Device
E0h Interface Wireless Controller
EFh Both Miscellaneous
FEh FFh
Interface Both
Application Specific Vendor Specific

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行