Skip to main content

backlight_runner

Function backlight_runner 

Source
pub async fn backlight_runner(
    spi: Spi<'static, Async, Master>,
    cs0: Output<'static>,
    cs1: Output<'static>,
    sdb: Output<'static>,
) -> !
Expand description

Runs the backlight controller loop.

Initializes both SNLED27351 driver chips, performs a soft-start brightness ramp, then enters an event loop that concurrently handles two concerns:

  • Indicator and calibration commands arriving on BACKLIGHT_CH.
  • Thermal polling on a THERMAL_POLL ticker: reads the TDF register from both chips and reduces overall brightness to THERMAL_THROTTLE_BRIGHTNESS if either exceeds 70 °C, restoring it automatically when both cool down. During calibration render_calib is used instead of render_all so the calibration display is never clobbered by a thermal event.