USB设备类

来源:互联网 发布:ubuntu虚拟机镜像 编辑:程序博客网 时间:2024/05/16 11:41
Defined 1.0 Class Codes

USB 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 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).

 

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

DCh

Both

Diagnostic Device

E0h

Interface

Wireless Controller

EFh

Both

Miscellaneous

FEh

Interface

Application Specific

FFh

Both

Vendor Specific


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 Interface Descriptors 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 Class

SubClass

Protocol

Meaning

00h

00h

00h

Use class code info from Interface Descriptors

 


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-IF website. That specification defines the usable set of SubClass and Protocol values.Values outside of that defined spec are reserved. These class codes may only be used in Interface Descriptors.

 

Base Class

SubClass

Protocol

Meaning

01h

xxh

xxh

Audio device

 

 

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. That specification defines the usable set of SubClass and Protocol values. Values outside of that defined spec are reserved.  Note that the Communication Device Class spec requires some class code values (triples) to be used in Device Descriptors and some to be used in Interface Descriptors.

 

Base Class

SubClass

Protocol

Meaning

02h

xxh

xxh

Communication device class

 

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 specification defines the usable set of SubClass and Protocol values.   Values outside of that defined spec are reserved. These class codes can only be used in Interface Descriptors.

 

Base Class

SubClass

Protocol

Meaning

03h

xxh

xxh

HID device class

 

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. That specification defines the usable set of SubClass and Protocol values.  Values outside of that defined spec are reserved. These class codes can only be used in Interface Descriptors.

 

Base Class

SubClass

Protocol

Meaning

05h

xxh

xxh

Physical device class

 

 

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. That specification defines the usable set of SubClass and Protocol values.   Values outside of that defined spec are reserved.

 

Base Class

SubClass

Protocol

Meaning

06h

01h

01h

Still Imaging device

 

 

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.  That specification defines the usable set of SubClass and Protocol values.  Values outside of that defined spec are reserved.  These class codes can only be used in Interface Descriptors.

 

Base Class

SubClass

Protocol

Meaning

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. That specification defines the usable set of SubClass and Protocol values. Values outside of that defined spec are reserved. These class codes can only be used in Interface Descriptors.

 

Base Class

SubClass

Protocol

Meaning

08h

xxh

xxh

Mass Storage device

 

 

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 defines the complete triples as shown below.  All other values are reserved.  These class codes can only be used in Device Descriptors.

 

Base Class

SubClass

Protocol

Meaning

09h

00h

00h

Full speed Hub

01h

Hi-speed hub with single TT

02h

Hi-speed hub with multiple TTs

 

 

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. That specification defines the usable set of SubClass and Protocol values.Values outside of that defined spec are reserved. These class codes can only be used in Interface Descriptors.

 

Base Class

SubClass

Protocol

Meaning

0Ah

xxh

xxh

CDC data 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. That specification defines the usable set of SubClass and Protocol values.Values outside of that defined spec are reserved. These class codes can only be used in Interface Descriptors.

 

Base Class

SubClass

Protocol

Meaning

0Bh

xxh

xxh

Smart Card device

 

 

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. That specification defines the usable set of SubClass and Protocol values. Values outside of that defined spec are reserved. These class codes can only be used in Interface Descriptors.

 

Base Class

SubClass

Protocol

Meaning

0Dh

00h

00h

Content Security device

 

 

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. That specification defines the usable set of SubClass and Protocol values. Values outside of that defined spec are reserved. These class codes can only be used in Interface Descriptors.

 

Base Class

SubClass

Protocol

Meaning

0Eh

xxh

xxh

Video device

 

 

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-IF website. That specification defines the usable set of SubClass and Protocol values. Values outside of that defined spec are reserved. These class codes should only be used in Interface Descriptors.

 

Base Class

SubClass

Protocol

Meaning

0Fh

xxh

xxh

Personal Healthcare device

 

 

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. This class code can be used in Device or Interface Descriptors.

 

Base Class

SubClass

Protocol

Meaning

DCh

01h

01h

USB2 Compliance Device.  Definition for this device can be found athttp://www.intel.com/technology/usb/spec.htm

 

 

Base Class E0h (Wireless Controller)

This base class is defined for devices that are Wireless controllers. Values not shown in the table below are reserved.These class codes are to be used in Interface Descriptors, with the exception of the Bluetooth class code which can also be used in a Device Descriptor.

 

Base Class

SubClass

Protocol

Meaning

E0h

01h

01h

Bluetooth Programming Interface.  Get specific information from the Bluetooth SIG.

02h

UWB Radio Control Interface.  Definition for this is found in the Wireless USB Specification in Chapter 8.

03h

Remote NDIS.  Information can be found at:http://www.microsoft.com/windowsmobile/mobileoperators/default.mspx

02h

01h

Host Wire Adapter Control/Data interface.  Definition can be found in the Wireless USB Specification in Chapter 8.

02h

Device Wire Adapter Control/Data interface.  Definition can be found in the Wireless USB Specification in Chapter 8.

03h

Device Wire Adapter Isochronous interface.  Definition can be found in the Wireless USB Specification in Chapter 8.

 

 

Base Class EFh (Miscellaneous)

This base class is defined for miscellaneous device definitions. Values not shown in the table below are reserved.  The use of these class codes (Device or Interface descriptor) are specifically annotated in each entry below.

 

Base Class

SubClass

Protocol

Meaning

EFh

01h

01h

Active Sync device.  This class code can be used in either Device or Interface Descriptors.  Contact Microsoft for more information on this class.

02h

Palm Sync.  This class code can be used in either Device or Interface Descriptors.

02h

01h

Interface Association Descriptor.  The usage of this class code triple is defined in the Interface Association Descriptor ECN that is provided on www.usb.org . This class code may only be used in Device Descriptors.

02h

Wire Adapter Multifunction Peripheral programming interface. Definition can be found in the Wireless USB Specification in Chapter 8.  This class code may only be used in Device Descriptors

03h

01h

Cable Based Association Framework.  This is defined in the Association Model addendum to the Wireless USB specification.  This class code may only be used in Interface Descriptors.

 

 

 

Base Class FEh (Application Specific)

This base class is defined for devices that conform to several class specifications found on the USB-IF website.  That specification defines the usable set of SubClass and Protocol values.  Values outside of that defined spec are reserved. These class codes can only be used in Interface Descriptors.

 

Base Class

SubClass

Protocol

Meaning

FEh

01h

01h

Device Firmware Upgrade.  Device class definition provided on www.usb.org .

02h

00h

IRDA Bridge device.  Device class definition provided on www.usb.org .

03h

00h

USB Test and Measurement Device.  Definition provided in the USB Test and Measurement Class spec found on www.usb.org .

01h

USB Test and Measurement Device conforming to the USBTMC USB488 Subclass Specification found on www.usb.org.

 

 

Base Class FFh (Vendor Specific)

This base class is defined for vendors to use as they please.  These class codes can be used in both Device and Interface Descriptors.

 

Base Class

SubClass

Protocol

Meaning

FFh

xxh

xxh

Vendor specific

 

转载自:http://blog.chinaunix.net/u3/103634/showart_2037904.html

 

 

另一篇相同意思的,不过是母语......

 

USB是英文Universal Serial Bus的缩写,中文含义是"通用串行总线"。它是一种应用在PC领域的新型接口技术。自从1995年PC机带有USB接口, 1998年USB接口逐步走进大规模实用阶段。

这几年,随着大量支持USB的个人电脑的普及,USB逐步成为PC机的标准接口已经是大势所趋。在主机(host)端,最新推出的PC机几乎100%支持USB;而在外设(device)端,使用USB接口的设备也与日俱增,例如数码相机、扫描仪、游戏杆、磁带和软驱、图像设备、打印机、键盘、鼠标等等。

USB设备之所以会被大量应用,主要具有以下优点:

1、  可以热插拔,告别"并口和串口先关机,将电缆接上,再开机"的动作。

2、  系统总线供电,低功率设备无需外接电源,采用低功耗设备,并可提供5V/500mA电源。

3、  支持设备众多,支持多种设备类,例如鼠标,键盘,打印机等。

4、  扩展容易,可以连接多个设备,最多可扩127个。

5、  高速数据传输,USB1.1是12Mb/s,USB2.0高达480Mb/S。

6、  方便的设备互连,USB OTG支持点对点通信,例如数码相机和打印机直接互连,无需PC。

当然,USB设备也有其缺点,包括:

1、  供电能力,如果外设的供电电流大于500mA时,设备必须外接电源。

2、  传输距离,USB总线的连线长度最大为5m,即便是用HUB来扩展,最远也不超过30米。

为了扩展USB的应用范围,很多公司在USB规范上添加了新的功能,例如PoweredUSB和ExtremeUSB,前者加大了USB的供电能力,后者延长了USB的传输距离,详细信息可以访问www.poweredusb.com和www.icron.com.

USB规范

USB的所有标准主要包括三部分:USB基本规范,USB设备类规范和USB HOST控制器规范。可以通过访问USB实施者www.usb.org论坛来得到USB标准和信息。

USB基本规范也就是USB1.0,USB1.1,USB2.0和USB OTG规范,如下表所示。

USB主要协议版本:

标准

图标

说明

传输速度

发布日期

USB1.0

 

早期USB版本,

主要应用在鼠标,键盘等HID设备

1.5Mbps

低速

1996-1-15

USB1.1

 

现在市场上大多数USB设备都采用1.1标准,应用领域非常广泛

12Mbps

全速

1998-9-23

USB2.0

 

现在主要应用高速数据采集场合,图像传输。正在进一步普及

480Mbps

高速

2000-4-27

USB2.0 OTG

 

作为USB2.0协议的补充,主要应用在点对点通信

480Mbps

2001-12-18

USB1.1 OTG

 

作为USB2.0协议的补充,支持点对点通信

12Mbps

 

注意:USB OTG作为USB2.0协议的补充,但并不意味着OTG芯片都支持高速传输,并且USB OTG的主要应用是在全速和低速。

USB设备类规范:

Ø         语音设备类(Audio Device):如麦克风,音箱

Ø         通信设备类(Communications Device) :如Moden

Ø         芯片/智能卡接口设备类(Chip/Smart Card Interface Device):如USB Key,USB SmartCard

Ø         设备固件更新类(Device Fireware Upgrade):设备软件更新

Ø         影像设备(Image Device):如扫描仪,数码相机

Ø         人机交互设备(Human Interface Device):如鼠标,键盘,游戏杆

Ø         IrDA设备类(IrDA Bridge Device):针对红外设备

Ø         存储设备类 (Mass Storage Device):如CD-ROM、移动硬盘

Ø         物理接口设备类 (Physical Interface Device)

Ø         电源设备类 (Power Device ):针对电源控制的设备

Ø         打印机设备类(Printer Class):针对打印机

Ø         监控设备类(Monitor Device):如显示器

现在市场上,各大公司针对不同USB协议版本开发了大量的USB设备,例CYPRESS,PHILIPS,ATMEL,STM,INTEL,ALI等。USB设备的种类非常繁多,主要可以根据以下两种方法划分:

1.  USB协议:按照协议标准可分为USB1.0,USB1.1,USB2.0,主要区别是传输速度;另外就是补充协议USB OTG,其突出的特点是支持点对点通信,可分为USB HOST和USB DEVICE,尤其是USB HOST设备,作为USB主控端,可以读写各种USB设备,如U盘,鼠标。

2.  USB设备功能:

功能

说明

英文

主要厂家

接口芯片

通用USB接口芯片

Usb interface chip

CYPRESS,PHILIPS

USB 主控制器

USB HOST功能芯片

Usb host chip

CYPRESS,PHILIPS,ALI

USB微控制器

带USB接口MCU

usb with mcu

CYPRESS,CYGAL

闪盘控制器

U盘

Usb flash controller

ICSI, ALI,ALCOR

IDE控制器

移动硬盘

并口桥

USB转并口芯片

Usb to parallel bridge

串口桥

USB转串口芯片

Usb to serial bridge

读卡器

智能卡设备类

Usb smart card

ALI,ALCOR

音频控制器

音频设备类

Usb Audio Controller

HUB控制器

USB HUB

USB HUB Controller

ATMEL,

打印机控制器

打印机设备类

USB Print Controller

HID控制器

人机接口设备类,如鼠标,键盘等

USB Human Interface Device

MOTOROLA ,CYPESS

数码相机控制器

影像设备类

USB Camera Controller

扫描仪控制器

影像设备类

 

视频控制器

影像设备类

USBVedio Controller

调制解调器

USB通信设备

USB Modern

USB-USB桥

通过USB实现PC互连

USB to USB bridge

所以,在实际的工程项目中,为了选择一款合适USB芯片,需要考虑以下因素:

*         接口芯片:选择包括芯片与MCU接口方式,有并行和串行,并行方式总线宽度有8位,16位和32,串行方式有I2C,SPI等。另外有些芯片的内部有USB协议引擎,从而简化编程。

*         芯片价格:类似的芯片,通过市场调查找出一个性价比好的。

*         专用芯片:例如U盘,可以专用芯片,也可以用USB通用芯片,如果没有什么特殊要求,单片解决方案的USB专用芯片是首选。

原创粉丝点击