HID:Humain Interface Device即人机接口设备,通常的usb鼠标,usb键盘,蓝牙遥控器都是HID设备
现在的HID设备都是以usb HID 为基础,根据各自的需要开发相应的report descriptor
学习usb HID 需要下载如下两个文档
1.Univeral Serial Bus:Device Class Definition for Humain Interface
2.Univeral Serial Bus:HID Usage Tables
一开始看以上文档会接触很多新名词,一时半会理解不了,得多读几遍
The most important thing is to understand the structure of Report Descripors
1.Report Descriptors are composed of pieces of information.Each piece of information is called an Item
2.Generic item Format:data,[bTag,bType,bSize]
There are three item types:Main,Global,and Local
Main item includes:Input,Output,Feature,Collection,End Collection
Global,Local to be continued
3.A Report descriptor must incude each of the following items to describe a control's data
Input,Usage,Usage Page,Logical Minumum,Logical Maximum,Report Size,Report Count