USB设备类代码表官网链接:http://www.usb.org/developers/defined_class
USB defines class code information that is used to identify a device’s functionality and to nominally load a device driver based on that functionality. The information is contained in three bytes with the names Base Class, SubClass, and Protocol. (Note that ‘Base Class’ is used in this description to identify the first byte of the Class Code triple. That terminology is not used in the USB Specification). There are two places on a device where class code information can be placed.One place is in the Device Descriptor, and the other is in Interface Descriptors. Some defined class codes are allowed to be used only in a Device Descriptor, others can be used in both Device and Interface Descriptors, and some can only be used in Interface Descriptors. The table below shows the currently defined set of Base Class values, what the generic usage is, and where that Base Class can be used (either Device or Interface Descriptors or both).
USB定义了设备类的类别码信息,它的功能包括:可以用来识别设备并且加载设备驱动。这种代码信息有包含Base Class([基类])、SubClass([子类])、Protocol([协议])一共占有3个字节(注意:**[基类]**在文本中,用来标识三个字节的种类代码的首字节;在USB规范中没有使用这个术语)。设备中有两个地方可以存放种类代码信息,一个是设备描述符,另一个是接口描述符。已经定义的种类代码,有些只能放在设备描述符里,有些只能放在接口描述符里,有些两种描述符里都可以用。下表给出现在已经定了的基类的值的集合,通常用法是什么,基类用在什么场合(设备描述符或者接口描述符)。
Base Class | Descriptor Usage | Description |
00h | Device | Use class information in the Interface Descriptors种类信息定义在接口描述符中 |
01h | Interface | Audio音频设备 |
02h | Both | Communications&CDC通信设备 |
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 | Interface | Application Specific |
FFh | Both | Vendor Specific |