Difference between revisions of "Unit HID"

From Ultibo.org
Jump to: navigation, search
Line 36: Line 36:
 
----
 
----
  
''To be documented''
+
 
 +
'''HID logging'''
 +
 
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>HID_DEFAULT_LOG_LEVEL:LongWord = HID_LOG_LEVEL_DEBUG;</code>
 +
| style="width: 40%;"|Minimum level for HID messages. Only messages with level greater than or equal to this will be printed.
 +
|-
 +
|}
 +
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;"
 +
|-
 +
| <code>HID_LOG_ENABLED:Boolean;</code>
 +
| style="width: 40%;"|
 +
|-
 +
|}
 +
<br />
  
 
=== Function declarations ===
 
=== Function declarations ===

Revision as of 23:03, 27 October 2022

Return to Unit Reference


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


To be documented

Type definitions


To be documented

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


To be documented


Return to Unit Reference