HID - Keyboard键盘和Mouse鼠标实例

来源:互联网 发布:c语言交换值流程图 编辑:程序博客网 时间:2024/05/18 20:35
hid报告描述符生成工具Dt.exe以及hid-keyboard键盘和mouse鼠标实例
报告描述符范例

    

     

 

  

Usage Page (Generic Desktop),

0x0105

Usage Page (Generic Desktop),

0x0105

Usage (Keyboard),

0x0609

Usage (Mouse),

0x0209

Collection (Application),

0x01A1

Collection (Application),

0x01A1

Usage Page (Keyboard),

0x0705

Usage (Pointer),

0x0109

Usage Minimum (224),

0xE019

Collection (Physical),

0x00A1

Usage Maximum (231),

0xE729

Usage Page (Buttons),

0x0905

Logical Minimum (0),

0x0015

Usage Minimum (1),

0x0119

Logical Maximum (1),

0x0125

Usage Maximum (3),

0x0329

Report Size (1),

0x0175

Logical Minimum (0),

0x0015

Report Count (8),

0x0895

Logical Maximum (1),

0x0125

Input (Data, Variable, Absolute),

0x0281

Report Size (1),

0x0175

Report Size (8),

0x0875

Report Count (3),

0x0395

Report Count (1),

0x0195

Input (Data, Variable, bsolute),

0x0281

Input (Constant),

0x0181

Report Size (5),

0x0575

Usage Minimum (0),

0x0019

Report Count (1),

0x0195

Usage Maximum (101),

0x6529

Input (Constant),

0x0181

Logical Minimum (0),

0x0015

Usage Page (Generic Desktop),

0x0105

Logical Maximum (101),

0x6525

Usage (X),

0x3009

Report Size (8),

0x0875

Usage (Y),

0x3109

Report Count (6),

0x0695

Logical Minimum (-127),

0x8115

Input (Data, Array),

0x0081

Logical Maximum (127),

0x7F25

Usage Page (LEDs),

0x0805

Report Size (8),

0x0875

Usage Minimum (1),

0x0119

Report Count (2),

0x0295

Usage Maximum (5),

0x0529

Input (Data, Variable, Relative),

0x0681

Logical Minimum (0),

0x0015

End Collection,

0xC0

Logical Maximum (1),

0x0125

End Collection

0xC0

Report Size (1),

0x0175

 

 

Report Count (5),

0x0595

 

 

Output (Data, Variable,Absolute),

0x0291

 

 

Report Size (3),

0x0375

 

 

Report Count (1),

0x0195

 

 

Output (Constant),

0x0191

 

 

End Collection

0xC0

 

 



http://www.usb.org/developers/hidpage/#Class_Definition


HID Information

HID Related Specifications

  • Device Class Definition for Human Interface Devices (HID)
  • HID Usage Tables
  • Approved Usage Table Review Requests
  • Monitor Device Class Definition
  • Point of Sale Usage Tables
  • OAAD Arcade Usage Tables
  • Gaming Standards Association Gaming Device Standards
  • Usage Tables for HID Power Devices
  • Usage Tables for Physical Interface Devices
  • Microsoft Related HID Documentation

HID Resources

  • HID White Papers
  • HID Descriptor Tool
  • HIDView
  • HID FAQ
  • Unicode
 

 

HID Related Specifications

Device Class Definition HID
The Device Class Definition for HID 1.11is intended to supplement the USB Specification and provide HIDmanufacturers with the information necessary to build USB-compatibledevices. It also specifies how the HID class driver should extract datafrom USB devices. The primary and underlying goals of the HID classdefinition are to:

  • be as compact as possible to save device data space
  • allow the software application to skip unknown information
  • be extensible and robust
  • support nesting and collections
  • be self-describing to allow generic software applications

HID Usage Tables
The HID Usage Tables 1.12 documentdefines constants that can be interpreted by an application to identifythe purpose and meaning of a data field in a HID report.

Usages are also used to define the meaning of groups of related dataitems. This is accomplished by the hierarchical assignment of usageinformation to collections.

Usages identify the purpose of a collection and the items itcontains. Each Input, Output, Feature, and/or Collection data itemwithin a Collection item can be assigned a purpose with its own usageitem. Usages assigned to a collection apply to the items within thecollection.

The HID Usage Tables document contains extensions to the tablesdefined in the USB Device Class Definition for Human Interface Devices.All usages pages, except the Keyboard table, are replicated in theUsage Table document. The Usage Table document identifies theextensions to the Keyboard usage table.

Note: For keyboards, look at the usage table sections in both the HID Specification and the HID Usage Table document!

Approved Usage Table Review Requests

Thefollowing HID Usage Table Review Requests have been approved forimplementation by the USB Device Working Group HID Committee. TheseReview requests assign enumeration values and recommended meaning tonew Usages allocated after the publication of the HID Usage Tablesv1.12. Please note that the creation of a new Usage does not implysupport for that Usage by any USB HID Host vendor.

     Review Request 28:  Creation of a Usage Page for the Gaming Standards Association
     Review Request 29:  Repurposingthe Alphanumberic Display Page (0x14) as a generic Auxiliary DisplayPage and adding bitmap and custom segment capabilities
     Review Request 30:  Touch digitizers
     Review Request 31:  Background Events application collection
     Review Request 32:  Dual-Mode Telephone devices
     Review Request 33:  Water cooling and computer chassis
     Review Request 34:  Multi-touch digitizers
     Review Request 35:  Consumer electronics devices (PiP Toggle, PiP-swap)
     Review Request 36:  Consumer electronics devices (Color buttons)

Usage Tables for Physical Interface Devices
The Device Class Definition for PID 1.0provides information for the development of Physical Interface Devices.These devices include force feedback joysticks, steering wheels, etc.It allows peripheral and driver developers to use a common set of HIDreport descriptors, device usages and reports to describe thecharacteristics of a PID class device.

Usage Tables for HID Power Devices
The Usage Tables for HID Power Devices 1.0specification provides information to guide implementers in using theUSB logical structures for Power Devices, OS designers, BIOS designers,and peripheral and UPS designers can use the common descriptors, of USBPower Device Usages and Reports.

Monitor Control Class Specification
The Monitor Control Class 1.0 specification defines how a monitor with a USB Monitor Control interface interacts with a USB-enabled host system.

HID Point Of Sale Usage Tables
The HID Point Of Sale Usage Tables 1.02 document defines usages that apply to Point of Sale devices, in particular Barcode Scanners and Scales.

OAAD Arcade Usage Table
The OAAD Arcade Usage Tabledocument defines usages for coin changers, general purpose digitalinputs and outputs, and other devices used in arcade products.

Gaming Standards Association Gaming Device Standards
The GamingStandards Association defines HID Usages and HID Reports used in theimplementation of GSA-compliant Gaming Devices such as currencyhandlers, gaming-specific printers, etc. Their standards relating toUSB HID implementations can be found here.

Microsoft Related HID Documentation
The Microsoft Related HID Documentationpage contains links to documentation on Microsoft's site geared towardsHID implementation, device class support, devices, etc.

HID Resources

HID Descriptor Tool
Thistool allows you to create, edit and validate HID Report Descriptors.The tool also supports a variety of output formats (.txt, .inc, .h,etc.). DT uses ASCII based Usage Tables and supports vendor definedpages as well. Included are Usage Table files for the HID Usage Tabledocument 1.0 Release Candidate 1, Monitor Class 1.0 Release Candidate2, and Power Class Spec. Read the included README.TXT file for moreinformation.

HIDView
This program, found in the USBCheck, is now obsolete. Its replacement is USBCV.

HID White Papers

  • An Analysis of Wireless Device Implementations on USB
  • HID Parser Error Checking  

HID FAQ
A FAQ with questions and answers regarding hid and hid usage. 

Unicode
The Unicode web site ( www.unicode.org)allows you to download the latest character tables for free. Check itbefore you finalize a design because new ones are always in process.
TheNadine Kano book, "Developing International Software" which was used askey reference for Unicode, is out of print. It can still be obtained ina CD-ROM version as part of the Microsoft Developers Network (MSDN)subscription. Subscription information can be obtained at the MSDN website (msdn.microsoft.com). Or it can be accessed for free online at the MSDN Library. The book can be found under "Books / Developing International Software".
To get the latest LANGID definitions go to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_8xo3.asp . This page will change as new LANGIDs are added.
Notethat the HID Primary LANGID (0x0FF) is not on the above list, howeverit is permanently reserved and will never be reassigned.

Please send your URLs to hidcomments@usb.org


 

 原文地址http://www.usb.org/developers/hidpage/#Class_Definition