计算机与现代化 ›› 2013, Vol. 1 ›› Issue (7): 172-175,.doi: 10.3969/j.issn.1006-2475.2013.07.045

• 应用与开发 • 上一篇    下一篇

Windows环境下HID设备通讯接口的设计

崔 阳   

  1. 中国劳动关系学院,北京100048
  • 收稿日期:2013-01-22 修回日期:1900-01-01 出版日期:2013-07-17 发布日期:2013-07-17

Design of HID Communication Interface in Windows Environment

CUI Yang   

  1. China Institute of Industrial Relations, Beijing 100048, China
  • Received:2013-01-22 Revised:1900-01-01 Online:2013-07-17 Published:2013-07-17

摘要: 为解决HID设备与主机应用程序的通讯问题,首先对HID设备的性能特点和32位Windows环境下的通讯机制进行了分析,在此基础上设计出一个实用的新型HID设备通讯接口。该接口利用相关Windows API函数实现HID设备的识别、打开和关闭,并以异步模式实现设备与主机应用程序的双向通讯过程。实验编程以Wave Panel为平台,结果证明该通讯接口的通用性较好,能够有效地完成HID设备与主机应用程序的通讯功能。

关键词: USB, HID, 通讯接口, 中断传输, Windows API函数

Abstract: o solve the communication problem between human interface devices (HID) and the computer applications, performance characteristics and the communication mechanism of HID in 32-bit Windows environment are analyzed first, based on that a new and practical communication interface is designed. Related Windows APIs are utilized by the interface to identify, open and close HID, and the two-way communication between HID and computer applications is achieved in asynchronous mode. Wave Panel is taken as experimental platform, and the results show that the interface is of good generality and communication function, it can be better accomplished with it.

Key words: USB, HID, communication interface, interrupt transmission, Windows API