Skip to main content

softstart

Function softstart 

Source
async fn softstart(
    driver: &mut Driver<I2cTransport<I2c<'static, Async, Master>, 2>, 2>,
    base_red: u8,
    base_green: u8,
    base_blue: u8,
    target_brightness: u8,
) -> Result<(), I2cTransportError<<I2c<'static, Async, Master> as ErrorType>::Error>>
Expand description

Performs a soft-start brightness ramp on all LEDs at initialization.

Linearly steps brightness from 0 up to target_brightness over SOFTSTART_STEPS increments across SOFTSTART_RAMP_MS milliseconds.

ยงErrors

Returns Err if any bus transaction fails during the ramp.