lp50xx_async
Async Rust driver for the LP50xx family of Texas Instruments I2C RGB LED drivers.
Supported devices
All devices in the LP50xx family are supported:
How to use
For any I2C peripheral implementing the I2c embedded-hal-async trait you can use this driver as follows:
let hl = LP5030new;
let mut hl = hl.enable.await.unwrap;
hl.configure
.await
.unwrap;
// Set all LEDs to the same brightness.
hl.set_all_brightness.await.unwrap;
// Set a specific LED to a specific brightness.
hl.set_rgb_brightness.await.unwrap;
// Change the color for that LED.
hl.set_rgb.await.unwrap;
// Set the value for a specific channel (when not used with RGB LEDs).
hl.set_channel.await.unwrap;
// Put the device in Standby mode.
let hl = hl.disable.await.unwrap;