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
9#![deny(missing_docs)]
10#![deny(rustdoc::bare_urls)]
11#![deny(rustdoc::broken_intra_doc_links)]
12
13mod mappings;
14mod node_ledger;
15mod route;
16mod transport;
17// Native Win32 HID report-write fallback, used by the Windows composite channel
18// in `transport` when async-hid's async write path fails.
19#[cfg(target_os = "windows")]
20mod windows_hid;
21
22pub mod gesture;
23mod hires_wheel;
24pub mod hotplug;
25pub mod inventory;
26pub mod pairing;
27pub mod reprog_controls;
28pub mod smartshift;
29pub mod thumbwheel;
30pub mod write;
31
32pub use gesture::{CaptureChannel, CapturedInput, GestureError, run_capture_session};
33pub use hires_wheel::{
34    ScrollReportingTarget, ScrollResolution, ScrollWheelMode, get_scroll_wheel_mode,
35    get_scroll_wheel_mode_on, set_scroll_inversion, set_scroll_inversion_on, set_scroll_resolution,
36    set_scroll_resolution_on, set_scroll_wheel_mode, set_scroll_wheel_mode_on,
37};
38pub use hotplug::{HotplugEvent, watch_hotplug};
39pub use inventory::{Enumerator, InventoryError, enumerate};
40pub use pairing::{
41    Click, DiscoveredDevice, PairingCommand, PairingError, PairingEvent, PairingReceiver,
42    PasskeyMethod, ReceiverFamily, ReceiverSelector, list_pairing_receivers, run_pairing, unpair,
43};
44pub use route::{BOLT_PIDS, DIRECT_DEVICE_INDEX, DeviceRoute, UNIFYING_PIDS};
45pub use smartshift::{AUTO_DISENGAGE_PERMANENT, SmartShiftMode, SmartShiftStatus};
46pub use write::{
47    DpiCapabilities, DpiInfo, FeatureEntry, HidppFeatureErrorKind, HidppOperation, LightingMethod,
48    ReprogControlEntry, SharedChannel, WriteError, dump_features, dump_reprog_controls, get_dpi,
49    get_dpi_info, get_smartshift_status, set_dpi, set_dpi_on, set_keyboard_color,
50    set_keyboard_color_with, set_smartshift, set_smartshift_on, set_smartshift_sensitivity,
51    toggle_smartshift, toggle_smartshift_on,
52};