USB设备分类

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

Interface

Application Specific

FFh

Both

Vendor Specific

转载于:https://my.oschina.net/jingshishengxu/blog/1505550

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值