stm32_mw_usb_device
stm32_mw_usb_device copied to clipboard
Bug Fix: Most 16-bit Descriptor lengths assumed 8-bit input.
Most 16-bit Descriptor lengths assumed high bits were 0x00. This caused warnings and weird unexpected behavior when attempting to use descriptors longer than 255 bytes.
IMPORTANT INFORMATION
This was low-hanging fruit and an annoying oversight. HID report descriptors easily get larger than 255 bytes. This was the only fix necessary to make larger HID report descriptors work for me. I fixed all the 16-bit values while I was there.
A corresponding fix is necessary for STM32CubeMX. There is an artificial "255" limit on Class parameter: USBD_CUSTOM_HID_REPORT_DESC_SIZE. With this fix, it can be larger. I'm using 587 bytes currently. There may be more limits to relax, but this was the only one in my way.
Contributor License Agreement (CLA)
- The Pull Request feature will be considered by STMicroelectronics after the signature of a Contributor License Agreement (CLA) by the submitter.
- If you did not sign such agreement, please follow the steps mentioned in the CONTRIBUTING.md file.
Hi @berkakinci,
Thank you for this proposal and the clarity of your report. It will be forwarded to our development teams for analysis. I will get back to you as soon as I get their feedback.
With regards,
Hi @berkakinci,
Our development teams agree with your proposal. Actually such enhancement has already been decided and shall be integrated into a future release, not for the short term however.
We will keep you updated. Thank you for your comprehension and thank you again for this contribution.
With regards,
ST Internal Reference: 119955