AnsweredAssumed Answered

Bug in USB HID, keyboard code

Question asked by Grzegorz Kania on Jul 13, 2017
Latest reply on Dec 22, 2017 by Igor Pokorny

I'd like to report a bug. 

In the file usbh_hid_keybd.c, ver. V3.2.2, date: 07-July-2015

line 333:

Now is:

if(HID_Handle->length > (sizeof(keybd_report_data)/sizeof(uint32_t))){
   HID_Handle->length = (sizeof(keybd_report_data)/sizeof(uint32_t));

should be replaced with:


if(HID_Handle->length > sizeof(keybd_report_data)){
   HID_Handle->length = sizeof(keybd_report_data);

If I did not make a change, the keyboard reported an error by sending a stall event.

Can anyone confirm this?