31.08.2013 Views

HID Sensor Usage Tables - USB.org

HID Sensor Usage Tables - USB.org

HID Sensor Usage Tables - USB.org

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

60 <strong>HID</strong> <strong>Sensor</strong> <strong>Usage</strong>s<br />

3.4 <strong>HID</strong> Reports<br />

<strong>HID</strong> communication transactions are accomplished by transferring Reports. On the <strong>USB</strong> bus, every <strong>HID</strong><br />

Report begins with a SETUP packet on the Control Pipe, followed by a DATA packet on the Control Pipe,<br />

Input Pipe, or Output Pipe. Inside the SETUP packet are some fields that indicate:<br />

The <strong>HID</strong>-protocol request transfer type, such as GET_REPORT or SET_REPORT;<br />

The report type, such as Input, Output, or Feature;<br />

A numeric identifier for the report, called a Report ID, which is always the first byte of the of the<br />

DATA packet;<br />

The total length of the DATA packet (actual length sent, or expected length desired to receive).<br />

On other busses, this discriminating information may be transmitted in a slightly different manner.<br />

See Also<br />

For more information about SETUP packets; please refer to Section 9.3 of the Universal Serial Bus<br />

Specification (Reference Document [1]).<br />

For more information about <strong>HID</strong> Reports; please refer to Sections 5.2, 5.6, 7.2.1, and 7.2.2 of the Device<br />

Class Definition for Human Interface Devices specification (Reference Document [2]).<br />

The combination of the transfer type and report type determine the nature of the communication<br />

transaction, as summarized in the following table.<br />

Report Type Transfer for a GET_REPORT Transfer for a SET_REPORT<br />

Input Via: <strong>HID</strong> Interrupt In Pipe<br />

Data Direction: Device Host<br />

“<strong>HID</strong> GET INPUT REPORT”<br />

N/A<br />

Output N/A Via: <strong>HID</strong> Interrupt Out pipe<br />

Data Direction: Host Device<br />

“<strong>HID</strong> SET OUTPUT REPORT”<br />

Feature Via: Control pipe<br />

Via: Control pipe<br />

Data Direction: Device Host Data Direction: Host Device<br />

“<strong>HID</strong> GET FEATURE REPORT” “<strong>HID</strong> SET FEATURE REPORT”<br />

3.5 <strong>HID</strong> Report IDs<br />

Table 6. <strong>HID</strong> Transfer and Report Types<br />

The first byte of each report (byte position 0) is always the Report ID, which is used to differentiate reports<br />

from one another. Report IDs are assigned by the device implementer.<br />

For a sensor physical device which represents more than one logical device, each of the logical devices<br />

must have a disjoint set of Report IDs. This can be done by judiciously assigning ranges of Report ID<br />

numbers for each logical device. The following table shows an example of only one of many possible<br />

Report ID allocation schemes that an implementer may choose.<br />

Logical sensor device Report ID range<br />

First 0x10 – 0x1f<br />

Second 0x20 – 0x2f

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!