subject: HID Reporting with Windows 7 [print this page] A HID report is used to transmit HID control data to and from an HID Class device. A report descriptor defines the report format. Input and output reports specify control data and feature reports specifying configuration data. When more than one report of the same type is required for a particular device, each report receives a unique report ID. Input and output reports specify HID control data. Input controls include data relevant to an application such as the coordinates of a finger. Output controls are a sink for application data such as lighting up a display or activating a touch sensor. A feature report specifies configuration information for a particular device. A usermode application can obtain feature information by using this report designation.
The HID enumeration requires the device to send an HID descriptor, which contains information about all of the data and its formats. Report descriptors sent to the host determine the report format. All reports are preceded by a report ID, which describes how the host and the device identify the particular report and how data is parsed between multiple reports. Each bit in the report is specified by report size and report count identifiers. For example, a report size of one and a report count of two identify two bits. This example could be the definition of a set of finger touches. To send a complete byte, the report size would be set to eight bits. Formatting the data into reports helps to organize the data in terms of data widths so that the host and end devices know how to parse the data.
Moving up a level, the HID specification defines usages, which are predefined values that tell the host what to do with the data. The host can access the data in the reports for the touch screen in serial mode, parallel mode and hybrid mode. In serial mode, each packet contains a single contact update; only one contact is defined in the report ID. In parallel mode, each packet is wide enough to support the maximum number of contacts that the device can detect. For example, a device that can support a fourfinger multitouch capability would contain four logical collections that report the data for each contact at one time. Each packet in the hybrid mode contains a fixed number of contacts. Multiple packets are sent to deliver the contact data.
Windows 7 includes the HID driver in the operating system to control an HIDcompliant device. The HID descriptors and generated data conform to the HID requirements. Windows 7 offers extended touch features that are automatically enabled for HIDcompliant devices that comply with the core HID and multitouch extensions. The devices must adhere to the standard device class in the HID descriptor, automate descriptor queries, and observe all required HID and multitouch extension usages.