# USB Host HID (Human Interface Device) Driver
This directory contains an implementation of a USB HID Driver implemented on top of the [USB Host Library](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-reference/peripherals/usb_host.html).
HID driver allows access to HID devices.
The following steps outline the typical API call pattern of the HID Class Driver:
1. Install the USB Host Library via 'usb_host_install()'
2. Install the HID driver via 'hid_host_install()'
3. The HID Host driver device callback provide the following events (via two callbacks):
4. Specific HID device can be opened or closed with:
5. To enable / disable data receiving in case of event (keyboard key was pressed or mouse device was moved e.t.c) use:
6. HID Class specific device requests:
7. When HID device event occurs the driver call an interface callback with events:
8. The HID driver can be uninstalled via 'hid_host_uninstall()'
## Known issues
- For an example, refer to [hid_host_example](https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/hid)
## Supported Devices
- HID Driver support any HID compatible device with a USB bIterfaceClass 0x03 (Human Interface Device).
- There are two options to handle HID device input data: either in RAW format or via special event handlers (which are available only for HID Devices which supprot Boot Protocol).
- Fixed a bug where configuring the driver with `create_background_task = false` did not properly initialize the driver. This lead to `the hid_host_uninstall()` hang-up.
- Fixed bug where `hid_host_uninstall()` would cause a crash during the call while USB device has not been removed.
- Added `hid_host_get_device_info()` to get the basic information of a connected USB HID device.
- Initial version