ajazz-sdk

Crates.ioajazz-sdk
lib.rsajazz-sdk
version0.2.1
created_at2025-05-02 19:49:33.136725+00
updated_at2025-05-23 20:24:18.590048+00
descriptionHidApi driver for Ajazz devices
homepagehttps://github.com/mishamyrt/ajazz-sdk
repositoryhttps://github.com/mishamyrt/ajazz-sdk
max_upload_size
id1658136
size540,876
Mikhael Khrustik (mishamyrt)

documentation

README

Ajazz SDK Quality Assurance

Rust library for interacting with Ajazz Stream Docks.

Installation

cargo add ajazz-sdk

Supported devices

  • Ajazz AKP153
  • Ajazz AKP153E
  • Ajazz AKP153R
  • Ajazz AKP815
  • Ajazz AKP03
  • Ajazz AKP03E
  • Ajazz AKP03R
  • Ajazz AKP03RV2

Features

  • Reading events from the device.
  • Setting a custom boot logo.
  • Setting a custom button image.

Usage

use ajazz_sdk::{new_hidapi, Ajazz};

// Create instance of HidApi
let hid = new_hidapi();

// List devices and unsafely take first one
let (kind, serial) = Ajazz::list_devices(&hid).remove(0);

// Connect to the device
let mut device = Ajazz::connect(&hid, kind, &serial)
    .expect("Failed to connect");

// Print out some info from the device
println!(
    "Connected to '{}' with version '{}'",
    device.serial_number().unwrap(),
    device.firmware_version().unwrap()
);

// Set device brightness
device.set_brightness(35).unwrap();

// Use image-rs to load an image
let image = image::open("no-place-like-localhost.jpg").unwrap();

// Write it to the device
device.set_button_image(5, image).unwrap();

// Flush
device.flush().unwrap();

More examples can be found in the examples directory:

  • pizza - Running pizza, that eats blue dots. Reacts on button presses and encoder twists. Uses async features.
  • boot_logo - Setting a custom boot logo.
  • events - Reading events from the device.
  • screen_mirroring - Mirroring the screen of the computer to the screen of the device.

Trademarks

ajazz-sdk is an unofficial product and is not affiliated with Ajazz company.

Commit count: 110

cargo fmt