logiops-core 0.1.0

HID++ protocol implementation and device features
Documentation

Core HID++ protocol implementation and device features.

This crate provides the HID++ protocol layer for communicating with Logitech devices. It builds on top of hidpp-transport to provide higher-level device abstractions and feature implementations.

Features

The HID++ 2.0 protocol uses a feature-based model where each capability (DPI control, SmartShift, etc.) is exposed as a feature with a unique ID. Feature indices are discovered at runtime since they can vary between devices and firmware versions.

Device Initialization

use hidpp_transport::{create_hid_api, enumerate_hidpp_devices, HidapiChannel};
use logiops_core::HidppDevice;

# async fn example() -> logiops_core::error::Result<()> {
let api = create_hid_api()?;
let devices = enumerate_hidpp_devices(&api);

if let Some(logi_dev) = devices.first() {
    let channel = HidapiChannel::open(&api, &logi_dev.path)?;
    let mut device = HidppDevice::direct(channel);

    // Initialize queries protocol version, name, and discovers features
    let info = device.initialize().await?;
    println!("Found: {} ({})", info.name, info.protocol_version);
}
# Ok(())
# }