windowshid IIC通讯协议_第1页
windowshid IIC通讯协议_第2页
windowshid IIC通讯协议_第3页
windowshid IIC通讯协议_第4页
windowshid IIC通讯协议_第5页
已阅读5页,还剩69页未读 继续免费阅读

windowshid IIC通讯协议.pdf 免费下载

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、MicrosoftMicrosoftMicrosoftMicrosoft CorporationCorporationCorporationCorporation Version 1.00 HIDHIDHIDHIDOverOverOverOver I I I I2 2 2 2C C C CProtocolProtocolProtocolProtocol SpecificationSpecificationSpecificationSpecification DeviceDeviceDeviceDeviceSideSideSideSide FredFredFredFredBhesaniaBhes

2、aniaBhesaniaBhesania (Last updated on: April 24, 2012) HID over I2C Protocol Specification Copyright 2012 - Microsoft Corporation Page 错误!未定义书签。错误!未定义书签。 of 74 2012 Microsoft Corporation. All rights reserved. This specification is provided under the Microsoft Community Promise. For further details o

3、n the Microsoft Community Promise, please refer to: Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in these materials. Except as expressly provided in the Microsoft Community Promise, the furnishing of these mate

4、rials does not give you any license to these patents, trademarks, copyrights, or other intellectual property. HID over I2C Protocol Specification Copyright 2012 - Microsoft Corporation Page 错误!未定义书签。错误!未定义书签。 of 74 TableTableTableTableofofofofContentsContentsContentsContents 1Preface.5 1.1Version Hi

5、story.5 1.2Definitions. 6 1.3Document Conventions.7 1.4Related Documents.8 2Introduction.9 3Scenarios. 10 4I2C Specific Details.12 4.1Bus Speeds.12 4.2Schematic Layout. 13 4.3Byte Ordering. 13 4.4Overall HID I2C Efficiency.14 5Descriptors. 16 5.1HID Descriptor.16 5.1.1HID Descriptor Format.16 5.1.2H

6、ID Descriptor Retrieval.19 5.2Report Descriptor.20 5.2.1Report Descriptor Format. 20 5.2.2Report Descriptor Retrieval.21 6Report Protocol.22 6.1Input Reports.22 6.1.1Single Top Level Collections. 22 6.1.2Multiple Top Level Collections. 23 6.1.3Retrieval of Input Reports.24 6.2Output Reports.25 6.2.1

7、Single Top Level Collections. 25 6.2.2Multiple Top Level Collections. 25 6.2.3Sending Output Reports.26 6.3Feature Reports.26 HID over I2C Protocol Specification Copyright 2012 - Microsoft Corporation Page 错误!未定义书签。错误!未定义书签。 of 74 6.3.1Getting and Setting Feature Reports.26 7Requests.27 7.1Registers

8、.27 7.1.1Command Register.27 7.1.2Data Register.29 7.2Class Specific Requests.30 7.2.1RESET.31 7.2.2GET_REPORT.34 7.2.3SET_REPORT. 37 7.2.4GET_IDLE. 40 7.2.5SET_IDLE.42 7.2.6GET_PROTOCOL.44 7.2.7SET_PROTOCOL. 46 7.2.8SET_POWER.48 7.2.9RESERVED COMMAND RANGE.50 7.3Interrupt Servicing.51 7.4Interrupt

9、Line Management.51 8Power Management.52 8.1DEVICE Initiated Power Optimizations (DIPO). 52 8.2HOST Initiated Power Optimizations (HIPO).53 9Error Handling. 55 9.1Protocol Errors.55 9.1.1Short packet Errors.55 9.1.2Bit Level Errors.55 9.2Timeout Errors.56 10ACPI Specific Details.57 10.1ACPI Extension

10、s around HID.57 11Sizes and Constants.58 12Spec Update Summary.59 12.1Updates Between V0.9 - V0.91:. 59 12.2Updates Between V0.91 - V1.0:. 59 13Example: Sample Accelerometer Sensor.60 HID over I2C Protocol Specification Copyright 2012 - Microsoft Corporation Page 错误!未定义书签。错误!未定义书签。 of 74 13.1ASL Lay

11、out.60 13.2HID Descriptor.62 13.3HID Descriptor Retrieval.62 13.4Report Descriptor.63 13.5Report Descriptor Retrieval.64 13.6Reports.65 13.7Reading an Input Report. 65 HID over I2C Protocol Specification Copyright 2012 - Microsoft Corporation Page 错误!未定义书签。错误!未定义书签。 of 74 1PREFACEPREFACEPREFACEPREFA

12、CE The Human Interface Device protocol was first defined for USB attached input devices (e.g. keyboards, mice, remote controls, buttons, etc.). The protocol itself is bus agnostic and has been ported across other transports, including Bluetooth and other wired and wireless technologies. This specifi

13、cation document will build on the USB defined specification and identify the protocol, procedures and features for simple input devices to talk HID over I2C. This specific document will provide details on the DEVICE side of the protocol. Details on HOST side optimizations are captured in a separate

14、specification. 1.1 VERSIONVERSIONVERSIONVERSION HISTORYHISTORYHISTORYHISTORY DateChanges May 12, 2010First Draft and overall layout identified Oct 6, 2010Added Descriptors Section and necessary data structures Dec 10, 2010V0.5 Draft with initial feedback from team. Jan 10, 2011V0.6 Reviewed and prot

15、otyped input reports and descriptors Jan 27, 2011V0.7 Draft ready for internal MSFT review. Feb 28, 2011V0.75 Power, partner feedback, samples added Mar 18, 2011V0.8 Power, Error Handling and internal team review feedback May 20, 2011V0.81 Address partner feedback and protocol diagrams Oct 31, 2011V

16、0.9 Extended HID Descriptor, ACPI changes, example updates. Jan 30, 2012V0.91 Fixed Errors, Get/Set_Report with Write-Read format dependent on context bcdbinary-coded decimal ddescriptor iindex wword bValueItems inside square brackets are optional. Ellipses in syntax, code, or samples indicate and s

17、o on. where additional optional items may be included (defined by the developer). this (0) | that (1)Braces and a vertical bar indicate a choice between two or more items or associated values. Collection End Collection This font (Courier) is used for code, report descriptor, pseudo-code, and samples

18、. This document is intended to provide a set of general and unambiguous rules for implementing the HID protocol over IC for a DEVICE, with the goals of hardware software compatibility (including software reuse), performance and power management. In this specification document, the following symbols

19、are used to identify required and optional features. SymbolDescription MMandatory to support in hardware and software HID over I2C Protocol Specification Copyright 2012 - Microsoft Corporation Page 错误!未定义书签。错误!未定义书签。 of 74 OOptional to support in hardware and/or in software CConditional support (req

20、uired to fully implement an optional feature) 1.4 RELATEDRELATEDRELATEDRELATED DOCUMENTSDOCUMENTSDOCUMENTSDOCUMENTS The following are related documents and provide guidance and background on HID. Specification Name Specification LocationNotes HID over USB is the first document that a new reader shou

21、ld review. HID over Bluetooth a mapping of HID to a wireless transport (Bluetooth). HID Usage Tables a summary of the Usage Tables that can be leveraged over any transport. I2C Specification User Manual 0204.pdf Specification that identifies how the I2C bus works at a protocol level. ACPI 5.0 Specif

22、ication and Overview /spec.htmThis specification describes the structures for example, standard mouse devices, trackballs, and joysticks Front-panel controls; for example, knobs, switches, buttons, and sliders Controls that might be found on devices such as telephones, VCR remote cont

23、rols, games or simulation devices; for example, data gloves, steering wheels, phones keypads and rudder pedals Devices that may not require human interaction but provide data in a similar format to HID class devices; for example, bar-code readers, thermometers or other forms of sensors. The HID prot

24、ocol was originally targeted at human interface devices; however, HID protocol is very useful for any application that requires low-latency input-output operations to an external interface, and the ability for that device to describe itself. Many typical HID class devices include indicators, special

25、ized displays, audio feedback, and force or tactile feedback. The HID protocol is an asymmetric protocol that identifies roles for the HOSTHOSTHOSTHOSTand the DEVICEDEVICEDEVICEDEVICE. The protocol will define a format (DescriptorsDescriptorsDescriptorsDescriptors) for the DEVICE to describe its cap

26、abilities to the HOST. Once the HOST understands the format of communication with the DEVICE, it programs the DEVICE for sending data back to the HOST. The HID protocol also identifies ways of sending data to the DEVICE as well as status checks for identifying the current state of the device. The re

27、mainder of this protocol specification is broken out in to the following parts ScenariosScenariosScenariosScenarios A brief description of the potential scenarios and the goals of this specification to address existing problems around these scenarios DescriptorsDescriptorsDescriptorsDescriptors A su

28、mmary of the data elements that will be exchanged between the HOST and the DEVICE to enable enumeration and device identification. ReportsReportsReportsReports A summary of data elements that will be exchanged between the HOST and the DEVICE to enable transfer of data in the form of INPUT and OUTPUT

29、 reports. RequestsRequestsRequestsRequests A summary of the commands and response between the HOST and the DEVICE. HID over I2C Protocol Specification Copyright 2012 - Microsoft Corporation Page 错误!未定义书签。错误!未定义书签。 of 74 PowerPowerPowerPowerManagementManagementManagementManagementandandandand ErrorEr

30、rorErrorErrorCorrectionCorrectionCorrectionCorrection A summary on the different commands that are sent from HOST to DEVICE to set/get state information and to address any protocol errors that may occur over the selected transport. The Appendix section provides examples and for a specific device end

31、 to end. HID over I2C Protocol Specification Copyright 2012 - Microsoft Corporation Page 错误!未定义书签。错误!未定义书签。 of 74 3SCENARIOSSCENARIOSSCENARIOSSCENARIOS The following section provides example of user and developer scenarios that are addressed via this protocol specification. DEVICEDEVICEDEVICEDEVICEH

32、ardwareHardwareHardwareHardwareDeveloperDeveloperDeveloperDeveloper ScenarioScenarioScenarioScenario(Basic(Basic(Basic(BasicHIDHIDHIDHIDTouchpad)Touchpad)Touchpad)Touchpad) The following is a scenario that demonstrates the value of HID over I2C from the perspective of an independent hardware vendor

33、(IHV). Imagine a scenario where a device IHV needs to port their existing HID touchpad from one bus to a different bus. The example is one for a touchpad controller that used to initially be connected over USB (leveraging HID) and now can be easily migrated to I2C, while still leveraging HID and thi

34、s new standard. The expected experience and the associated benefits are as follows: The HID descriptor and the report descriptor can remain analogous from an application compatibility perspective. HOST software is responsible for maintaining application compatibility. Do note that the HID Descriptor

35、 fields in this specification do not need to be identical to the HID Descriptor fields in the USB HID specification or the Bluetooth HID specification. A singular driver is needed to channel the HID reports and descriptor sets from I2C and pass the data to higher level software. This driver could be

36、 provided by the manufacturer of the chipset or could be a class driver that is written once for an advanced operating system. Existing software, that understands HID reports, does not need to be modified to read the HID reports that are sent over I2C SystemSystemSystemSystemIntegratorIntegratorIntegratorIntegratorScenarioScenarioScenarioScenario(HID(HID(HID(HIDSensor)Sensor)Sensor)Sensor) Consider a scenario where a System Integrator needs to select a sen

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论