cancel
Showing results for 
Search instead for 
Did you mean: 

USB HID composite for multiple device

XYan.6
Associate

Hi there,

ENV: I use a Nucleo-L412KB board with ST library, STM32Cube_FW_L4_V1.13.0.

PURPOSE: I am trying to connect my board to pc via USB and send mouse, keyboard and multi-touch reports to PC. In this project, I want my PC to read my board as USB composite device and I can control each sub-function to select its own endpoint and report descriptor.

PROBLEM: The problem is in usbd_def.h, there is only one ep0 can be used. and in usbd_customhid.c, only one descriptor is read in USB_REQ_GET_DESCRIPTOR. I don't know how to modify the code to make it support three endpoints and three descriptors.

Other approach I tried: Another way I tried is put mouse, keyboard and multi-touch descriptor into one descriptor with different report IDs. It only works when the size of descriptor under 255. I have mouse: 50, keyboard 63, and multitouch more than 200. So I can only work with mouse and keyboard combo using this method.

I very appreciate for any input and suggestions.

0 REPLIES 0