Skip to main content

openlogi_hid/
lib.rs

1//! HID++ device discovery and inspection for OpenLogi.
2//!
3//! Wraps the `hidpp` crate over `async-hid` as the transport. Public
4//! entry points:
5//!
6//! - [`enumerate`] — one-shot inventory of receivers + paired devices.
7//! - [`set_dpi`] — write a new sensor DPI to a connected device.
8
9mod mappings;
10mod node_ledger;
11mod route;
12mod transport;
13// Native Win32 HID report-write fallback, used by the Windows composite channel
14// in `transport` when async-hid's async write path fails.
15#[cfg(target_os = "windows")]
16mod windows_hid;
17
18pub mod gesture;
19pub mod inventory;
20pub mod pairing;
21pub mod reprog_controls;
22pub mod smartshift;
23pub mod thumbwheel;
24pub mod write;
25
26pub use gesture::{CaptureChannel, CapturedInput, GestureError, run_capture_session};
27pub use inventory::{Enumerator, InventoryError, enumerate};
28pub use pairing::{
29    Click, DiscoveredDevice, PairingCommand, PairingError, PairingEvent, PairingReceiver,
30    PasskeyMethod, ReceiverFamily, ReceiverSelector, list_pairing_receivers, run_pairing, unpair,
31};
32pub use route::{BOLT_PIDS, DIRECT_DEVICE_INDEX, DeviceRoute, UNIFYING_PIDS};
33pub use smartshift::{AUTO_DISENGAGE_PERMANENT, SmartShiftMode, SmartShiftStatus};
34pub use write::{
35    DpiCapabilities, DpiInfo, FeatureEntry, LightingMethod, SharedChannel, WriteError,
36    dump_features, get_dpi, get_dpi_info, get_smartshift_status, set_dpi, set_dpi_on,
37    set_keyboard_color, set_keyboard_color_with, set_smartshift, set_smartshift_on,
38    set_smartshift_sensitivity, toggle_smartshift, toggle_smartshift_on,
39};