Crates.io | uhid-virt |
lib.rs | uhid-virt |
version | 0.0.7 |
source | src |
created_at | 2020-04-20 09:28:03.386458 |
updated_at | 2023-12-08 09:31:22.993074 |
description | Interface to Linux UHID (user-space HID transport drivers) |
homepage | |
repository | https://github.com/flukejones/uhid-virt |
max_upload_size | |
id | 232139 |
size | 38,554 |
uhid-virt provides a safe wrapper around uhid-sys
Forked from uhid-fs, so what changed? Removal of ArrayVec
dependency, and attempts to write
in to borrows slices rather than creating and cloning new vectors everywhere. Where possible
it tries to be an almost drop-in replacement for tokio_linux_uhid.
UHID lets you write userspace drivers for HID devices in Linux. No need for a kernel module, just run your program and you can register an HID device.
There are a lot of things you can do with this, to name a few:
UHID allows user-space to implement HID transport drivers. Please see hid-transport.html for an introduction into HID transport drivers. This document relies heavily on the definitions declared there.
With UHID, a user-space transport driver can create kernel hid-devices for each device connected to the user-space controlled bus. The UHID API defines the I/O events provided from the kernel to user-space and vice versa.
See the Kernel UHID doc page for a full explanation of the mechanics.
See the example folder. Sending a newline will make the mouse move to the right.
See flukejones/rog-core and sameer/gearvr-controller-uhid for a real-world use cases.