Difference between revisions of "Unit HID"
(12 intermediate revisions by the same user not shown) | |||
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"| | ||
+ | |- | ||
+ | |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"| | ||
+ | |- | ||
+ | |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 Button 1 to Button 65535 | ||
+ | |- | ||
+ | | <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 digitizers (Partial)''' <code> HID_DIGITIZERS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_UNDEFINED = $00;</code> | ||
+ | | Undefined | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_DIGITIZER = $01;</code> | ||
+ | | Digitizer | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_PEN = $02;</code> | ||
+ | | Pen | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_LIGHT_PEN = $03;</code> | ||
+ | | Light Pen | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_TOUCH_SCREEN = $04;</code> | ||
+ | | Touch Screen | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_TOUCH_PAD = $05;</code> | ||
+ | | Touch Pad | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_WHITEBOARD = $06;</code> | ||
+ | | Whiteboard | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_COORD_MEASURING = $07;</code> | ||
+ | | Coordinate Measuring Machine | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_3D_DIGITIZER = $08;</code> | ||
+ | | 3D Digitizer | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_STEREO_PLOTTER = $09;</code> | ||
+ | | Stereo Plotter | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_ARTICULATED_ARM = $0A;</code> | ||
+ | | Articulated Arm | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_ARMATURE = $0B;</code> | ||
+ | | Armature | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_MULTI_POINT_DIGITIZER = $0C;</code> | ||
+ | | Multiple Point Digitizer | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_FREE_SPACE_WAND = $0D;</code> | ||
+ | | Free Space Wand | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_DEVICE_CONFIGURATION = $0E;</code> | ||
+ | | Device Configuration | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_CAPACITIVE_HEAT_MAP = $0F;</code> | ||
+ | | Capacitive Heat Map Digitizer | ||
+ | |- | ||
+ | |colspan="2"|''0x10-0x1F Reserved'' | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_STYLUS = $20;</code> | ||
+ | | Stylus | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_PUCK = $21;</code> | ||
+ | | Puck | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_FINGER = $22;</code> | ||
+ | | Finger | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_DEVICE_SETTINGS = $23;</code> | ||
+ | | Device settings | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_CHARACTER_GESTURE = $24;</code> | ||
+ | | Character Gesture | ||
+ | |- | ||
+ | |colspan="2"|''0x25-0x2F Reserved'' | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_TIP_PRESSURE = $30;</code> | ||
+ | | Tip Pressure | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_BARREL_PRESSURE = $31;</code> | ||
+ | | Barrel Pressure | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_IN_RANGE = $32;</code> | ||
+ | | In Range | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_TOUCH = $33;</code> | ||
+ | | Touch | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_UNTOUCH = $34;</code> | ||
+ | | Untouch | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_TAP = $35;</code> | ||
+ | | Tap | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_QUALITY = $36;</code> | ||
+ | | Quality | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_DATA_VALID = $37;</code> | ||
+ | | Data Valid | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_TRANSDUCER_INDEX = $38;</code> | ||
+ | | Transducer Index | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_TABLET_FUNCTION_KEYS = $39;</code> | ||
+ | | Tablet Function Keys | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_PROGRAM_CHANGE_KEYS = $3A;</code> | ||
+ | | Program Change Keys | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_BATTERY_STRENGTH = $3B;</code> | ||
+ | | Battery Strength | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_INVERT = $3C;</code> | ||
+ | | Invert | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_X_TILT = $3D;</code> | ||
+ | | X Tilt | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_Y_TILT = $3E;</code> | ||
+ | | Y Tilt | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_AZIMUTH = $3F;</code> | ||
+ | | Azimuth | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_ALTITUDE = $40;</code> | ||
+ | | Altitude | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_TWIST = $41;</code> | ||
+ | | Twist | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_TIP_SWITCH = $42;</code> | ||
+ | | Tip Switch | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_SECONDARY_TIP_SWITCH = $43;</code> | ||
+ | | Secondary Tip Switch | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_BARREL_SWITCH = $44;</code> | ||
+ | | Barrel Switch | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_ERASER = $45;</code> | ||
+ | | Eraser | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_TABLET_PICK = $46;</code> | ||
+ | | Tablet Pick | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_TOUCH_VALID = $47;</code> | ||
+ | | Touch Valid (Confidence) | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_WIDTH = $48;</code> | ||
+ | | Width | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_HEIGHT = $49;</code> | ||
+ | | Height | ||
+ | |- | ||
+ | |colspan="2"|''0x4A-0x50 Reserved'' | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_CONTACT_IDENTIFIER = $51;</code> | ||
+ | | Contact Identifier | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_DEVICE_MODE = $52;</code> | ||
+ | | Device Mode | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_DEVICE_IDENTIFIER = $53;</code> | ||
+ | | Device Identifier | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_CONTACT_COUNT = $54;</code> | ||
+ | | Contact Count | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_CONTACT_COUNT_MAXIMUM = $55;</code> | ||
+ | | Contact Count Maximum | ||
+ | |- | ||
+ | | <code>HID_DIGITIZERS_SCAN_TIME = $56;</code> | ||
+ | | Scan Time | ||
+ | |- | ||
+ | |} | ||
+ | </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 === | ||
Line 361: | Line 1,937: | ||
| <code>Index:LongWord;</code> | | <code>Index:LongWord;</code> | ||
| The index of this report in the collection (First report is 0) | | The index of this report in the collection (First report is 0) | ||
+ | |- | ||
+ | | <code>Sequence:LongWord;</code> | ||
+ | | The sequence of this report in all collections (First report is 0) | ||
|- | |- | ||
|colspan="2"| | |colspan="2"| | ||
Line 808: | Line 2,387: | ||
| <code>Next:PHIDConsumer;</code> | | <code>Next:PHIDConsumer;</code> | ||
| Next entry in Consumer table | | Next entry in Consumer table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''HID report extent''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PHIDExtent = ^THIDExtent;</code> | ||
+ | |||
+ | <code>THIDExtent = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Minimum:LongInt;</code> | ||
+ | | The minimum value for this extent | ||
+ | |- | ||
+ | | <code>Maximum:LongInt;</code> | ||
+ | | The maximum value for this extent | ||
|- | |- | ||
|} | |} | ||
Line 851: | Line 2,448: | ||
|colspan="2"| | |colspan="2"| | ||
|- | |- | ||
− | | <code> | + | | <code>Logical:THIDExtent;</code> |
− | | The minimum | + | | The minimum and maximum logical values for this field |
|- | |- | ||
− | | <code> | + | | <code>Physical:THIDExtent;</code> |
− | | The maximum | + | | The minimum and maximum physical values for this field |
|- | |- | ||
| <code>Multiplier:Double;</code> | | <code>Multiplier:Double;</code> | ||
Line 944: | Line 2,541: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function HIDParserParseCollections(Device:PHIDDevice; var Collections:PHIDCollections; var Count:LongWord):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function HIDParserParseCollections(Device:PHIDDevice; var Collections:PHIDCollections; var Count:LongWord):LongWord;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Parse the HID report descriptor of the provided device and | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Parse the HID report descriptor of the provided device and populate the collections, reports and usages</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
Line 1,063: | Line 2,660: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function HIDParserAllocateReport(Device:PHIDDevice; Collection:PHIDCollection; State:PHIDState; Kind:Byte; Flags,Index:LongWord):PHIDReport;</pre> | + | <pre style="border: 0; padding-bottom:0px;">function HIDParserAllocateReport(Device:PHIDDevice; Collection:PHIDCollection; State:PHIDState; Kind:Byte; Flags,Index,Sequence:LongWord):PHIDReport;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Allocate a HID report to contain a set of usages from a HID report descriptor</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Allocate a HID report to contain a set of usages from a HID report descriptor</div> | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
Line 1,085: | Line 2,682: | ||
! Index | ! Index | ||
| The index of this report in the collection (First report is 0) | | The index of this report in the collection (First report is 0) | ||
+ | |- | ||
+ | ! Sequence | ||
+ | | The sequence of this report in all collections (First report is 0) | ||
|- | |- | ||
! Return | ! Return | ||
Line 1,139: | Line 2,739: | ||
! Note | ! Note | ||
| As usages must precede the main item they relate to in the HID report descriptor they need to be allocated before all the required information is known, this function updates the usage after the main item is found. | | As usages must precede the main item they relate to in the HID report descriptor they need to be allocated before all the required information is known, this function updates the usage after the main item is found. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function HIDParserFreeUsage(Device:PHIDDevice;Usage:PHIDUsage):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Free a HID usage and any associated usage aliases</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Device | ||
+ | | The HID device containing the usage | ||
+ | |- | ||
+ | ! Usage | ||
+ | | The HID usage to free | ||
+ | |- | ||
+ | ! Return | ||
+ | | True if completed or False on error | ||
|- | |- | ||
|} | |} | ||
Line 1,262: | Line 2,880: | ||
! Return | ! Return | ||
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function HIDFindReportSizes(Device:PHIDDevice; Collection:PHIDCollection; Kind:Byte; var MinSize,MaxSize:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find the minimum and maximum report sizes contained in the specified HID collection or all collections</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Device | ||
+ | | The HID device to find report sizes from | ||
+ | |- | ||
+ | ! Collection | ||
+ | | The HID collection to find report sizes from (or nil to find from all collections) | ||
+ | |- | ||
+ | ! Kind | ||
+ | | The report kind to find sizes for (eg HID_REPORT_INPUT) | ||
+ | |- | ||
+ | ! MinSize | ||
+ | | A variable to receive the minimum report size | ||
+ | |- | ||
+ | ! MaxSize | ||
+ | | A variable to receive the maximum report size | ||
+ | |- | ||
+ | ! Return | ||
+ | | ERROR_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function HIDCountReports(Device:PHIDDevice; Collection:PHIDCollection; Kind,Id:Byte; var Count:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Count the number of HID reports of the specified type and id in the specified collection</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Device | ||
+ | | The HID device to get the report count from | ||
+ | |- | ||
+ | ! Collection | ||
+ | | The HID collection to get the report count from | ||
+ | |- | ||
+ | ! Kind | ||
+ | | The report kind to count reports for (eg HID_REPORT_INPUT) | ||
+ | |- | ||
+ | ! Id | ||
+ | | The report id to count reports for (must be less than or equal to the maximum report id) | ||
+ | |- | ||
+ | ! Count | ||
+ | | A variable to return the number of reports | ||
+ | |- | ||
+ | ! Return | ||
+ | | ERROR_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function HIDFindReports(Device:PHIDDevice; Collection:PHIDCollection; Kind,Id:Byte; Reports:PHIDReports; Count:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find all HID reports of the specified type and id in the specified collection</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Device | ||
+ | | The HID device to get the reports from | ||
+ | |- | ||
+ | ! Collection | ||
+ | | The HID collection to get the reports from | ||
+ | |- | ||
+ | ! Kind | ||
+ | | The report kind to get reports for (eg HID_REPORT_INPUT) | ||
+ | |- | ||
+ | ! Id | ||
+ | | The report id to get reports for (must be less than or equal to the maximum report id) | ||
+ | |- | ||
+ | ! Reports | ||
+ | | A pointer to an array to return the list of reports | ||
+ | |- | ||
+ | ! Count | ||
+ | | The number of reports able to be returned in the reports array | ||
+ | |- | ||
+ | ! Return | ||
+ | | ERROR_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | ! Note | ||
+ | | The caller is responsible for allocating the reports array which must be large enough to hold a pointer to every report in the returned list. When finished the array should be freed by the caller but not the reports themselves. Call HIDCountReports first to obtain the correct size to be allocated for the array. | ||
|- | |- | ||
|} | |} | ||
Line 1,268: | Line 2,973: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function HIDAllocateDefinition(Device:PHIDDevice; Collection:PHIDCollection; Kind,Id:Byte):PHIDDefinition;</pre> | <pre style="border: 0; padding-bottom:0px;">function HIDAllocateDefinition(Device:PHIDDevice; Collection:PHIDCollection; Kind,Id:Byte):PHIDDefinition;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Allocate a HID | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Allocate a HID definition to describe an input, output or feature report contained in the specified collection</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
Line 1,292: | Line 2,997: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function HIDFreeDefinition(Definition:PHIDDefinition):LongWord;</pre> | <pre style="border: 0; padding-bottom:0px;">function HIDFreeDefinition(Definition:PHIDDefinition):LongWord;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Free a HID definition | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Free a HID definition describing an input, output or feature report</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
Line 2,266: | Line 3,971: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">procedure HIDLogInfo(Device:PHIDDevice; const AText:String) | + | <pre style="border: 0; padding-bottom:0px;">procedure HIDLogInfo(Device:PHIDDevice; const AText:String);</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
Line 2,278: | Line 3,983: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">procedure HIDLogWarn(Device:PHIDDevice; const AText:String) | + | <pre style="border: 0; padding-bottom:0px;">procedure HIDLogWarn(Device:PHIDDevice; const AText:String);</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
Line 2,290: | Line 3,995: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">procedure HIDLogError(Device:PHIDDevice; const AText:String) | + | <pre style="border: 0; padding-bottom:0px;">procedure HIDLogError(Device:PHIDDevice; const AText:String);</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
Line 2,302: | Line 4,007: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">procedure HIDLogDebug(Device:PHIDDevice; const AText:String) | + | <pre style="border: 0; padding-bottom:0px;">procedure HIDLogDebug(Device:PHIDDevice; const AText:String);</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
Line 2,317: | Line 4,022: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function HIDDeviceGetCount:LongWord | + | <pre style="border: 0; padding-bottom:0px;">function HIDDeviceGetCount:LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current HID Device count</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current HID Device count</div> | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
Line 2,380: | Line 4,085: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function HIDConsumerGetCount:LongWord | + | <pre style="border: 0; padding-bottom:0px;">function HIDConsumerGetCount:LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current HID Consumer count</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current HID Consumer count</div> | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> |
Latest revision as of 04:27, 31 January 2024
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_DIGITIZERS_*
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 extent
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,Sequence: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 HIDParserFreeUsage(Device:PHIDDevice;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 HIDFindReportSizes(Device:PHIDDevice; Collection:PHIDCollection; Kind:Byte; var MinSize,MaxSize:LongWord):LongWord;
function HIDCountReports(Device:PHIDDevice; Collection:PHIDCollection; Kind,Id:Byte; var Count:LongWord):LongWord;
function HIDFindReports(Device:PHIDDevice; Collection:PHIDCollection; Kind,Id:Byte; Reports:PHIDReports; Count:LongWord):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 HIDLogError(Device:PHIDDevice; const AText:String);
procedure HIDLogDebug(Device:PHIDDevice; const AText:String);
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 HIDConsumerCheck(Consumer:PHIDConsumer):PHIDConsumer;
Return to Unit Reference