Reputation: 11
I looked through the HID Usage Tables, and I can understand which codes correspond to which in a report descriptor, for example a mouse or a keyboard. But I couldn't find anything both in the Usage Tables nor the HID Spec supplement that says for example, 0x06 is Usage Page, 0xA1 is the start of a Collection, and 0xC0 is the end of a collection.
Where is the document that shows all the hex codes for the titles themselves?
Upvotes: 1
Views: 92
Reputation: 1740
The information you seek is in the documents you have cited in your question - although I have to admit that they are quite difficult to understand. To help with HID report descriptor decoding I have written a program to do that - see https://github.com/abend0c1/hidrdd (or https://codeberg.org/abend0c1/hidrdd if you have philosophical issues with github).
You can get that program to list a summary of all the report descriptor codes by issuing:
rexx rd.rex --codes
...which results in:
Table of item codes in hexadecimal. The item code varies depending on the
length of the subsequent item data field as follows:
Data Field Length
Item 0 1 2 4 Comment
--------------------------- -- -- -- -- -----------------------------
(MAIN) INPUT 80 81 82 83 Defines input to the host device
(MAIN) OUTPUT 90 91 92 93 Defines output from the host device
(MAIN) COLLECTION A0 A1 A2 A3 See collection types below
(MAIN) FEATURE B0 B1 B2 B3 Defines data to or from the host device
(MAIN) END_COLLECTION C0 Item data field is not supported
(GLOBAL) USAGE_PAGE 05 06 07 USAGE_PAGE 00 is invalid
(GLOBAL) LOGICAL_MINIMUM 14 15 16 17
(GLOBAL) LOGICAL_MAXIMUM 24 25 26 27
(GLOBAL) PHYSICAL_MINIMUM 34 35 36 37
(GLOBAL) PHYSICAL_MAXIMUM 44 45 46 47
(GLOBAL) UNIT_EXPONENT 54 55 56 57
(GLOBAL) UNIT 64 65 66 67
(GLOBAL) REPORT_ID 85 86 87 REPORT_ID=0 is reserved
(GLOBAL) REPORT_SIZE 75 76 77 REPORT_SIZE=0 is invalid
(GLOBAL) REPORT_COUNT 94 95 96 97 REPORT_COUNT=0 is not useful
(GLOBAL) PUSH A4 Item data field is not supported
(GLOBAL) POP B4 Item data field is not supported
(LOCAL) USAGE 08 09 0A 0B
(LOCAL) USAGE_MINIMUM 18 19 1A 1B
(LOCAL) USAGE_MAXIMUM 28 29 2A 2B
(LOCAL) DESIGNATOR_INDEX 38 39 3A 3B
(LOCAL) DESIGNATOR_MINIMUM 48 49 4A 4B
(LOCAL) DESIGNATOR_MAXIMUM 58 59 5A 5B
(LOCAL) STRING_INDEX 78 79 7A 7B
(LOCAL) STRING_MINIMUM 88 89 8A 8B
(LOCAL) STRING_MAXIMUM 98 99 9A 9B
(LOCAL) DELIMITER A8 A9 AA AB
COLLECTION item codes are as follows:
Physical Collection: A1 00 Alternatively: A0
Application Collection: A1 01 Alternatively: A2 01 00, or A3 01 00 00 00
Logical Collection: A1 02
Report Collection: A1 03
Named Array Collection: A1 04 Must contain only Selector usages
Usage Switch Collection: A1 05
Usage Modifier Collection: A1 06
Hopefully that is of some help to you.
Upvotes: 1