usb hid gadget under Linux #694
-
New to embedded system and hardware level programming. Does this repo allow for a linux desktop to act as hid for a Windows machine? Or is it internal so it would a hid on the same machine this repo is running on? Sorry for my ignorance and thank you for any help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No. hidapi (as well as libusb) is for the host side. For device side, you should look at linux gadget. Your Linux host may or may not support it. Examples from github: |
Beta Was this translation helpful? Give feedback.
No. hidapi (as well as libusb) is for the host side.
For device side, you should look at linux gadget. Your Linux host may or may not support it.
https://www.kernel.org/doc/html/v6.11/driver-api/usb/gadget.html
https://docs.kernel.org/usb/gadget_hid.html
Examples from github:
https://github.com/vpelletier/python-functionfs/tree/master/examples/hid
https://github.com/xairy/raw-gadget/blob/master/examples/keyboard.c