Difference between revisions of "Unit HID"
Line 26: | Line 26: | ||
---- | ---- | ||
− | '' | + | |
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID specific constants''' <code> HID_NAME_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>HID_NAME_PREFIX = 'HID';</code> | ||
+ | | Name prefix for HID Devices | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID device type''' <code> HID_TYPE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>HID_TYPE_NONE = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>HID_TYPE_USB = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_TYPE_MAX = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''HID device type name'' | ||
+ | |- | ||
+ | |colspan="2"|<code>HID_TYPE_NAMES:array[HID_TYPE_NONE..HID_TYPE_MAX] of String = (</code> | ||
+ | |- | ||
+ | | <code>'HID_TYPE_NONE',</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>'HID_TYPE_USB');</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID device state''' <code> HID_STATE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>HID_STATE_DETACHED = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>HID_STATE_DETACHING = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_STATE_ATTACHING = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_STATE_ATTACHED = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_STATE_MAX = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''HID device state name'' | ||
+ | |- | ||
+ | |colspan="2"|<code>HID_STATE_NAMES:array[HID_STATE_DETACHED..HID_STATE_MAX] of String = (</code> | ||
+ | |- | ||
+ | | <code>'HID_STATE_DETACHED',</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>'HID_STATE_DETACHING',</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>'HID_STATE_ATTACHING',</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>'HID_STATE_ATTACHED');</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID device flag''' <code> HID_FLAG_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>HID_FLAG_NONE = $00000000;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID interface subclass''' <code> HID_SUBCLASS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See USB HID v1.11 specification)(Section 4.2) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_SUBCLASS_NONE = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>HID_SUBCLASS_BOOT = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID interface protocol''' <code> HID_BOOT_PROTOCOL_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See USB HID v1.11 specification)(Section 4.3) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_BOOT_PROTOCOL_NONE = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>HID_BOOT_PROTOCOL_KEYBOARD = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_BOOT_PROTOCOL_MOUSE = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID class descriptor''' <code> HID_DESCRIPTOR_TYPE* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See USB HID v1.11 specification)(Section 7.1) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_DESCRIPTOR_TYPE_HID = $21;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>HID_DESCRIPTOR_TYPE_REPORT = $22;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_DESCRIPTOR_TYPE_PHYSICAL_DESCRIPTOR = $23;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID request''' <code> HID_REQUEST_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 7.2 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_REQUEST_GET_REPORT = $01;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>HID_REQUEST_GET_IDLE = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_REQUEST_GET_PROTOCOL = $03;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_REQUEST_SET_REPORT = $09;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_REQUEST_SET_IDLE = $0A;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_REQUEST_SET_PROTOCOL = $0B;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID protocol''' <code> HID_PROTOCOL_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 7.2.5 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_PROTOCOL_BOOT = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>HID_PROTOCOL_REPORT = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID report''' <code> HID_REPORT_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 7.2.1 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_REPORT_INPUT = 1;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>HID_REPORT_OUTPUT = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_REPORT_FEATURE = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID report ID''' <code> HID_REPORTID_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 7.2.1 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_REPORTID_NONE = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID item size''' <code> HID_SIZE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 6.2.2.2 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_SIZE_0 = (0 shl 0);</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>HID_SIZE_1 = (1 shl 0);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_SIZE_2 = (2 shl 0);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_SIZE_4 = (3 shl 0);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_SIZE_MASK = $03;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID item type''' <code> HID_TYPE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 6.2.2.2 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_TYPE_MAIN = (0 shl 2);</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>HID_TYPE_GLOBAL = (1 shl 2);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_TYPE_LOCAL = (2 shl 2);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_TYPE_RESERVED = (3 shl 2);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_TYPE_MASK = $0C;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID main item tag''' <code> HID_TAG_MAIN_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 6.2.2.1 and Section 6.2.2.4 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_TAG_MAIN_INPUT = $80;</code> | ||
+ | | Input | ||
+ | |- | ||
+ | | <code>HID_TAG_MAIN_OUTPUT = $90;</code> | ||
+ | | Output | ||
+ | |- | ||
+ | | <code>HID_TAG_MAIN_FEATURE = $B0;</code> | ||
+ | | Feature | ||
+ | |- | ||
+ | | <code>HID_TAG_MAIN_COLLECTION = $A0;</code> | ||
+ | | Collection | ||
+ | |- | ||
+ | | <code>HID_TAG_MAIN_END_COLLECTION = $C0;</code> | ||
+ | | End Collection | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID global item tag''' <code> HID_TAG_GLOBAL_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 6.2.2.7 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_TAG_GLOBAL_USAGE_PAGE = $04;</code> | ||
+ | | Usage Page | ||
+ | |- | ||
+ | | <code>HID_TAG_GLOBAL_LOGICAL_MINIMUM = $14;</code> | ||
+ | | Logical Minimum | ||
+ | |- | ||
+ | | <code>HID_TAG_GLOBAL_LOGICAL_MAXIMUM = $24;</code> | ||
+ | | Logical Maximum | ||
+ | |- | ||
+ | | <code>HID_TAG_GLOBAL_PHYSICAL_MINIMUM = $34;</code> | ||
+ | | Physical Minimum | ||
+ | |- | ||
+ | | <code>HID_TAG_GLOBAL_PHYSICAL_MAXIMUM = $44;</code> | ||
+ | | Physical Maximum | ||
+ | |- | ||
+ | | <code>HID_TAG_GLOBAL_UNIT_EXPONENT = $54;</code> | ||
+ | | Unit Exponent | ||
+ | |- | ||
+ | | <code>HID_TAG_GLOBAL_UNIT = $64;</code> | ||
+ | | Unit | ||
+ | |- | ||
+ | | <code>HID_TAG_GLOBAL_REPORT_SIZE = $74;</code> | ||
+ | | Report Size | ||
+ | |- | ||
+ | | <code>HID_TAG_GLOBAL_REPORT_ID = $84;</code> | ||
+ | | Report ID | ||
+ | |- | ||
+ | | <code>HID_TAG_GLOBAL_REPORT_COUNT = $94;</code> | ||
+ | | Report Count | ||
+ | |- | ||
+ | | <code>HID_TAG_GLOBAL_PUSH = $A4;</code> | ||
+ | | Push | ||
+ | |- | ||
+ | | <code>HID_TAG_GLOBAL_POP = $B4;</code> | ||
+ | | Pop | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID local item tag ''' <code> HID_TAG_LOCAL_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 6.2.2.8 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_TAG_LOCAL_USAGE = $08;</code> | ||
+ | | Usage | ||
+ | |- | ||
+ | | <code>HID_TAG_LOCAL_USAGE_MINIMUM = $18;</code> | ||
+ | | Usage Minimum | ||
+ | |- | ||
+ | | <code>HID_TAG_LOCAL_USAGE_MAXIMUM = $28;</code> | ||
+ | | Usage Maximum | ||
+ | |- | ||
+ | | <code>HID_TAG_LOCAL_DESIGNATOR_INDEX = $38;</code> | ||
+ | | Designator Index | ||
+ | |- | ||
+ | | <code>HID_TAG_LOCAL_DESIGNATOR_MINIMUM = $48;</code> | ||
+ | | Designator Minimum | ||
+ | |- | ||
+ | | <code>HID_TAG_LOCAL_DESIGNATOR_MAXIMUM = $58;</code> | ||
+ | | Designator Maximum | ||
+ | |- | ||
+ | | <code>HID_TAG_LOCAL_STRING_INDEX = $78;</code> | ||
+ | | String Index | ||
+ | |- | ||
+ | | <code>HID_TAG_LOCAL_STRING_MINIMUM = $88;</code> | ||
+ | | String Minimum | ||
+ | |- | ||
+ | | <code>HID_TAG_LOCAL_STRING_MAXIMUM = $98;</code> | ||
+ | | String Maximum | ||
+ | |- | ||
+ | | <code>HID_TAG_LOCAL_DELIMITER = $A8;</code> | ||
+ | | Delimiter | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_TAG_LONG = $FC;</code> | ||
+ | | Always HID_SIZE_2 (Followed by 1 byte DataSize / 1 byte LongItemTag / n bytes Data) | ||
+ | |- | ||
+ | | <code>HID_TAG_MASK = $FC;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID main item input, ouput and feature''' <code> HID_MAIN_ITEM_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 6.2.2.5 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_MAIN_ITEM_CONSTANT = (1 shl 0);</code> | ||
+ | | Data (0) | Constant (1) | ||
+ | |- | ||
+ | | <code>HID_MAIN_ITEM_VARIABLE = (1 shl 1);</code> | ||
+ | | Array (0) | Variable (1) | ||
+ | |- | ||
+ | | <code>HID_MAIN_ITEM_RELATIVE = (1 shl 2);</code> | ||
+ | | Absolute (0) | Relative (1) | ||
+ | |- | ||
+ | | <code>HID_MAIN_ITEM_WRAP = (1 shl 3);</code> | ||
+ | | No Wrap (0) | Wrap (1) | ||
+ | |- | ||
+ | | <code>HID_MAIN_ITEM_NON_LINEAR = (1 shl 4);</code> | ||
+ | | Linear (0) | Non Linear (1) | ||
+ | |- | ||
+ | | <code>HID_MAIN_ITEM_NO_PREFERRED = (1 shl 5);</code> | ||
+ | | Preferred State (0) | No Preferred (1) | ||
+ | |- | ||
+ | | <code>HID_MAIN_ITEM_NULL_STATE = (1 shl 6);</code> | ||
+ | | No Null position (0) | Null state(1) | ||
+ | |- | ||
+ | | <code>HID_MAIN_ITEM_RESERVED1 = (1 shl 7);</code> | ||
+ | | Reserved (0) | ||
+ | |- | ||
+ | | <code>HID_MAIN_ITEM_BUFFERED_BYTES = (1 shl 8);</code> | ||
+ | | Bit Field (0) | Buffered Bytes (1) | ||
+ | |- | ||
+ | | <code>HID_MAIN_ITEM_RESERVED2 = ($FFFFFE00 shl 9);</code> | ||
+ | | Reserved (0) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID main item collection''' <code> HID_MAIN_COLLECTION_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 6.2.2.6 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_MAIN_COLLECTION_PHYSICAL = $00;</code> | ||
+ | | Physical (Group of axes) | ||
+ | |- | ||
+ | | <code>HID_MAIN_COLLECTION_APPLICATION = $01;</code> | ||
+ | | Application (Mouse, Keyboard) | ||
+ | |- | ||
+ | | <code>HID_MAIN_COLLECTION_LOGICAL = $02;</code> | ||
+ | | Logical (Interrelated data) | ||
+ | |- | ||
+ | | <code>HID_MAIN_COLLECTION_REPORT = $03;</code> | ||
+ | | Report | ||
+ | |- | ||
+ | | <code>HID_MAIN_COLLECTION_NAMED_ARRAY = $04;</code> | ||
+ | | Named Array | ||
+ | |- | ||
+ | | <code>HID_MAIN_COLLECTION_USAGE_SWITCH = $05;</code> | ||
+ | | Usage Switch | ||
+ | |- | ||
+ | | <code>HID_MAIN_COLLECTION_USAGE_MODIFIER = $06;</code> | ||
+ | | Usage Modifier | ||
+ | |- | ||
+ | |colspan="2"|''0x07 to 0x7F Reserved'' | ||
+ | |- | ||
+ | |colspan="2"|''0x80 to 0xFF Vendor Defined'' | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID global item unit''' <code> HID_GLOBAL_UNIT_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 6.2.2.7 For more information see https://physics.nist.gov/cuu/Units/units.html | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SYSTEM_MASK = $F;</code> | ||
+ | | System of Measurement | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SYSTEM_SHIFT = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SYSTEM_NONE = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SYSTEM_SI_LINEAR = 1;</code> | ||
+ | | SI linear unit | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SYSTEM_SI_ROTATION = 2;</code> | ||
+ | | SI rotational units | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SYSTEM_ENGLISH_LINEAR = 3;</code> | ||
+ | | English (Imperial) linear units | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SYSTEM_ENGLISH_ROTATION = 4;</code> | ||
+ | | English (Imperial) rotational units | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_LENGTH_MASK = $F;</code> | ||
+ | | Length (Centimeters in SI, Inches in English) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_LENGTH_SHIFT = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_ROTATION_MASK = $F;</code> | ||
+ | | Rotation (Radians in SI, Degrees in English) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_ROTATION_SHIFT = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_MASS_MASK = $F;</code> | ||
+ | | Mass (Grams in SI, Slugs in English) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_MASS_SHIFT = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_TIME_MASK = $F;</code> | ||
+ | | Time (Seconds) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_TIME_SHIFT = 12;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_TEMPERATURE_MASK = $F;</code> | ||
+ | | Temperature (Kelvin in SI, Fahrenheit in English) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_TEMPERATURE_SHIFT = 16;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_CURRENT_MASK = $F;</code> | ||
+ | | Current (Amperes) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_CURRENT_SHIFT = 20;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_LIGHT_MASK = $F;</code> | ||
+ | | Luminous Intensity (Candelas) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_LIGHT_SHIFT = 24;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|Common HID Global Item Unit Value | ||
+ | |- | ||
+ | |colspan="2"|For a more detailed list see the k.0UNIT definitions in https://github.com/abend0c1/hidrdd/blob/master/rd.rex | ||
+ | |- | ||
+ | |colspan="2"|''SI Base Units'' | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_ROTATION = $00000012;</code> | ||
+ | | Rotation (Radians) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_LENGTH = $00000011;</code> | ||
+ | | Length (Centimeters) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_MASS = $00000101;</code> | ||
+ | | Mass (Grams) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_TIME = $00001001;</code> | ||
+ | | Time (Seconds) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_TEMPERATURE = $00010001;</code> | ||
+ | | Temperature (Kelvin) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_CURRENT = $00100001;</code> | ||
+ | | Current (Amperes) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_LIGHT = $01000001;</code> | ||
+ | | Luminous Intensity (Candelas) | ||
+ | |- | ||
+ | |colspan="2"|''SI Derived Unit'' | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_AREA = $00000021;</code> | ||
+ | | Area (Square Centimeters) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_VOLUME = $00000031;</code> | ||
+ | | Volume (Cubic Centimeters) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_VELOCITY = $0000F011;</code> | ||
+ | | Velocity (Centimeters per second) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_ACCELERATION = $0000E011;</code> | ||
+ | | Acceleration (Centimeters per second squared) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_FREQUENCY = $0000F001;</code> | ||
+ | | Frequency (Hertz) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_FORCE = $0000E111;</code> | ||
+ | | Force (Newtons) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_PRESSURE = $0000E1F1;</code> | ||
+ | | Pressure (Pascals) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_ENERGY = $0000E121;</code> | ||
+ | | Energy (Joules) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_SI_POWER = $0000D121;</code> | ||
+ | | Power (Watts) | ||
+ | |- | ||
+ | |colspan="2"|''English Base Unit'' | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_ENGLISH_ROTATION = $00000014;</code> | ||
+ | | Rotation (Degrees) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_ENGLISH_LENGTH = $00000013;</code> | ||
+ | | Length (Inches) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_ENGLISH_TIME = $00001003;</code> | ||
+ | | Time (Seconds) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_ENGLISH_TEMPERATURE = $00010003;</code> | ||
+ | | Temperature (Fahrenheit) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_ENGLISH_CURRENT = $00100003;</code> | ||
+ | | Current (Amperes) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_ENGLISH_LIGHT = $01000003;</code> | ||
+ | | Luminous Intensity (Candelas) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_ENGLISH_AREA = $00000023;</code> | ||
+ | | Area (Square Inches) | ||
+ | |- | ||
+ | | <code>HID_GLOBAL_UNIT_ENGLISH_VOLUME = $00000033;</code> | ||
+ | | Volume (Cubic Inches) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|HID Global Item Unit Exponent Values | ||
+ | |- | ||
+ | |colspan="2"|See Section 6.2.2.7 | ||
+ | |- | ||
+ | |colspan="2"|HID_GLOBAL_UNIT_EXPONENTS:array[$0..$F] of LongInt = ( | ||
+ | |- | ||
+ | | <code>0,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>1,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>2,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>3,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>4,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>5,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>6,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>7,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>-8,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>-7,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>-6,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>-5,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>-4,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>-3,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>-2,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>-1);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|HID_GLOBAL_UNIT_MULTIPLIERS:array[$0..$F] of Double = ( | ||
+ | |- | ||
+ | | <code>1,</code> | ||
+ | | 10^0 | ||
+ | |- | ||
+ | | <code>10,</code> | ||
+ | | 10^1 | ||
+ | |- | ||
+ | | <code>100,</code> | ||
+ | | 10^2 | ||
+ | |- | ||
+ | | <code>1000,</code> | ||
+ | | 10^3 | ||
+ | |- | ||
+ | | <code>10000,</code> | ||
+ | | 10^4 | ||
+ | |- | ||
+ | | <code>100000,</code> | ||
+ | | 10^5 | ||
+ | |- | ||
+ | | <code>1000000,</code> | ||
+ | | 10^6 | ||
+ | |- | ||
+ | | <code>10000000,</code> | ||
+ | | 10^7 | ||
+ | |- | ||
+ | | <code>0.00000001,</code> | ||
+ | | 10^-8 | ||
+ | |- | ||
+ | | <code>0.0000001,</code> | ||
+ | | 10^-7 | ||
+ | |- | ||
+ | | <code>0.000001,</code> | ||
+ | | 10^-6 | ||
+ | |- | ||
+ | | <code>0.00001,</code> | ||
+ | | 10^-5 | ||
+ | |- | ||
+ | | <code>0.0001,</code> | ||
+ | | 10^-4 | ||
+ | |- | ||
+ | | <code>0.001,</code> | ||
+ | | 10^-3 | ||
+ | |- | ||
+ | | <code>0.01,</code> | ||
+ | | 10^-2 | ||
+ | |- | ||
+ | | <code>0.1);</code> | ||
+ | | 10^-1 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID local item delimiter''' <code> HID_LOCAL_DELIMITER_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 6.2.2.8 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_LOCAL_DELIMITER_CLOSE = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>HID_LOCAL_DELIMITER_OPEN = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID physical descriptor bias''' <code> HID_PHYSICAL_BIAS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 6.2.3 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_BIAS_NONE = (0 shl 5);</code> | ||
+ | | Not applicable | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_BIAS_RIGHT_HAND = (1 shl 5);</code> | ||
+ | | Right hand | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_BIAS_LEFT_HAND = (2 shl 5);</code> | ||
+ | | Left hand | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_BIAS_BOTH_HANDS = (3 shl 5);</code> | ||
+ | | Both hands | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_BIAS_EITHER_HAND = (4 shl 5);</code> | ||
+ | | Either hand | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID physical descriptor designator ''' <code> HID_PHYSICAL_DESIGNATOR_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 6.2.3 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_NONE = $00;</code> | ||
+ | | None | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_HAND = $01;</code> | ||
+ | | Hand | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_EYEBALL = $02;</code> | ||
+ | | Eyeball | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_EYEBROW = $03;</code> | ||
+ | | Eyebrow | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_EYELID = $04;</code> | ||
+ | | Eyelid | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_EAR = $05;</code> | ||
+ | | Ear | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_NOSE = $06;</code> | ||
+ | | Nose | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_MOUTH = $07;</code> | ||
+ | | Mouth | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_UPPER_LIP = $08;</code> | ||
+ | | Upper lip | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_LOWER_LIP = $09;</code> | ||
+ | | Lower lip | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_JAW = $0A;</code> | ||
+ | | Jaw | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_NECK = $0B;</code> | ||
+ | | Neck | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_UPPER_ARM = $0C;</code> | ||
+ | | Upper arm | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_ELBOW = $0D;</code> | ||
+ | | Elbow | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_FOREARM = $0E;</code> | ||
+ | | Forearm | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_WRIST = $0F;</code> | ||
+ | | Wrist | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_PALM = $10;</code> | ||
+ | | Palm | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_THUMB = $11;</code> | ||
+ | | Thumb | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_INDEX_FINGER = $12;</code> | ||
+ | | Index finger | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_MIDDLE_FINGER = $13;</code> | ||
+ | | Middle finger | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_RING_FINGER = $14;</code> | ||
+ | | Ring finger | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_LITTLE_FINGER = $15;</code> | ||
+ | | Little finger | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_HEAD = $16;</code> | ||
+ | | Head | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_SHOULDER = $17;</code> | ||
+ | | Shoulder | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_HIP = $18;</code> | ||
+ | | Hip | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_WAIST = $19;</code> | ||
+ | | Waist | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_THIGH = $1A;</code> | ||
+ | | Thigh | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_KNEE = $1B;</code> | ||
+ | | Knee | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_CALF = $1C;</code> | ||
+ | | Calf | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_ANKLE = $1D;</code> | ||
+ | | Ankle | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_FOOT = $1E;</code> | ||
+ | | Foot | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_HEEL = $1F;</code> | ||
+ | | Heel | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_BALL_OF_FOOT = $20;</code> | ||
+ | | Ball of foot | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_BIG_TOE = $21;</code> | ||
+ | | Big toe | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_SECOND_TOE = $22;</code> | ||
+ | | Second toe | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_THIRD_TOE = $23;</code> | ||
+ | | Third toe | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_FOURTH_TOE = $24;</code> | ||
+ | | Fourth toe | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_LITTLE_TOE = $25;</code> | ||
+ | | Little toe | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_BROW = $26;</code> | ||
+ | | Brow | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_DESIGNATOR_CHEEK = $27;</code> | ||
+ | | Cheek | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID physical descriptor qualifier''' <code> HID_PHYSICAL_QUALIFIER_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See Section 6.2.3 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_QUALIFIER_NONE = (0 shl 5);</code> | ||
+ | | Not applicable | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_QUALIFIER_RIGHT = (1 shl 5);</code> | ||
+ | | Right | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_QUALIFIER_LEFT = (2 shl 5);</code> | ||
+ | | Left | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_QUALIFIER_BOTH = (3 shl 5);</code> | ||
+ | | Both | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_QUALIFIER_EITHER = (4 shl 5);</code> | ||
+ | | Either | ||
+ | |- | ||
+ | | <code>HID_PHYSICAL_QUALIFIER_CENTER = (5 shl 5);</code> | ||
+ | | Center | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID usage page''' <code> HID_PAGE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See HID Usage Tables 1.3 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>HID_PAGE_UNDEFINED = $00;</code> | ||
+ | | Undefined | ||
+ | |- | ||
+ | | <code>HID_PAGE_GENERIC_DESKTOP = $01;</code> | ||
+ | | Generic Desktop Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_SIMULATION_CONTROLS = $02;</code> | ||
+ | | Simulation Controls Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_VR_CONTROLS = $03;</code> | ||
+ | | VR Controls Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_SPORT_CONTROLS = $04;</code> | ||
+ | | Sport Controls Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_GAME_CONTROLS = $05;</code> | ||
+ | | Game Controls Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_GENERIC_DEVICE_CONTROLS = $06;</code> | ||
+ | | Generic Device Controls Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_KEYBOARD_KEYPAD = $07;</code> | ||
+ | | Keyboard/Keypad Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_LED = $08;</code> | ||
+ | | LED Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_BUTTON = $09;</code> | ||
+ | | Button Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_ORDINAL = $0A;</code> | ||
+ | | Ordinal Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_TELEPHONY_DEVICE = $0B;</code> | ||
+ | | Telephony Device Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_CONSUMER = $0C;</code> | ||
+ | | Consumer Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_DIGITIZERS = $0D;</code> | ||
+ | | Digitizers Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_HAPTICS = $0E;</code> | ||
+ | | Haptics Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_PHYSICAL_INPUT_DEVICE = $0F;</code> | ||
+ | | Physical Input Device Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_UNICODE = $10;</code> | ||
+ | | Unicode Page | ||
+ | |- | ||
+ | |colspan="2"|''0x11-0x11 Reserved'' | ||
+ | |- | ||
+ | | <code>HID_PAGE_EYE_AND_HEAD_TRACKERS = $12;</code> | ||
+ | | Eye and Head Trackers Page | ||
+ | |- | ||
+ | |colspan="2"|''0x13-0x13 Reserved'' | ||
+ | |- | ||
+ | | <code>HID_PAGE_AUXILIARY_DISPLAY = $14;</code> | ||
+ | | Auxiliary Display Page | ||
+ | |- | ||
+ | |colspan="2"|''0x15-0x1F Reserved'' | ||
+ | |- | ||
+ | | <code>HID_PAGE_SENSORS = $20;</code> | ||
+ | | Sensors Page | ||
+ | |- | ||
+ | |colspan="2"|''0x21-0x3F Reserved'' | ||
+ | |- | ||
+ | | <code>HID_PAGE_MEDICAL_INSTRUMENT = $40;</code> | ||
+ | | Medical Instrument Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_BRAILLE_DISPLAY = $41;</code> | ||
+ | | Braille Display Page | ||
+ | |- | ||
+ | |colspan="2"|''0x42-0x58 Reserved'' | ||
+ | |- | ||
+ | | <code>HID_PAGE_LIGHTING_AND_ILLUMINATION = $59;</code> | ||
+ | | Lighting And Illumination Page | ||
+ | |- | ||
+ | |colspan="2"|''0x5A-0x7F Reserved'' | ||
+ | |- | ||
+ | | <code>HID_PAGE_MONITOR = $80;</code> | ||
+ | | Monitor Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_MONITOR_ENUMERATED = $81;</code> | ||
+ | | Monitor Enumerated Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_VESA_VIRTUAL_CONTROLS = $82;</code> | ||
+ | | VESA Virtual Controls Page | ||
+ | |- | ||
+ | |colspan="2"|''0x83-0x83 Reserved'' | ||
+ | |- | ||
+ | | <code>HID_PAGE_POWER = $84;</code> | ||
+ | | Power Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_BATTERY_SYSTEM = $85;</code> | ||
+ | | Battery System Page | ||
+ | |- | ||
+ | |colspan="2"|''0x86-0x8B Reserved'' | ||
+ | |- | ||
+ | | <code>HID_PAGE_BARCODE_SCANNER = $8C;</code> | ||
+ | | Barcode Scanner Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_SCALES = $8D;</code> | ||
+ | | Scales Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_MAGNETIC_STRIPE_READER = $8E;</code> | ||
+ | | Magnetic Stripe Reader Page | ||
+ | |- | ||
+ | |colspan="2"|''0x8F-0x8F Reserved'' | ||
+ | |- | ||
+ | | <code>HID_PAGE_CAMERA_CONTROL = $90;</code> | ||
+ | | Camera Control Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_ARCADE = $91;</code> | ||
+ | | Arcade Page | ||
+ | |- | ||
+ | | <code>HID_PAGE_GAMING_DEVICE = $92;</code> | ||
+ | | Gaming Device Page | ||
+ | |- | ||
+ | |colspan="2"|''0x93-0xF1CF Reserved | ||
+ | |- | ||
+ | | <code>HID_PAGE_FIDO_ALLIANCE = $F1D0;</code> | ||
+ | | FIDO Alliance Page | ||
+ | |- | ||
+ | |colspan="2"|''0xF1D1-0xFEFF Reserved'' | ||
+ | |- | ||
+ | |colspan="2"|''0xFF00-0xFFFF Vendor-defined'' | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID usage table''' <code> HID_DESKTOP_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See HID Usage Tables 1.3) | ||
+ | |- | ||
+ | |colspan="2"|HID Generic Desktop Page (Partial) | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_UNDEFINED = $00;</code> | ||
+ | | Undefined | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_POINTER = $01;</code> | ||
+ | | Pointer | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_MOUSE = $02;</code> | ||
+ | | Mouse | ||
+ | |- | ||
+ | |colspan="2"|''0x03-0x03 Reserved'' | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_JOYSTICK = $04;</code> | ||
+ | | Joystick | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_GAMEPAD = $05;</code> | ||
+ | | Gamepad | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_KEYBOARD = $06;</code> | ||
+ | | Keyboard | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_KEYPAD = $07;</code> | ||
+ | | Keypad | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_MULTI_AXIS_CONTROLLER = $08;</code> | ||
+ | | Multi-axis Controller | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_TABLET_PC_SYSTEM_CONTROLS = $09;</code> | ||
+ | | Tablet PC System Controls | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_WATER_COOLING_DEVICE = $0A;</code> | ||
+ | | Water Cooling Device | ||
+ | |- | ||
+ | | <code>HID_ID_DESKTOP_COMPUTER_CHASSIS_DEVICE = $0B;</code> | ||
+ | | Computer Chassis Device | ||
+ | |- | ||
+ | | <code>HHID_DESKTOP_WIRELESS_RADIO_CONTROLS = $0C;</code> | ||
+ | | Wireless Radio Controls | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_PORTABLE_DEVICE_CONTROL = $0D;</code> | ||
+ | | Portable Device Control | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_SYSTEM_MULTI_AXIS_CONTROLLER = $0E;</code> | ||
+ | | System Multi-Axis Controller | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_SPATIAL_CONTROLLER = $0F;</code> | ||
+ | | Spatial Controller | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_ASSISTIVE_CONTROL = $10;</code> | ||
+ | | Assistive Control | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_DEVICE_DOCK = $11;</code> | ||
+ | | Device Dock | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_DOCKABLE_DEVICE = $12;</code> | ||
+ | | Dockable Device | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_CALL_STATE_MANAGEMENT_CONTROL = $13;</code> | ||
+ | | Call State Management Control | ||
+ | |- | ||
+ | |colspan="2"|''0x14-0x2F Reserved'' | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_X = $30;</code> | ||
+ | | X | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_Y = $31;</code> | ||
+ | | Y | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_Z = $32;</code> | ||
+ | | Z | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_RX = $33;</code> | ||
+ | | Rx | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_RY = $34;</code> | ||
+ | | Ry | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_RZ = $35;</code> | ||
+ | | Rz | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_SLIDER = $36;</code> | ||
+ | | Slider | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_DIAL = $37;</code> | ||
+ | | Dial | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_WHEEL = $38;</code> | ||
+ | | Wheel | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_HAT_SWITCH = $39;</code> | ||
+ | | Hat Switch | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_COUNTED_BUFFER = $3A;</code> | ||
+ | | Counted Buffer | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_BYTE_COUNT = $3B;</code> | ||
+ | | Byte Count | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_MOTION_WAKEUP = $3C;</code> | ||
+ | | Motion Wakeup | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_START = $3D;</code> | ||
+ | | Start | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_SELECT = $3E;</code> | ||
+ | | Select | ||
+ | |- | ||
+ | |colspan="2"|''0x3F-0x3F Reserved | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_VX = $40;</code> | ||
+ | | Vx | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_VY = $41;</code> | ||
+ | | Vy | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_VZ = $42;</code> | ||
+ | | Vz | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_VBRX = $43;</code> | ||
+ | | Vbrx | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_VBRY = $44;</code> | ||
+ | | Vbry | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_VBRZ = $45;</code> | ||
+ | | Vbrz | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_VNO = $46;</code> | ||
+ | | Vno | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_FEATURE_NOTIFICATION = $47;</code> | ||
+ | | Feature Notification | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_RESOLUTION_MULTIPLIER = $48;</code> | ||
+ | | Resolution Multiplier | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_QX = $49;</code> | ||
+ | | Qx | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_QY = $4A;</code> | ||
+ | | Qy | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_QZ = $4B;</code> | ||
+ | | Qz | ||
+ | |- | ||
+ | | <code>HID_DESKTOP_QW = $4C;</code> | ||
+ | | Qw | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID keyboard/keypad''' <code> SCAN_CODE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: These are the same as the SCAN_CODE_* values in GlobalConst} | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID LED (Partial)''' <code> HID_LED_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>HID_LED_UNDEFINED = 00;</code> | ||
+ | | Undefined | ||
+ | |- | ||
+ | | <code>HID_LED_NUM_LOCK = 01;</code> | ||
+ | | Num Lock | ||
+ | |- | ||
+ | | <code>HID_LED_CAPS_LOCK = 02;</code> | ||
+ | | Caps Lock | ||
+ | |- | ||
+ | | <code>HID_LED_SCROLL_LOCK = 03;</code> | ||
+ | | Scroll Lock | ||
+ | |- | ||
+ | | <code>HID_LED_COMPOSE = 04;</code> | ||
+ | | Compose | ||
+ | |- | ||
+ | | <code>HID_LED_KANA = 05;</code> | ||
+ | | Kana | ||
+ | |- | ||
+ | | <code>HID_LED_POWER = 06;</code> | ||
+ | | Power | ||
+ | |- | ||
+ | | <code>HID_LED_SHIFT = 07;</code> | ||
+ | | Shift | ||
+ | |- | ||
+ | | <code>HID_LED_DO_NOT_DISTURB = 08;</code> | ||
+ | | Do Not Disturb | ||
+ | |- | ||
+ | | <code>HID_LED_MUTE = 09;</code> | ||
+ | | Mute | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID button (Partial)''' <code> HID_BUTTON_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>HID_BUTTON_NONE = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>HID_BUTTON_1 = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_BUTTON_2 = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_BUTTON_3 = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_BUTTON_4 = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_BUTTON_5 = 5;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_BUTTON_PRIMARY = HID_BUTTON_1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_BUTTON_SECONDARY = HID_BUTTON_2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HID_BUTTON_TERTIARY = HID_BUTTON_3;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|Note: Buttons are defined as Button1 to Button65535 | ||
+ | |- | ||
+ | | <code>HID_BUTTON_65535 = $FFFF;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID logging''' <code> HID_LOG_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>HID_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;</code> | ||
+ | | HID debugging messages | ||
+ | |- | ||
+ | | <code>HID_LOG_LEVEL_INFO = LOG_LEVEL_INFO;</code> | ||
+ | | HID informational messages, such as a device being attached or detached. | ||
+ | |- | ||
+ | | <code>HID_LOG_LEVEL_WARN = LOG_LEVEL_WARN;</code> | ||
+ | | HID warning messages | ||
+ | |- | ||
+ | | <code>HID_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;</code> | ||
+ | | HID error messages | ||
+ | |- | ||
+ | | <code>HID_LOG_LEVEL_NONE = LOG_LEVEL_NONE;</code> | ||
+ | | No HID messages | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Type definitions === | === Type definitions === |
Revision as of 23:16, 27 October 2022
Return to Unit Reference
Contents
[hide]Description
Ultibo Human Interface Device (HID) Interface unit
The Human Interface Device (HID) class is intended to provide a flexible model that allows a wide range of control types to be expressed using a standard set of tags in a report descriptor that each device provides during initialization.
HID devices can represent common items such as mice, keyboards, touchscreens, gamepads and joysticks but can also appear as controls within many other types of devices.
A headset for example will primarily be an audio device but the volume and mute buttons can be defined using the HID standard and easily recognized by software without requiring a custom driver for each and every device.
The Ultibo HID implementation creates an intermediate device layer that is mostly agnostic to both the bus type being used by an underlying provider (such as USB) and the devices recognized by HID consumers such as mice and keyboards.
A provider such as USB HID locates devices from the provider specific bus and creates HID devices to represent them along with obtaining report descriptors and other information.
These HID devices are then passed to registered HID consumers (drivers) to determine if they recognize the collections, reports and usages described by the device. A consumer can accept a device and bind to it during this process and create its own devices to represent the functionality described by the HID device.
While HID itself is intended to be bus agnostic this implementation is based heavily on the USB HID standards as those are the most widely adopted at this time. It is anticipated that HID adoption will expand over time to include a range other bus types, Bluetooth is already using HID and there are existing implementations of HID over I2C, SPI and PCI.
Expanding the Ultibo HID support to other bus types simply requires a new HID provider for that bus to be written along with any necessary changes or extensions to the HID layer itself.
Constants
HID_NAME_*
HID_TYPE_*
HID_STATE_*
HID_FLAG_*
HID_SUBCLASS_*
HID_BOOT_PROTOCOL_*
HID_DESCRIPTOR_TYPE*
HID_REQUEST_*
HID_PROTOCOL_*
HID_REPORT_*
HID_REPORTID_*
HID_SIZE_*
HID_TYPE_*
HID_TAG_MAIN_*
HID_TAG_GLOBAL_*
HID_TAG_LOCAL_*
HID_MAIN_ITEM_*
HID_MAIN_COLLECTION_*
HID_GLOBAL_UNIT_*
HID_LOCAL_DELIMITER_*
HID_PHYSICAL_BIAS_*
HID_PHYSICAL_DESIGNATOR_*
HID_PHYSICAL_QUALIFIER_*
HID_PAGE_*
HID_DESKTOP_*
SCAN_CODE_*
HID_LED_*
HID_BUTTON_*
HID_LOG_*
Type definitions
HID descriptor
HID report descriptor
PHIDReportDescriptor = Pointer;
HID physical descriptor
HID physical descriptor set0
PHIDPhysicalDescriptorSet0 = ^THIDPhysicalDescriptorSet0;
THIDPhysicalDescriptorSet0 = packed record
HID physical descriptor set
PHIDPhysicalDescriptorSet = ^THIDPhysicalDescriptorSet;
THIDPhysicalDescriptorSet = packed record
HID state
HID stack
HID usages
HID usage
HID reports
HID report
HID collections
HID collection
HID device enumeration callback
THIDDeviceEnumerate = function(Device:PHIDDevice;Data:Pointer):LongWord;
|
HID device notification callback
THIDDeviceNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
HID device get idle
THIDDeviceGetIdle = function(Device:PHIDDevice; var Duration:Word; ReportId:Byte):LongWord;
|
HID device set idle
THIDDeviceSetIdle = function(Device:PHIDDevice; Duration:Word; ReportId:Byte):LongWord;
|
HID device get report
THIDDeviceGetReport = function(Device:PHIDDevice; ReportType,ReportId:Byte; ReportData:Pointer; ReportSize:LongWord):LongWord;
|
HID device set report
THIDDeviceSetReport = function(Device:PHIDDevice; ReportType,ReportId:Byte; ReportData:Pointer; ReportSize:LongWord):LongWord;
|
HID device allocate report
THIDDeviceAllocateReport = function(Device:PHIDDevice; Collection:PHIDCollection; ReportId:Byte; ReportSize:LongWord):LongWord;
|
HID device release report
THIDDeviceReleaseReport = function(Device:PHIDDevice; ReportId:Byte):LongWord;
|
HID device submit report
THIDDeviceSubmitReport = function(Device:PHIDDevice; ReportId:Byte):LongWord;
|
HID device cancel report
THIDDeviceCancelReport = function(Device:PHIDDevice; ReportId:Byte):LongWord;
|
HID device get protocol
THIDDeviceGetProtocol = function(Device:PHIDDevice; var Protocol:Byte):LongWord;
|
HID device set protocol
THIDDeviceSetProtocol = function(Device:PHIDDevice; Protocol:Byte):LongWord;
|
HID device get interval
THIDDeviceGetInterval = function(Device:PHIDDevice; var Interval:LongWord):LongWord;
|
HID device set interval
THIDDeviceSetInterval = function(Device:PHIDDevice; Interval:LongWord):LongWord;
|
HID device get report descriptor
THIDDeviceGetReportDescriptor = function(Device:PHIDDevice; Descriptor:PHIDReportDescriptor; Size:LongWord):LongWord;
|
HID device get physical descriptor set0
THIDDeviceGetPhysicalDescriptorSet0 = function(Device:PHIDDevice; Descriptor:PHIDPhysicalDescriptorSet0):LongWord;
|
HID device get physical descriptor set
THIDDeviceGetPhysicalDescriptorSet = function(Device:PHIDDevice; Descriptor:PHIDPhysicalDescriptorSet; Index:Byte; Size:LongWord):LongWord;
|
HID device
HID consumer enumeration callback
THIDConsumerEnumerate = function(Consumer:PHIDConsumer; Data:Pointer):LongWord;
|
HID device bind
THIDDeviceBind = function(Device:PHIDDevice):LongWord;
|
HID device unbind
THIDDeviceUnbind = function(Device:PHIDDevice):LongWord;
|
HID collection bind
THIDCollectionBind = function(Device:PHIDDevice; Collection:PHIDCollection):LongWord;
|
HID collection unbind
THIDCollectionUnbind = function(Device:PHIDDevice; Collection:PHIDCollection):LongWord;
|
HID report receive
THIDReportReceive = function(Collection:PHIDCollection; ReportId:Byte; ReportData:Pointer; ReportSize:LongWord):LongWord;
|
HID consumer
HID report field
HID report definition
Public variables
HID logging
HID_DEFAULT_LOG_LEVEL:LongWord = HID_LOG_LEVEL_DEBUG;
|
Minimum level for HID messages. Only messages with level greater than or equal to this will be printed. |
HID_LOG_ENABLED:Boolean;
|
Function declarations
Initialization functions
HID functions
function HIDParserParseCollections(Device:PHIDDevice; var Collections:PHIDCollections; var Count:LongWord):LongWord;
function HIDParserFreeCollections(Collections:PHIDCollections; Count:LongWord):LongWord;
function HIDParserCountCollections(Device:PHIDDevice; Parent:PHIDCollection):LongWord;
function HIDParserCountReports(Device:PHIDDevice; Collection:PHIDCollection):LongWord;
function HIDParserCountUsages(Device:PHIDDevice; Report:PHIDReport):LongWord;
function HIDParserAllocateCollection(Device:PHIDDevice; Parent:PHIDCollection; State:PHIDState; Flags,Start:LongWord):PHIDCollection;
function HIDParserAllocateReport(Device:PHIDDevice; Collection:PHIDCollection; State:PHIDState; Kind:Byte; Flags,Index:LongWord):PHIDReport;
function HIDParserAllocateUsage(Device:PHIDDevice; Report:PHIDReport; State:PHIDState; Index:LongWord):PHIDUsage;
function HIDParserUpdateUsage(Device:PHIDDevice; Report:PHIDReport; State:PHIDState; Usage:PHIDUsage):Boolean;
function HIDParserPopStack(var Stack:PHIDStack; var State:PHIDState):LongWord;
function HIDParserPushStack(Stack:PHIDStack):LongWord;
function HIDParserFreeStack(Stack:PHIDStack):LongWord;
function HIDParserResetState(State:PHIDState):LongWord;
function HIDParserCleanState(State:PHIDState):LongWord;
function HIDFindCollection(Device:PHIDDevice; Page,Usage:Word):PHIDCollection;
function HIDFindReportIds(Device:PHIDDevice; Collection:PHIDCollection; var MinId,MaxId:Byte):LongWord;
function HIDAllocateDefinition(Device:PHIDDevice; Collection:PHIDCollection; Kind,Id:Byte):PHIDDefinition;
function HIDFreeDefinition(Definition:PHIDDefinition):LongWord;
function HIDInsertBitField(Field:PHIDField; Buffer:Pointer; Size:LongWord; Value:Boolean):LongWord;
function HIDInsertSignedField(Field:PHIDField; Buffer:Pointer; Size:LongWord; Value:LongInt):LongWord;
function HIDInsertUnsignedField(Field:PHIDField; Buffer:Pointer; Size,Value:LongWord):LongWord;
function HIDExtractBitField(Field:PHIDField; Buffer:Pointer; Size:LongWord; var Value:Boolean):LongWord;
function HIDExtractSignedField(Field:PHIDField; Buffer:Pointer; Size:LongWord; var Value:LongInt):LongWord;
function HIDExtractUnsignedField(Field:PHIDField; Buffer:Pointer; Size:LongWord; var Value:LongWord):LongWord;
HID Device functions
function HIDDeviceSetState(Device:PHIDDevice; State:LongWord):LongWord;
function HIDDeviceGetIdle(Device:PHIDDevice; var Duration:Word; ReportId:Byte):LongWord;
function HIDDeviceSetIdle(Device:PHIDDevice; Duration:Word; ReportId:Byte):LongWord;
function HIDDeviceGetReport(Device:PHIDDevice; ReportType,ReportId:Byte; ReportData:Pointer; ReportSize:LongWord):LongWord;
function HIDDeviceSetReport(Device:PHIDDevice; ReportType,ReportId:Byte; ReportData:Pointer; ReportSize:LongWord):LongWord;
function HIDDeviceAllocateReport(Device:PHIDDevice; Collection:PHIDCollection; ReportId:Byte; ReportSize:LongWord):LongWord;
function HIDDeviceReleaseReport(Device:PHIDDevice; ReportId:Byte):LongWord;
function HIDDeviceSubmitReport(Device:PHIDDevice; ReportId:Byte):LongWord;
function HIDDeviceCancelReport(Device:PHIDDevice; ReportId:Byte):LongWord;
function HIDDeviceGetProtocol(Device:PHIDDevice; var Protocol:Byte):LongWord;
function HIDDeviceSetProtocol(Device:PHIDDevice; Protocol:Byte):LongWord;
function HIDDeviceGetInterval(Device:PHIDDevice; var Interval:LongWord):LongWord;
function HIDDeviceSetInterval(Device:PHIDDevice; Interval:LongWord):LongWord;
function HIDDeviceGetReportDescriptor(Device:PHIDDevice; Descriptor:PHIDReportDescriptor; Size:LongWord):LongWord;
function HIDDeviceGetPhysicalDescriptorSet0(Device:PHIDDevice; Descriptor:PHIDPhysicalDescriptorSet0):LongWord;
function HIDDeviceGetPhysicalDescriptorSet(Device:PHIDDevice; Descriptor:PHIDPhysicalDescriptorSet; Index:Byte; Size:LongWord):LongWord;
function HIDDeviceBindDevice(Device:PHIDDevice):LongWord;
function HIDDeviceUnbindDevice(Device:PHIDDevice; Consumer:PHIDConsumer):LongWord;
function HIDDeviceBindCollections(Device:PHIDDevice):LongWord;
function HIDDeviceUnbindCollections(Device:PHIDDevice; Consumer:PHIDConsumer):LongWord;
function HIDDeviceCreateEx(Size:LongWord):PHIDDevice;
function HIDDeviceDestroy(Device:PHIDDevice):LongWord;
function HIDDeviceRegister(Device:PHIDDevice):LongWord;
function HIDDeviceDeregister(Device:PHIDDevice):LongWord;
function HIDDeviceFind(HIDId:LongWord):PHIDDevice;
function HIDDeviceFindByName(const Name:String):PHIDDevice; inline;
function HIDDeviceFindByDescription(const Description:String):PHIDDevice; inline;
function HIDDeviceEnumerate(Callback:THIDDeviceEnumerate; Data:Pointer):LongWord;
function HIDDeviceNotification(Device:PHIDDevice; Callback:THIDDeviceNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
HID consumer functions
function HIDConsumerCreateEx(Size:LongWord):PHIDConsumer;
function HIDConsumerDestroy(Consumer:PHIDConsumer):LongWord;
function HIDConsumerRegister(Consumer:PHIDConsumer):LongWord;
function HIDConsumerDeregister(Consumer:PHIDConsumer):LongWord;
function HIDConsumerFind(ConsumerId:LongWord):PHIDConsumer;
function HIDConsumerFindByName(const Name:String):PHIDConsumer; inline;
function HIDConsumerEnumerate(Callback:THIDConsumerEnumerate; Data:Pointer):LongWord;
HID helper functions
function HIDIsBitField(Field:PHIDField):Boolean;
function HIDIsByteField(Field:PHIDField):Boolean;
function HIDIsWordField(Field:PHIDField):Boolean;
function HIDIsLongField(Field:PHIDField):Boolean;
function HIDIsSignedField(Field:PHIDField):Boolean;
function HIDPageToString(Page:Word):String;
function HIDUsageToString(Page,Usage,Count:Word):String;
function HIDUnitTypeToString(UnitType:LongWord):String;
function HIDReportKindToString(Kind:Byte):String;
function HIDReportFlagsToString(Flags:LongWord):String;
function HIDCollectionFlagsToString(Flags:LongWord):String;
procedure HIDLog(Level:LongWord; Device:PHIDDevice; const AText:String);
procedure HIDLogInfo(Device:PHIDDevice; const AText:String); inline;
procedure HIDLogWarn(Device:PHIDDevice; const AText:String); inline;
procedure HIDLogError(Device:PHIDDevice; const AText:String); inline;
procedure HIDLogDebug(Device:PHIDDevice; const AText:String); inline;
HID device helper functions
function HIDDeviceCheck(Device:PHIDDevice):PHIDDevice;
function HIDDeviceTypeToString(HIDType:LongWord):String;
function HIDDeviceStateToString(HIDState:LongWord):String;
function HIDDeviceStateToNotification(State:LongWord):LongWord;
HID consumer helper functions
function HIDConsumerGetCount:LongWord; inline;
function HIDConsumerCheck(Consumer:PHIDConsumer):PHIDConsumer;
Return to Unit Reference