Segger USB HID class

For more information:

Ohad Beit-On

ohad@sightsys.co.il

054-2584032

HID class.

The Human Interface Device class (HID) is an abstract USB class protocol defined by the USB Implementers Forum. This protocol was defined for the handling of devices which are used by humans to control the operation of computer systems. An installation of a custom-host USB driver is not necessary, because the USB human interface device class is standardized and every major OS already provides host drivers for it.

Method of communication

HID always uses interrupt endpoints. Since interrupt endpoints are limited to at most one packet of at most 64 bytes per frame (on full speed devices), the transfer rate is limited to 64000 bytes/sec, in reality much less than that.

Categories

Devices which are in the HID class fall into one of the two following categories:
“True HIDs” and “vendor specific HIDs”, explained in the following. One ore more examples for both categories are provided.

“True HIDs”

HID devices communicating with the host operating system. Devices which are used by a human being to input / output data, but do not directly exchange data with an application program running on the host.

Typical examples:

  • Keyboard
  • Mouse and similar pointing devices
  • Joystick
  • Game pad
  • Front-panel controls – for example, switches and buttons.

“Vendor specific HIDs”

These are HID devices communicating with an application program. The host OS loads the same driver it loads for any “true HID” and will automatically enumerate the device, but it can not communicate with the device. When analyzing the report descriptor, the host finds out that it can not exchange information with the device; the device uses a protocol which is meaningless to the HID driver of the host. The Host will therefore not exchange information with the device. A host recognizes a vendor specific HID by its vendor defined usage page in the report descriptor: The numerical value of the usage page is between 0xFF00 and 0xFFFF.
An application has the chance to communicate with the particular device using API functions offered by the host. This allows an application program to communicate with the device without having to load a driver. HID does not take advantage of the full USB bandwidth; bulk communication can be much faster, but requires a driver. Therefore it can be a good choice to select HID as device class, especially if easy-of use is important and high communication speed is not a requirement.

Typical examples:

  • Bar-code reader
  • Thermometer
  • Voltmeter
  • Low-speed JTAG emulator
  • UPS (Uninterruptible power supply)
Embedded IDE tools – C/C++ Compilers and DebuggersReal Time Operating SystemsDebuggers & JTAG EmulatorsEmbedded Software Testing solutionsMiddleware & SW componentsHW Testing solutions – Boundary-Scan (JTAG) & FunctionalOrganizing, Analyzing & Verification tools for HDL designs, FPGAs, Board schematic, PCB layout and Systems designersHome of CANopen, EtherCAT, PowerLink, ProfiNet– SW Protocols, Data loggers, Interfaces, devices & SolutionsIn-Circuit/Parallel Engineering & Production Device Programmers (Flash/EPROMs/CPLDs…)

For more information: Ohad Beit-On ohad@sightsys.co.il 054-2584032