cancel
Showing results for 
Search instead for 
Did you mean: 

How to receive data with USBD Custom HID

bastien2
Associate II
Posted on June 13, 2016 at 20:38

Hi all,

I work on a USB project with my STM32F103.

I want to use USB HID because it don't need any driver and it easy to integrate with the help of Cube32MX.

i can sucessfully send data from STM32 to PC and grap it with simple C based program.

i use USBD_CUSTOM_HID_SendReport_FS for sending data.

But i can't find the function for receiving data ?

Could you please post me an exemple ?
2 REPLIES 2
bastien2
Associate II
Posted on June 14, 2016 at 12:00

Hi,

First thank you very much for your reply !

i have made modification writed in these

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/USB%20get%20feature%20reports%20with%20HAL%20device%20library&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06...

but i can't understand how these works..

actually here is my code for sending data over USB HID :

uint8_t report = 5;

USBD_CUSTOM_HID_SendReport_FS(&report, 1);

but if i want report is = my data sended from computer to STM

what is the name of function i must call ?