USB human interface device class

USB human interface device class

The USB human interface device class ("USB HID class") is a USB device class that describes human interface devices such as keyboards, mice, game controllers and alphanumeric display devices. The USB HID class is defined in a number of documents provided by the USB Implementers Forum's Device Working Group. The primary document used to describe the USB HID class is the [http://www.usb.org/developers/devclass_docs/HID1_11.pdf Device Class Definition for HID 1.11] . There are a number of [http://www.usb.org/developers/hidpage/ other documents] that describe more specific devices in the HID class.

Devices

The USB HID class describes devices used with nearly every modern computer. Many predefined functions exist in the USB HID class. These functions allow hardware manufacturers to design a product to USB HID class specifications and expect it to work with any software that also meets these specifications.

The same HID protocol is used unmodified in Bluetooth human interface devices. The Bluetooth profile specification only points readers to the USB HID documentation. In this sense those devices also belong to the USB HID class.

Keyboards

Keyboards are some of the most popular USB HID class devices. The USB HID class keyboard has replaced the PS/2 keyboard on most modern computer systems. The USB HID class keyboard is normally designed with an IN endpoint that communicates keystrokes to the computer and an OUT endpoint that communicates the status of the keyboard's LEDs from the computer to the keyboard. The PC 97 standard requires that a computer's BIOS must detect and work with USB HID class keyboards that are designed to be used during the boot process.

Mice

Computer mice are equally popular USB HID class devices. Much like keyboards, USB HID class mice have replaced PS/2 mice on many modern computer systems. USB HID mice can range from single-button simple devices to multi-button compound devices. Most modern operating systems ship with drivers for standard HID mice designs; mice with extended functionality require custom drivers from the manufacturer.

Game controllers

Modern game controllers and joysticks are often USB HID class devices. Unlike legacy game port devices, USB HID class game devices do not normally require proprietary drivers to function. Nearly all game devices will function using onboard drivers as long as the device is designed around the drivers and the USB HID class specifications.

Other devices

The USB HID class specifications allow for myriad other devices under the USB HID class. Some examples are automobile simulation controllers, exercise machines, telephony devices, audio controls, medical instrumentation, and even magic carpet simulators. Even uninterruptible power supplies declare themselves under this class, despite the fact they have no human interface at all. Any device can be a USB HID class device as long as a designer meets the USB HID class logical specifications. This is not to say that there is no need to ship drivers for these devices, nor that an operating system will immediately recognize the device. This only means that the device can declare itself under the human interface device class.

Drivers

One of the benefits of a well-defined specification like the USB HID class is the abundance of device drivers available in most modern operating systems. The USB HID class devices and their basic functions are defined in USB-IF documentation without any specific software in mind. Because of these generic descriptions, it is easy for operating system designers to include functioning drivers for devices such as keyboards, mice, and other generic human interface devices. The inclusion of these generic drivers allows for faster deployment of devices and easier installation by end-users.

Logical specifications

Functional characteristics

The USB human interface device class can be used to describe both device and interface classes. The interface class is used when a USB device can contain more than one function. It is possible, therefore, to have USB devices with two different interfaces at the same time (for example, a USB telephone may use a HID keypad and an audio speaker).

The interface devices are also defined with subclass descriptors. The subclass descriptor is used to declare a device bootable. A boot device meets a minimum adherence to a basic protocol and will be recognized by a computer's BIOS.

Each USB HID interface communicates with the host using either a "control" pipe or an "interrupt" pipe. "Isochronous" and "bulk" pipes are not used in HID class devices. Both IN and OUT control transfers are required for enumeration; only an IN interrupt transfer is required for HID reports. OUT interrupt transfers are optional in HID-class devices.

Reports

It is impossible to accurately predict and define all current and future human interface devices. Because of this, the USB HID class requires that every device describes how it will communicate with the host device. During enumeration the device describes how its reports are to be structured so that the host device can properly prepare to receive this information.

The host periodically polls the device's interrupt IN endpoint during operation. When the device has data to send it forms a report and sends it as a reply to the poll token. Common devices such as keyboards and mice send reports that are well-defined by manufacturers such as [http://www.usb.org/developers/hidpage/microhid/ Microsoft] . When a vendor makes a custom USB HID class device, the reports formed by the device need only match the report description given during enumeration and the driver installed on the host system. In this way it is possible for the USB HID class to be extremely flexible.

USB HID API

The USB HID API is complicated and can be difficult to understand. Despite the complexity, developers who wish to do basic things with the API need only learn a small portion of it. The primary challenge in learning the API lies in determining which parts one needs to use.

There are two levels of APIs related to USB HID: the USB level and the operating system level. At the USB level, there is a protocol for devices to announce their capabilities and the operating system to parse the data it gets. The operating system then offers a higher-level view to applications, which do not need to include support for individual devices but for classes of devices. This abstraction layer allows a game to work with any USB controller, for example, even ones created after the game.

References

* [http://www.beyondlogic.org/usbnutshell/ USB in a Nutshell]

External links

* [http://www.usb.org/home USB.org] - The homepage of the USB Implementers Forum, Inc.
* [http://www.usb.org/developers/hidpage/microhid/ Microsoft Related HID Documentation] - The USB-IF's collection of Microsoft's HID documentation.
* [http://www.usb.org/developers/hidpage/ USB-IF HID Tools] - The USB-IF's page devoted to human interface devices. Includes all approved documentation.
* [http://www.lvr.com/hidpage.htm Lakeview Research HID Page] - A collection of articles about, and example code for USB HID devices.
* [http://www.microsoft.com/whdc/system/platform/pcdesign/desguide/pcguides.mspx PC System Guides] - Microsoft's PC System specifications (e.g. PC '97, PC '98).


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Human interface device — A human interface device or HID is a type of computer device that interacts directly with, and most often takes input from, humans and may deliver output to humans. The term HID most commonly refers to the USB HID specification. The term was… …   Wikipedia

  • USB — This article is about the computer bus to connect peripherals. For other uses of USB, see USB (disambiguation). Universal Serial Bus Original logo Type Computer Hardware Bus …   Wikipedia

  • USB HID — (human interface device) class  класс устройств USB для взаимодействия с человеком. Этот класс включает в себя такие устройства как клавиатура, мышь, игровой контроллер. Класс USB HID определен в нескольких документах, предоставляемых USB… …   Википедия

  • USB — Der Universal Serial Bus (USB) [ˌjuːnɪˈvɜːsl ˈsɪɹiəl bʌs] ist ein serielles Bussystem zur Verbindung eines Computers mit externen Geräten. Mit USB ausgestattete Geräte oder Speichermedien können im laufenden Betrieb miteinander verbunden (Hot… …   Deutsch Wikipedia

  • USB-Hub — Der Universal Serial Bus (USB) [ˌjuːnɪˈvɜːsl ˈsɪɹiəl bʌs] ist ein serielles Bussystem zur Verbindung eines Computers mit externen Geräten. Mit USB ausgestattete Geräte oder Speichermedien können im laufenden Betrieb miteinander verbunden (Hot… …   Deutsch Wikipedia

  • USB-OTG — Der Universal Serial Bus (USB) [ˌjuːnɪˈvɜːsl ˈsɪɹiəl bʌs] ist ein serielles Bussystem zur Verbindung eines Computers mit externen Geräten. Mit USB ausgestattete Geräte oder Speichermedien können im laufenden Betrieb miteinander verbunden (Hot… …   Deutsch Wikipedia

  • USB-Port — Der Universal Serial Bus (USB) [ˌjuːnɪˈvɜːsl ˈsɪɹiəl bʌs] ist ein serielles Bussystem zur Verbindung eines Computers mit externen Geräten. Mit USB ausgestattete Geräte oder Speichermedien können im laufenden Betrieb miteinander verbunden (Hot… …   Deutsch Wikipedia

  • USB-Schnittstelle — Der Universal Serial Bus (USB) [ˌjuːnɪˈvɜːsl ˈsɪɹiəl bʌs] ist ein serielles Bussystem zur Verbindung eines Computers mit externen Geräten. Mit USB ausgestattete Geräte oder Speichermedien können im laufenden Betrieb miteinander verbunden (Hot… …   Deutsch Wikipedia

  • USB-Stecker — Der Universal Serial Bus (USB) [ˌjuːnɪˈvɜːsl ˈsɪɹiəl bʌs] ist ein serielles Bussystem zur Verbindung eines Computers mit externen Geräten. Mit USB ausgestattete Geräte oder Speichermedien können im laufenden Betrieb miteinander verbunden (Hot… …   Deutsch Wikipedia

  • USB 1.0 — Der Universal Serial Bus (USB) [ˌjuːnɪˈvɜːsl ˈsɪɹiəl bʌs] ist ein serielles Bussystem zur Verbindung eines Computers mit externen Geräten. Mit USB ausgestattete Geräte oder Speichermedien können im laufenden Betrieb miteinander verbunden (Hot… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”