dlkj/usbd-human-interface-device

Example on multi-device + hid raw device

Closed this issue · 3 comments

I'm somewhat interested in using this crate to replace what I've done in https://github.com/kiibohd/kiibohd-core/tree/main/kiibohd-usb.

The main complication is that I also have to deal with a raw hid device as well and it's not clear how to use raw hid with this crate.

(this is where raw hid is used https://github.com/kiibohd/kiibohd-core/blob/main/kiibohd-usb/src/lib.rs#L782).

dlkj commented

I'd be happy to help. My assumption is that we could build a device that exposes a subset of the usbd_human_interface_device::interface::InterfaceClass methods like get_report and set_report

dlkj commented

Sorry, didn't read your edit. Yes, it would be possible to add a HID IO device to the crate or build your own in kiibohd.

dlkj commented

Here is a quick example based on the descriptor you are using with kiibohd: hid_io.rs

I gave it a quick test with todbot/hidapitester and it seems to work fine.