USB HID: how to send more than 64 bytes of data (host-to-device)?
On an STM32F103CB, running as a Custom USB HID FS device, I have this USB HID Report Descriptor (I'm only showing Report ID 2):
0x06,0x70,0xff, // Usage Page: Vendor defined
0x09,0x06, // Usage
0xa1,0x01, // Collection: Application
0x85,0x02, // Report ID: 2 (Input & Output Reports)
// Input Report
0x09,0x06, // Usage: Vendor Usage 0x06
0x15,0x00, // Logical Minimum: 0
0x26,0xff,0x00, // Logical Maximum: 255
0x95,0x20, // Report Count: 32 elems
0x75,0x08, // Report Size: 8 bits/elem
0x81,0x00, // Input: Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position
// Output Report
0x09,0x06, // Usage: Vendor Usage 0x06
0x15,0x00, // Logical Minimum: 0
0x26,0xff,0x00, // Logical Maximum: 255
0x95,0x3f, // Report Count: 63 elems
0x75,0x08, // Report Size: 8 bits/elem
0x91,0x00, // Output: 0x00: Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile
0xc0, // End Collection
which is intended to send 32 bytes of data (ie. from device to host) and receive 63 bytes of data (ie. from host to device).
It's working well, but I actually need to send around 100KB from host to device.
I understand that USB HID FS only allows up to 64 byte transfers.
So how can I actually do that?
As a reference, I also have the `CUSTOM_HID_OutEvent_FS()` function:
static int8_t CUSTOM_HID_OutEvent_FS(uint8_t* data){
/* stuff goes here */
return USBD_OK;
}
which triggers when the host sends data to the device.
