Welcome!
This time I share the fruit of my work (well, not quite my own).
I am currently designing electronics for the joystick with the possibility of implementing more advanced communication (calibration on the hardware side, configuration of e.g. device name or number of channels). The ideal for this purpose seems to be the use of the CDC interface running in a USB composite device next to the HID interface.
While both of these interfaces can be quickly "clicked" in CubeMX, with a composite device you have to show off (yourself).
Fortunately, I found an interesting piece of code in the STM32Duino project (https://github.com/danieleff/Arduino_Core_STM32F1/tree/USB_HID_Composite) and by analyzing its creation, I separated the smallest functional part of this concept.
I hereby share this extracted solution that works.
An additional problem is that you have to slightly modify the driver's inf file so that it does not "mask" the entire device, but connects only to the CDC interface, leaving the HID interface at the disposal of the operating system.
Everything is described in the repository:
https://gitlab.com/piotrva/stm32-composite-hid-cdc
This time I share the fruit of my work (well, not quite my own).
I am currently designing electronics for the joystick with the possibility of implementing more advanced communication (calibration on the hardware side, configuration of e.g. device name or number of channels). The ideal for this purpose seems to be the use of the CDC interface running in a USB composite device next to the HID interface.
While both of these interfaces can be quickly "clicked" in CubeMX, with a composite device you have to show off (yourself).
Fortunately, I found an interesting piece of code in the STM32Duino project (https://github.com/danieleff/Arduino_Core_STM32F1/tree/USB_HID_Composite) and by analyzing its creation, I separated the smallest functional part of this concept.
I hereby share this extracted solution that works.
An additional problem is that you have to slightly modify the driver's inf file so that it does not "mask" the entire device, but connects only to the CDC interface, leaving the HID interface at the disposal of the operating system.
Everything is described in the repository:
https://gitlab.com/piotrva/stm32-composite-hid-cdc