5
HID USAGES
HID devices send data in reports. Elements of data in a report are identified by unique
identifiers called usages. The structure of the device’s reports and the device’s
capabilities are reported to the host in a report descriptor. The host usually gets the
report descriptor only once, right after the device is plugged in. The report descriptor
usages identify the devices capabilities and report structures. For example, a device
could be identified as a keyboard by analyzing the device’s report descriptor. Usages
are four byte integers. The most significant two bytes are called the usage page and the
least significant two bytes are called usage IDs. Usages that are related can share a
common usage page. Usages can be standardized or they can be vendor defined.
Standardized usages such as usages for mice and keyboards can be found in the HID
Usage Tables document and can be downloaded free at
www.usb.org
. Vendor defined
usages must have a usage page in the range 0xff00 – 0xffff. All usages for this device
use vendor defined relay controller usage page 0xff00.
The usage IDs for this device are defined in the following table. The usage types are
also listed. These usage types are defined in the HID Usage Tables document.
Relay Controller usage page 0xff00:
Usage ID
(Hex)
Usage Name
Usage Type Report Type
1
Relay Controller device
Collection
None
1
Status
Data
Input
2
Operational commands
Data
Output
3
Configuration message
Data
Feature
REPORT DESCRIPTOR
The HID report descriptor is structured as follows:
Item
Value (Hex)
Usage Page (Relay Controller)
06 00 FF
Usage (Relay Controller device)
09 01
Collection (Application)
A1 01
Globals
Logical Minimum (0)
15 00
Logical Maximum (255)
26 FF 00
Report Size (8)
75 08
Input Report
Usage (Status)
09 01
Report Count (8)
95 08
Input (Data, Variable, Absolute, Bitfield)
81 02