cancel
Showing results for 
Search instead for 
Did you mean: 

USB HID Mouse and Keyboard Combo

guitardenver
Associate II
Posted on July 15, 2013 at 09:21

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. 

Questions:

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.

#usb-hid-mouse-keyboard-combo-id
0 REPLIES 0