cancel
Showing results for 
Search instead for 
Did you mean: 

Read data in device sent by host over USB HID

smoothmanifolds
Associate III

In an STM32CubeIDE USB HID project for an STM32F103C8 board I can send data from the device to the host using the USBD_HID_SendReport() function, like so:

USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t*)&hid_report,sizeof(hid_report));

How can I read data in the device sent over USB HID by the host?

In particular, I'd like to send arbitrary data (say, 1024 bytes) from the host using something like hid_write() from libusb's hidapi and then read it in the STM32 device.
How can I do that?

1 REPLY 1
smoothmanifolds
Associate III

Anyone?