History: usbh_cd_hid


This page describes all changes made to the usbh_cd_hid package, the USBH HID Class Driver, since its release.

Version

5.6 (2020-05-04, 18:37):

  • The joystick report attributes (absolute/relative, etc.) can be obtained using the usbh_hid_joystick_get_report() function.

5.5 (2020-03-18, 17:37):

  • The mouse report attributes (absolute/relative, etc.) can be obtained using the usbh_hid_mouse_get_report() function.

5.4r2 (2018-08-29, 18:17):

  • Document HTML link added to the documentation folder.
  • History and document files renamed to the package name.

5.4 (2017-09-01, 14:12):

  • Report Descriptors containing item collections where (Report Count) * (Report Size) is bigger than the expected size (based on the number and size of the individual Usage items) were parsed incorrectly.

      Example Record Descriptor snippet showing such an item collection:

        ...
        05 09  G  Usage Page (Buttons),
        19 01  L  Usage Minimum (01),
        29 03  L  Usage Maximum (03), /* 3 Buttons */
        15 00  G  Logical Minimum (0),
        25 01  G  Logical Maximum (1),
        95 08  G  Report Count (8)/* Expected value is 3 */
        75 01  G  Report Size (1),
        81 02  M  Input (Data, Variable, Absolute)
        ...
  • Compiler warnings removed.

5.3:

  • usbh_hid_*_present() could incorrectly report the presence of the device right after disconnecting it.

5.2:

  • Compiler warning was eliminated.

5.1:

  • Reports items within one report can be distributed accross different drivers (e.g.: mouse and keyboard).
  • Reports can be selected to be processed by HID generic using usbh_hid_generic_register_accept_report_ntf().
  • Joystick driver supports game pads as well.

4.2:

  • hid generic disconnect was called incorrectly, now it is called for all released units on the same disconnected device.

4.1:

  • added joystick support.
  • report items can be retrieved for keyboard, mouse, and joystick.
  • report item decoding simplified and cleaned up.

3.1:

  • Corrected handling of report descriptors in case of array data.
  • Removed restriction of minimum number of generic HID reports.
  • t_kbd_report was extended with key_count variable which represents the number of valid elements in keys buffer.
  • introduced HID_MAX_REPORT_ITEM_COUNT to accept HID devices with report items that are not required for the specific configuration (e.g. a keyboard only configuration with a device with generic report items).

2.15:

  • driver didn't work if RAW_REPORTS was set in config_usbh_hid_generic.h.  
  • calls to usbh_hid_generic_get_value() or usbh_hid_generic_read_in_report() functions are allowed from generic receive callback.
  • usbh_hid_generic_get_value() returned USBH_ERR_NOT_AVAILABLE in case if the item value was 0.
  • Corrected hid_connect() function. If HID mouse was disabled no other HID devices were found.
  • warnings removed.

2.14:

  • updated to work with USB host base major version 3.

2.13:

  • warnings removed.

2.12:

 - reject descriptors of size greater than HID_REPORT_DESCRIPTOR_MAX_SIZE (defined in config_usbh_hid.h).

 - warnings removed.

2.11:

 - Report handling changed. Previously only one driver (mouse, keyboard or generic) driver could have access to a report descriptor (that may contain multiple reports). This has been changed and now reports from the same report descriptor can be used by different drivers.

 - Version numbers for mouse, keyboard and generic device driver are made common with the base HID module.

 - Only one common history file (this file) is used from now on. HID mouse, keyboard and generic driver history files can be found at the end of this file.

 - Keyboard and mouse drivers will parse the reports and won't use reports defined by the boot protocol. This way non-standard keyboards and mice is supported.

2.10:

 - HID parser changed. get_reports() function replaced by get_report(). Only one IN and/or OUT report is processed in get_report().

2.9:

 - If a device sends interface descriptor with unknown protocol protocol first try to give to the mouse and keyboard class driver.

2.8:

 - enumeration process changed, report descriptors will not be parsed at connection only if generic/mouse/keyboard needs it.

 - extended API.

2.7:

 - warning removed from hid_parser.c.

2.6:   

 - report item count was calculated incorrectly.

2.5:

 - MAX_REPORT_ITEMS moved from hid_parser.h to config_usbh_hid.h.

 - INVALID_OFFSET moved from hid_parser.h to hid_parser.c.

 - rp_item_t, report_type_t, report_t renamed and moved to api_usbh_hid.h.

 - report_t.buffer removed.

 - read_item(), write_item() renamed and moved to api_usbh_hid.h.

 - added report_t.item_count; hid_info_t.report_count.

 - 'extern' removed from function prototypes.

2.4:

 - added allocation of output reports.

2.3:

 - psp_endianness.h used instead of psp_endiness.h.

 - usbh_utils version number check removed.

2.2:

 - needless version checks removed from API header file.

2.1:

 - If the report size of the device was bigger than HID_REPORT_DESCRIPTOR_MAX_SIZE then memory was corrupted.

       

--------------------------------------------------------------------------------

usbd_cd_hid-mouse.txt

--------------------------------------------------------------------------------

3.2:

 - hid_mouse_connect() modified. Report processing is performed one IN and OUT report at a time. If wanted report is found processing is cancelled.

3.1:

 - hid_mouse_connect() prototype changed.

 - Multiple report handling added.

2.5:

 - usbh_hid_mouse_get_in_report() function added.

 - relative X,Y positions are returned instead of absolute.

 - two more buttons and wheel handling added.

2.4:

 - usbh_hid_mouse_get_hid_hdl() introduced.

2.3:

 - report_count and item_count used in loops instead of MAX_NO_OF_REPORTS, MAX_REPORT_ITEMS.

 - read_item(), write_item() renamed to usbh_hid_* according to API change.

2.2:

 - added the option to support multiple mice.

2.1:

 - notification codes changed from enum to #define.

 

 - all notification callbacks are cast to (void) to avoid warnings this is required because notification functions return an error code.

--------------------------------------------------------------------------------

usbd_cd_hid-kbd.txt

--------------------------------------------------------------------------------

3.2:

 - hid_kbd_connect() modified. Report processing is performed one IN and OUT report at a time. If required reports are found processing is stopped.

3.1:

 - hid_kbd_connect() prototype changed.

 - Multiple report handling added.

2.5:

 - usbh_hid_kbd_get_in_report() function added.

2.4:

 - simplified boot keyboard descriptors.

 - usbh_hid_kbd_get_hid_hdl() introduced.

2.3:

 - report_t renamed to t_report according to api change.

 - write_item(), read_item() renamed to usbh_hid_* according to api change.

2.2:

 - added the option to support multiple keyboards.

2.1:

 - notification codes changed from enum to #define.

 - all notification callbacks are cast to (void) to avoid warnings this is required because notification functions return an error code.

--------------------------------------------------------------------------------

usbd_cd_hid-generic.txt

--------------------------------------------------------------------------------

5.2:

 - hid_generic_connect() modified. Report processing is performed one IN and OUT report at a time. If wanted reports are found processing is cancelled.

5.1:

 - hid_generic_connect() prototype changed.

4.2:

 - corrected usbh_hid_generic_get_value() function prototype in the API.

4.1:

 - corrected usbh_hid_read_item() and usbh_hid_write_item() functions.

 - usbh_hid_generic_get_hid_hdl() introduced.

 - configuration options changed.

 - reports are allocated in the submodules (generic/kbd/mouse) and not in the main module.

4.0:

 - changed API for hid_generic_register_cb().

 - changed callback mechanism to indicate new report has arrived.

3.1:

 - added feature to send output reports on control channel OR INT OUT.

 - added feature to read the last input report data received on INT IN OR request up-to-date input report data by initiating a Get input report transfer.

2.3:

 - report_count and item_count used in loops instead of MAX_NO_OF_REPORTS, MAX_REPORT_ITEMS.

 - usbh_hid_generic_get_report_desc(): added return code.

2.2:

 - added usbh_hid_generic_send_out_report().

 - added usbh_hid_generic_get_report_desc().

2.1:

 - needless version checks removed from API header file.

 - all notification callbacks are cast to (void) to avoid warnings this is required because notification functions return an error code.