How to create a specific HID input device (for Windows) with Arduino-Pico? #1931
-
Hello, I assume I need to somehow "describe" its layout, values range etc. to Windows. I studied https://arduino-pico.readthedocs.io/en/latest/usb.html and successfully run the Mouse example, but I am looking for more specific examples/docs, in particular about how to "describe" the specific device in order for Windows to properly recognize its controls. Any hint? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Look at what the |
Beta Was this translation helpful? Give feedback.
-
Hello, following up. This case is not covered in any of the examples; at most, I have found HID_composite, which creates a composite HID device which acts as a Keyboard + Mouse.
I hoped I could do something like
but unfortunately there is no template for CDC.
which does not work along with the aforementioned custom HID report. :( Any hint? Many thanks |
Beta Was this translation helpful? Give feedback.
You're going to need to make a compound USB device. One HID node with 1 joystick report, and one CDC node. The CDC stuff is not part of the HID report structure/etc.
See how the combined USB descriptor is made in the core. You then service the CDC callbacks and the HID callbacks separately.
You might also get a better response posting this question in the Adafruit TinyUSB repo since I'm pretty sure you're not the first person to try this. :)