mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
28 lines
555 B
Rust
28 lines
555 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
use super::EffectState;
|
|
use crate::keyboard::{KeyLayout, LedCode};
|
|
use crate::{effect_state_impl, Colour};
|
|
|
|
#[derive(Debug, Clone, Deserialize, Serialize)]
|
|
pub struct Static {
|
|
led: LedCode,
|
|
/// The starting colour
|
|
colour: Colour,
|
|
}
|
|
|
|
impl Static {
|
|
pub fn new(address: LedCode, colour: Colour) -> Self {
|
|
Self {
|
|
led: address,
|
|
colour,
|
|
}
|
|
}
|
|
}
|
|
|
|
impl EffectState for Static {
|
|
effect_state_impl!();
|
|
|
|
fn next_colour_state(&mut self, _layout: &KeyLayout) {}
|
|
}
|