User`s manual

RSK+ RX62N Applications
3.3 Human Interface Device Class
The HID class as the name suggests is commonly used for things like keyboards, mice and joysticks where a human’s
action is causing the need for communication. However this does not need to be the case. The HID class is suitable for
any device where the communication can be achieved by sending data in ‘reports‘ of a predefined size where the data
transfer rate is not critical.
The HID class has been supported by Microsoft Windows 98 onwards. Support is both at kernel level and user level.
When a HID type device is plugged into a Windows PC it will be automatically recognised and Windows will load its
own drivers for it, so there is no need to develop a custom Windows driver or even a Windows ‘inf file.
This implementation of the HID class supports a single IN report and a single OUT report. Both Interrupt IN and
Control IN (via Get_Report) transfers are supported for sending a report to the host. Reports from the host must use
Control OUT (via Set_Report).
Here are the functions that make up the USBHID API.
Name Description
USBHID_Init Initialise the HID module. Register a callback functions to be called when a report is received from the host.
Provide the initial contents of a report to send to the host. Initialises the Core and HAL layers.
USBHID_ReportIN Send a report to the host using Interrupt IN transfer.
The HID module consists of the following files:-
¾ usb_hid.c
¾ usb_hid.h.
¾ usb_descriptors.c
¾ usb_descriptors.h
¾ usb_common.h
R20UT0255EG0100 Page 12 of 12
August 26, 2010