HID 全局项目的表格在哪里?

问题描述 投票:0回答:1

我查看了 HID 使用表,我可以了解哪些代码对应于报告描述符中的哪些代码,例如鼠标或键盘。但我在使用表和 HID 规范补充中都找不到任何内容,例如,0x06 是使用页面,0xA1 是集合的开始,0xC0 是集合的结束。

显示标题本身的所有十六进制代码的文档在哪里?

usb hid
1个回答
0
投票

您寻求的信息位于您在问题中引用的文件中 - 尽管我不得不承认它们相当难以理解。为了帮助 HID 报告描述符解码,我编写了一个程序来执行此操作 - 请参阅 https://github.com/abend0c1/hidrdd (或者 https://codeberg.org/abend0c1/hidrdd 如果您有哲学问题)与 github)。

您可以通过发出以下命令让该程序列出所有报告描述符代码的摘要:

rexx rd.rex --codes

...结果是:

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

希望对您有帮助。

© www.soinside.com 2019 - 2024. All rights reserved.