is31fl3733

Crates.iois31fl3733
lib.rsis31fl3733
version0.5.0
sourcesrc
created_at2024-01-25 23:58:59.015568
updated_at2024-01-25 23:58:59.015568
descriptionA platform agnostic driver to interface with the IS31FL3733 (16x12 LED Matrix Driver) written in Rust
homepage
repositoryhttps://github.com/0xa10/is31fl3733-rs
max_upload_size
id1114793
size35,799
Alon Livne (0xa10)

documentation

README

is31fl3733-rs

Rust interface for the Lumissil IS31FL3733 16x12 LED Driver.

This crate currently only contains the minimal functionality required to bring up the chip and control the leds.

Control of the LEDs on/off state is through the set_leds function, which writes directly to the internal chip state. Each bit in the 24 byte buffer sequentially maps to a LED.

Similarly the brightness is controlled through set_brightness which writes to the chips PWM state. In this case each LED has its own byte determining brightness.

The overall maximum brightness limit can be adjusted using set_global_control_current.

See the datasheet for more information.

An internal state is held and diffed against to keep the amount of bus writes to a minimum.

Example

let is31fl3733 = IS31FL3733::is31fl3733::new();

is31fl3733.initialize()?;
is31fl3733.set_global_control_current(0xff)?; // Maximum brightness limit
is31fl3733.set_leds(&[0xffu8; 24])?; // Turn on all LEDs

// Set each LED's brightness to its index value
let brightness: [u8; 192] = core::array::from_fn(|i| i);
is31fl3733.set_brightness(&brightness);

TBD

  • LED open/short state detection
  • Interrupt support
  • Auto breathing mode

Disclaimer: This library is not an official product, use freely at your own risk.

Commit count: 0

cargo fmt