Crates.io | lp586x |
lib.rs | lp586x |
version | 0.2.0 |
source | src |
created_at | 2024-04-10 18:57:17.720551 |
updated_at | 2024-09-18 20:37:39.111371 |
description | LP586x matrix LED driver (supports LP5860, LP5861, LP5862, LP5864, LP5868) |
homepage | |
repository | https://github.com/markus-k/lp586x-rs |
max_upload_size | |
id | 1203892 |
size | 71,172 |
LP586x matrix LED driver written in Rust.
Supported devices:
This driver is still work-in-progress and it's API may not be stable. Pull requests welcome!
For examples, have a look at the examples/ directory.
A very simple example:
use lp586x::{ConfigBuilder, Lp586x, PwmAccess};
let config = ConfigBuilder::new_lp5864()
.pwm_frequency(lp586x::PwmFrequency::Pwm62_5kHz)
.maximum_current(lp586x::CurrentSettingNonT::Max40mA)
.data_mode_8bit(false); // disable vsync for simplicity
let mut led_driver = Lp586x::new_with_i2c(&config, i2c_bus, 0x00, &mut delay).unwrap();
let mut framebuffer = [0u8; 72];
framebuffer[0] = u8::MAX;
// display current framebuffer
led_driver.set_pwm(0, &framebuffer).unwrap();
Licensed under either of
at your option.