版本:v0.6
摘要
本文主要介绍了USB HID的基本知识,以及举例说明如何解析HID Report
2013-09-05
修订历史 | ||
---|---|---|
修订 0.4 | 2011-06-16 | crl |
| ||
修订 0.6 | 2013-09-05 | crl |
|
版权 © 2012 Crifan, http://crifan.com
插图清单
目录
摘要
摘要
3-button mouse:
Note: above data’s format is:
05 01 = 0x 01 05
09 02 = 0x 02 09
Follow is the example.
According to the format, defined in specification:
Now to analysis the corresponding meaning for every group bytes:
0x06, 0x45, 0xFF, 0x0A, 0x00, 0xA0, 0xA1, 0x01, 0x75, 0x08, 0x96, 0x07, 0x01, 0x15, 0x00, 0x26, 0xFF, 0x00, 0x0A, 0x01, 0xA0, 0x91, 0x02, 0x75, 0x08, 0x95, 0x08, 0x0A, 0x02, 0xA0, 0x81, 0x02, 0xC0
|
|||||||||||||||||||
here Usage=0xA000 is just self defined, just need not confict with self's others, no other special meaning |
|||||||||||||||||||
|
|||||||||||||||||||
|
|||||||||||||||||||
|
|||||||||||||||||||
|
|||||||||||||||||||
|
|||||||||||||||||||
here Usage=0xA001 is just self defined, just need not confict with self's others, no other special meaning |
|||||||||||||||||||
|
|||||||||||||||||||
|
|||||||||||||||||||
|
|||||||||||||||||||
|
|||||||||||||||||||
|
|||||||||||||||||||
|
After analyze following data, the summary is:
Usage Page (0xFF45) | =Vendor-Specific | 0xFF45 06 | Global |
Usage (0xA000) | 0xA000 0A | Local | |
Collection (Application) | 0x01 A1 | Main | |
Report Size (8) | 0x08 75 | Global | |
Report Count (263) | 0x0107 96 | Global | |
Logical Minimum (0) | 0x00 15 | Global | |
Logical Maximum (255) | 0x00FF 26 | Global | |
Usage (0xA001) | 0xA0001 0A | Local | |
Output (Variable) | 0x02 91 | Main | |
Report Size (8) | 0x08 75 | Global | |
Report Count (8) | 0x08 95 | Global | |
Usage (0xA002) | 0xA002 0A | Local | |
Input (Variable) | 0x02 81 | Main | |
End Collection | 0xC0 | Main |
Report (Usage=0xA0000) | |
Output Report (Usage=0xA001) | |
263 bytes | Byte 0 |
Byte 1 | |
... | |
... | |
Byte 261 | |
Byte 262 | |
Input Report (Usage=0xA002) | |
8 bytes | Byte 0 |
Byte 1 | |
... | |
Byte 7 | |
All of above means: