2024年1月14日发(作者:)

USBClassCodesusb设备类型代码Defined 1.0 Class CodesUSB Class Codes

March 2, 2006

USB defines class code information that is used to identify a device’s functionality and to nominally load a device driver based on thatfunctionality. The information is contained in three bytes with the names Base Class, SubClass, and Protocol. (Note that ‘Base Class’ isused in this description to identify the first byte of the Class Code triple. That terminology is not used in the USB Specification). There aretwo places on a device where class code information can be place is in the Device Descriptor, and the other is in InterfaceDescriptors. Some defined class codes are allowed to be used only in a Device Descriptor, others can be used in both Device andInterface Descriptors, and some can only be used in Interface Descriptors. The table below shows the currently defined set of Base Classvalues, what the generic usage is, and where that Base Class can be used (either Device or Interface Descriptors or both).

Base ClassDescriptor UsageDescription

00hDevice

01hInterface

02hBoth

03hInterface

05hInterface

06hInterface

07hInterface

08hInterface

09hDevice

0AhInterface

0BhInterface

0DhInterface

0EhInterface

0FhInterface

DChBoth

E0hInterface

EFh

FEh

FFh

Both

Interface

Both

Base Class 00h (Device)This base class is defined to be used in Device Descriptors to indicate that class information should be determined from the InterfaceDescriptors in the device. There is one class code definition in this base class. All other values are reserved.

This value is also used in Interface Descriptors to indicate a null class code triple.

Base ClassSubClassProtocolMeaning

00h

Base Class 01h (Audio)This base class is defined for Audio capable devices that conform to the Audio Device Class Specification found on the USB-IFwebsite. That specification defines the usable set of SubClass and Protocol values. Values outside of that defined spec arereserved. These class codes may only be used in Interface Descriptors.

Base ClassSubClassProtocolMeaning

01h

Base Class 02h (Communications and CDC Control)This base class is defined for devices that conform to the Communications Device Class Specification found on the USB-IF website. Thatspecification defines the usable set of SubClass and Protocol values. Values outside of that defined spec are reserved. Note that theCommunication Device Class spec requires some class code values (triples) to be used in Device Descriptors and some to be used inInterface Descriptors.

Base ClassSubClassProtocolMeaning

02h

xxh

xxh

Communication device class

xxh

xxh

Audio device

00h

00h

Use class code info from Interface Descriptors

Base Class 03h (HID – Human Interface Device)This base class is defined for devices that conform to the HID Device Class Specification found on the USB-IF website. That specificationdefines the usable set of SubClass and Protocol values. Values outside of that defined spec are reserved. These class codes can only beused in Interface Descriptors.

Base ClassSubClassProtocolMeaning

03h

Base Class 05h (Physical)This base class is defined for devices that conform to the Physical Device Class Specification found on the USB-IF website. Thatspecification defines the usable set of SubClass and Protocol values. Values outside of that defined spec are reserved. These class codescan only be used in Interface Descriptors.

Base ClassSubClassProtocolMeaning

05h

Base Class 06h (Still Imaging)This base class is defined for devices that conform to the Imaging Device Class Specification found on the USB-IF website. Thatspecification defines the usable set of SubClass and Protocol values. Values outside of that defined spec are reserved.

Base ClassSubClassProtocolMeaning

06h

Base Class 07h (Printer)This base class is defined for devices that conform to the Printer Device Class Specification found on the USB-IF website. Thatspecification defines the usable set of SubClass and Protocol values. Values outside of that defined spec are reserved. These classcodes can only be used in Interface Descriptors.

Base ClassSubClassProtocolMeaning

01h

01h

Still Imaging device

xxh

xxh

Physical device class

xxh

xxh

HID device class

07h

xxh

xxh

Printer device

Base Class 08h (Mass Storage)This base class is defined for devices that conform to the Mass Storage Device Class Specification found on the USB-IF website. Thatspecification defines the usable set of SubClass and Protocol values. Values outside of that defined spec are reserved. These class codescan only be used in Interface Descriptors.

Base ClassSubClassProtocolMeaning

08h

Base Class 09h (Hub)This base class is defined for devices that are USB hubs and conform to the definition in the USB specification. That specification definesthe complete triples as shown below. All other values are reserved. These class codes can only be used in Device Descriptors.

Base Class

09h

01h

02h

Base Class 0Ah (CDC-Data)This base class is defined for devices that conform to the Communications Device Class Specification found on the USB-IF website. Thatspecification defines the usable set of SubClass and Protocol outside of that defined spec are reserved. These class codescan only be used in Interface Descriptors.

Base ClassSubClassProtocolMeaning

0Ah

xxh

xxh

CDC data device

SubClass

00h

Hi-speed hub with single TT

Hi-speed hub with multiple TTs

ProtocolMeaning

00h

Full speed Hub

xxh

xxh

Mass Storage device

Base Class 0Bh (Smart Card)This base class is defined for devices that conform to the Smart Card Device Class Specification found on the USB-IF website. Thatspecification defines the usable set of SubClass and Protocol outside of that defined spec are reserved. These class codescan only be used in Interface Descriptors.

Base ClassSubClassProtocolMeaning

0Bh

Base Class 0Dh (Content Security)This base class is defined for devices that conform to the Content Security Device Class Specification found on the USB-IF website. Thatspecification defines the usable set of SubClass and Protocol values. Values outside of that defined spec are reserved. These class codescan only be used in Interface Descriptors.

Base ClassSubClassProtocolMeaning

0Dh

Base Class 0Eh (Video)This base class is defined for devices that conform to the Video Device Class Specification found on the USB-IF website. Thatspecification defines the usable set of SubClass and Protocol values. Values outside of that defined spec are reserved. These class codescan only be used in Interface Descriptors.

Base ClassSubClassProtocolMeaning

0Eh

Base Class 0Fh (Personal Healthcare)This base class is defined for devices that conform to the Personal Healthcare Device Class Specification found on the USB-IFwebsite. That specification defines the usable set of SubClass and Protocol values. Values outside of that defined spec arereserved. These class codes should only be used in Interface Descriptors.

xxh

xxh

Video device

00h

00h

Content Security device

xxh

xxh

Smart Card device

Base ClassSubClassProtocolMeaning

0Fh

Base Class DCh (Diagnostic Device)This base class is defined for devices that diagnostic devices. There is currently only one value defined. All other values are reserved. Thisclass code can be used in Device or Interface Descriptors.

Base ClassSubClassProtocolMeaning

DCh

01h

01h

USB2 Compliance Device. Definition for this device can be found at

xxh

xxh

Personal Healthcare device