Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on STM32: read data in device sent by host over USB HID
Post
STM32: read data in device sent by host over USB HID
+0
−0
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 comment thread