Content originally posted in LPCWare by mch0 on Tue Jun 03 07:50:10 MST 2014
Oh, indeed, I forgot about the EP size. That's why I said "at least", I didn't compile and test.
I will use hid_generic with 64 Bytes report size later myself, that's why I'm interested and I have done this on a different platform in the past.
Well, the EP size is defined also in hid_desc.c, this is the relevant part of the descriptor:
USB_ENDPOINT_DESC_SIZE,/* bLength */
USB_ENDPOINT_DESCRIPTOR_TYPE,/* bDescriptorType */
HID_EP_IN,/* bEndpointAddress */
USB_ENDPOINT_TYPE_INTERRUPT,/* bmAttributes */
WBVAL(0x0004),/* wMaxPacketSize */
0x08,/* 16ms */ /* bInterval */
/* Endpoint, HID Interrupt Out */
USB_ENDPOINT_DESC_SIZE,/* bLength */
USB_ENDPOINT_DESCRIPTOR_TYPE,/* bDescriptorType */
HID_EP_OUT,/* bEndpointAddress */
USB_ENDPOINT_TYPE_INTERRUPT,/* bmAttributes */
WBVAL(0x0004),/* wMaxPacketSize */
See if a change of the two WBVAL(0x0004) to WBVAL(64) do the trick.
Probably even better, change the first to WBVAL(HID_INPUT_REPORT_BYTES) and the second one to WBVAL(HID_OUTPUT_REPORT_BYTES).
The feature reports are handled by EP0, but would assume that the driver splits a 64 byte transfer as required by USB_MAX_PACKET0.
But since I did neither an actual test nor look into the source code yet, this is an assumption right now.
I hope these changes suffice, because later I'll have to get the same setup running for me, too ...
Mike