lm3630a
Barebones Rust driver for the TI LM3630A dual-string white LED backlight driver.
no_stdembedded-hal1.0 I2C- Optional
embedded-hal-async1.0 I2C support via theasyncfeature - Supports SEL-selected 7-bit I2C addresses
0x36and0x38 - Typed helpers for brightness, current, boost, ramps, PWM, interrupts, and faults
Status
Early driver. Register coverage is implemented, but it has not yet been validated on hardware.
Usage
use ;
let i2c = /* platform I2C */;
let mut delay = /* platform delay */;
let mut backlight = new;
// Wait at least 1 ms after HWEN is asserted.
backlight.wait_until_ready;
backlight.set_configuration?;
backlight.set_full_scale_current?;
backlight.set_brightness?;
backlight.set_control?;
Async support
Enable the optional async API with:
= { = "0.1", = ["async"] }
Async methods are available on the same driver type with an _async suffix, for example:
backlight.wait_until_ready_async.await;
backlight.set_brightness_async.await?;
Notes
Address::SelLowis0x36when SEL is tied to GND.Address::SelHighis0x38when SEL is tied to VIN.- The datasheet requires a 1 ms wait after HWEN assertion or software reset before I2C access.
- Reading interrupt status clears the device interrupt status register.
- Brightness registers are not updated by the device while it is in sleep mode.