g13

Crates.iog13
lib.rsg13
version0.1.0
sourcesrc
created_at2023-01-03 20:59:59.678328
updated_at2023-01-03 20:59:59.678328
descriptionlibusb based crate to communicate with a Logitech G13 without accompanying drivers.
homepage
repositoryhttps://github.com/maxjoehnk/g13-rs
max_upload_size
id750409
size27,068
Max (maxjoehnk)

documentation

README

g13-rs

libusb based crate to communicate with a Logitech G13 without accompanying drivers.

Installation

cargo add g13

Usage

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()?;

LCD

Use clear_lcd to clear the lcd.

You can use write_lcd with a 960 bytes large buffer to write to the display.

Keyboard

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.

Commit count: 7

cargo fmt