Skip navigation

emUSB-Device HID

  • Handling of vendor-specific Usage Pages
  • Ready to use code examples for keyboard, mouse and vendor-specific HID
  • No host driver required for Windows / Linux / 
    macOS
  • Small footprint

About the Human Interface 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. Most notable usage of the HID class is the PC mouse and keyboard, but the class is also often used for pure data communication between a device and the PC even if the data is not directly created through user input (e.g. Uninterruptible Power Supply).

Application Samples emUSB-Device HID

Keyboard & Mouse
keyboard-mouse-500x.png

 

 

Barcode Scanner
Barcode-Scanner-500x.png
Touch Screen
Touchscreen.png
Joystick
industrie-joystick-500x.png

 

 

Fingerprint Sensor
fingerprint-sensor-500x.png

 

 

RFID Reader
rfid-reader.png
3D Mouse
3d-tracker.png
Trackball
Trackball_500x.png
Uninterruptible Power Supply
USV_500x.png
Weighing Scale
weighing-scale.png

HID Categories

Devices which are in the HID class basically fall into one of two categories:
"True HIDs" and vendor specific HIDs, explained in the following paragraphs. One or 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.

 

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 bus 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 achieving the best communication speed is not a requirement.

Components

Components required to use the HID class:

  • emUSB HID
  • emUSB-Device core
  • emUSB target driver