AnsweredAssumed Answered

USB HID Mouse and Keyboard Combo

Question asked by jargin.matt on Jul 15, 2013
I want to make a USB device that has to collections, one for an HID mouse and one for an HID keyboard. But in the report descriptor, I will have to use report ID's and the HOST will ask for two separate reports specifying the REPORT ID. 

I was able to make an HID mouse using the demonstration that came with the discovery board. The one that used the accelerometer to control the mouse. 

That program uses the  USBD_HID_SendReport() function. And you pass it a pointer to the first byte of the report and the length in bytes of the report. This is called every 10ms, which is the INTERVAL time in the HID DESCRIPTOR. 


1) After I call the USBD_HID_SendReport() and pass it the report the HOST must ask for the report right? How do I tell which report it is asking for? In the demo program it will only ask for one, but what if I have two with different ID's?

2) How do I pass the USBD_HID_SendReport() function two different reports? Or do I have to do something completely different?

3) The point of this project is to make a game controller for a PC. Maybe I should make a game controller HID class? But how do you tell the PC which button does what function? All I found were example report descriptors.