Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 6 months ago.
Is there any reason why USBHID doesn't support reports counts greater than 64 bytes?
Quite often, HID Is used as convenient data transfer mechanism using multiple reports with varying report counts greater than 64 bytes. However, USBHID is limited to both one input and output report whose size is limited to 64 bytes.
It would be useful to support mulltiple reports with differing counts.
On this topic, I created a USBHIDEx by copying USBHID, changing the interface to support multiple report counts for both in and out reports, but still had an issue with USBDevice::read_start. This method takes a max_size but doesn't use it when setting up the endpoint to read. Instead, it uses the max_packet_size, 64 bytes. What this means is that if I send an output report of greater than 64 bytes, the data is received in 64 byte chunks, with the last chunk being either 64 bytes or less - not what I thought would happen or indeed what happens in the now unsupported USB library, used prior to mbed-os-5.12 release.
If I change the call to endpoint_read to use max_size, the complete output report is is received in one chunk.