Expand description
Backlight task initialization. Backlight task initialization and runtime loop.
Structsยง
- Backlight
State ๐ - Full backlight state, kept in one place so any path can do a consistent redraw without losing information.
Constantsยง
- CAPS_
LOCK_ ๐LED_ INDEX - LED index for the Caps Lock indicator key.
- INDICATOR_
BRIGHTNESS ๐ - Brightness percentage applied to indicator LEDs (0โ100).
- INDICATOR_
RED ๐ - RGB colour for the active Caps Lock indicator state (red).
- INDICATOR_
WHITE ๐ - RGB colour for the inactive Caps Lock indicator state (white).
- SOFTSTART_
RAMP_ ๐MS - Total duration of the soft-start ramp in milliseconds.
- SOFTSTART_
STEPS ๐ - Number of brightness steps in the soft-start ramp.
- THERMAL_
POLL ๐ - Interval between thermal register polls.
- THERMAL_
THROTTLE_ ๐BRIGHTNESS - Brightness percentage applied when a driver chip reports temperature โฅ 70 ยฐC.
Functionsยง
- backlight_
runner - Runs the backlight controller loop.
- correct ๐
- render_
all ๐ - Writes every LED to hardware according to
state. - render_
indicator ๐ - Writes only the Caps Lock indicator LED according to
state. - scale ๐
- softstart ๐
- Performs a soft-start brightness ramp on all LEDs at initialization.
Type Aliasesยง
- Backlight
Driver ๐ - Concrete driver type for this keyboard.
- Transport ๐
- Concrete I2C transport type for this keyboard.