ble_ledly/communication_protocol/
mod.rs1use crate::capability::{
2 brightness::BrightnessOption,
3 color::ColorOption,
4 hw_animate::{HWAnimateOption, HWAnimationSpeedSetting, HWStaticColorOption},
5 light::LightOption,
6};
7
8pub mod generic_rgb;
9
10pub use self::generic_rgb::GenericRGB;
15pub trait Protocol {
18 fn light(&self, option: &LightOption) -> Vec<u8>;
19 fn color(&self, option: &ColorOption) -> Vec<u8>;
20 fn brightness(&self, option: &BrightnessOption) -> Vec<u8>;
21 fn hw_animate(&self, option: &HWAnimateOption) -> Vec<u8>;
22
23 fn _animation_speed(setting: &HWAnimationSpeedSetting) -> u8;
25 fn _static_color(color: &HWStaticColorOption) -> u8;
26}