Crates.io | g13 |
lib.rs | g13 |
version | 0.1.0 |
source | src |
created_at | 2023-01-03 20:59:59.678328 |
updated_at | 2023-01-03 20:59:59.678328 |
description | libusb based crate to communicate with a Logitech G13 without accompanying drivers. |
homepage | |
repository | https://github.com/maxjoehnk/g13-rs |
max_upload_size | |
id | 750409 |
size | 27,068 |
libusb based crate to communicate with a Logitech G13 without accompanying drivers.
cargo add g13
To access a G13 device instantiate a new G13Manager
and call discover
on it.
use g13::*;
let mut manager = G13Manager::new()?;
let mut devices: Vec<G13> = manager.discover()?;
Use clear_lcd
to clear the lcd.
You can use write_lcd
with a 960 bytes large buffer to write to the display.
To set the keyboard color use set_key_color
with a tuple of RGB bytes.
The Mode LEDs (M1, M2, M3 and MR) can be set with the ModeLeds bit flags.
To read keyboard input call read
which will wait for the next interrupt until the given timeout
is reached.