struct BacklightState {
caps_lock: bool,
num_lock: bool,
brightness: u8,
in_calib: bool,
calib_leds_done: u128,
calib_pct: u8,
}Expand description
Full backlight state, kept in one place so any path can do a consistent redraw without losing information.
Fields§
§caps_lock: boolWhether Caps Lock is currently active.
num_lock: boolWhether Num Lock is currently active.
brightness: u8Global brightness percentage (0–100); reduced under thermal throttle.
in_calib: boolWhether a first-boot calibration pass is currently in progress.
true from Zero until Done completes.
Used by the thermal throttle path to call render_calib instead of
render_all so a thermal event never clobbers the calibration
display.
calib_leds_done: u128Bitset of LED indices confirmed calibrated during the full-travel pass.
Bit i set means LED i should be painted solid green by
render_calib. Cleared to zero when Done completes
and the keyboard returns to normal white operation.
calib_pct: u8Whole-keyboard gradient percentage (0–100) during the full-travel pass.
Drives the blue→green background interpolation in render_calib.
Cleared to zero alongside self::BacklightState::calib_leds_done on
calibration completion.
Implementations§
Trait Implementations§
Source§impl Clone for BacklightState
impl Clone for BacklightState
Source§fn clone(&self) -> BacklightState
fn clone(&self) -> BacklightState
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BacklightState
Auto Trait Implementations§
impl Freeze for BacklightState
impl RefUnwindSafe for BacklightState
impl Send for BacklightState
impl Sync for BacklightState
impl Unpin for BacklightState
impl UnsafeUnpin for BacklightState
impl UnwindSafe for BacklightState
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)