Unit USBHID

From Ultibo.org
Revision as of 05:12, 14 October 2022 by Ultibo (Talk | contribs)

Jump to: navigation, search

Return to Unit Reference


Description


Ultibo USB Human Interface Device (HID) Driver unit

The USB Human Interface Device (HID) class is one of the most widely used classes of USB devices. HID devices can appear as keyboard, mice, touch devices, gamepads, joysticks and many more.

Importantly HID devices can appear as controls within other devices, for example a USB headset can describe the volume and mute buttons as a HID device and a generic driver can recognize it without the need for a custom driver.

Unlike other USB devices where either an entire device or an interface on a device is used to provide a specific function, the HID standard allows multiple devices to coexist on the same interface. So a mouse and keyboard could be defined on a single USB interface and the HID implementation is able to route the reports they generate to the correct consumer.

Some HID devices (such as proprietary game devices) may require more specific handling than can be provided by the generic device infrastructure included in this unit.

In those cases a standard USB driver can be developed which claims the entire device by vendor and product (as USB offers the complete device to all drivers first). The driver can then configure the device as required and is able to use some of the services of both this unit and the HID unit to parse and examine the HID report descriptors.

Alternatively a HID consumer can be developed that claims the HID device during the optional HID DeviceBind callback which prevents other consumers from binding to the HID collections it contains. The consumer can then use some or all of the services of this unit and the HID unit to handle the HID report descriptors when dealing with reports received from the device.

Constants


To be documented

Type definitions


To be documented

Public variables


None defined

Function declarations


To be documented


Return to Unit Reference