I am working on a STM32L496 and I try to get 2 HID devices running on one USB port / device.
The first one is a keyboard HID (USBD_Config_HID_0), the second one is a custom HID Interface (USBD_Config_HID_1).
I set both HID descriptors to 'User Provided HID Report Descriptor' with no report IDs.
I can send keyboard codes on the USBD_Config_HID_0 by using USBD_HID_GetReportTrigger(0, 0, buf, len).
But what do I have to use to send data via the custom HID interface (USBD_Config_HID_1) ?
'USBD_HID_GetReportTrigger(1, 0, buf, len)' or 'USBD_HID_GetReportTrigger(0, 1, buf, len)'?
As far as I understand is the first entry the USB instance, with is in both cases '0', because I only have 'USB_Config_0'.
And because I haven't set any report IDs the second value can't be 1?
I appreciate any help.
Stefan
P.S. I found this discussion '2-hids-in-one-composite-usb-code' but it doesn't lead to a conclusion.
Hi Stefan.
The const uint8_t usbd_hid0_report_descriptor should not be 2-dimensional array, because library expects a 1-dimensional array with the declaration of the descriptor being:
extern const uint8_t usbd_hid0_report_descriptor[];
I do not have any experience with bluetooth modules.
Best regards, Milorad