Skip to main content

Module init

Module init 

Source
Expand description

Backlight task initialization. Backlight task initialization and runtime loop.

Structsยง

BacklightState ๐Ÿ”’
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ยง

BacklightDriver ๐Ÿ”’
Concrete driver type for this keyboard.
Transport ๐Ÿ”’
Concrete I2C transport type for this keyboard.