19#ifndef SBL_HAL_LED_OUTPUT_HPP_
20#define SBL_HAL_LED_OUTPUT_HPP_
47template<
typename Driver>
51 Driver::write(r, s.r > 0);
52 Driver::write(g, s.g > 0);
53 Driver::write(b, s.b > 0);
70template<
typename Driver>
71inline void write(
const RgbLed& led, uint8_t r_ch, uint8_t g_ch, uint8_t b_ch) {
73 Driver::set_duty(r_ch, s.r);
74 Driver::set_duty(g_ch, s.g);
75 Driver::set_duty(b_ch, s.b);
RGB LED state holder with 8-bit per-channel duty cycle.
RgbLedState state() const
Current state.
Color
3-bit color enum — all 8 RGB combinations
void write(const RgbLed &led, const GpioHandle &r, const GpioHandle &g, const GpioHandle &b)
Write RgbLed state to GPIO pins (bang-bang)
Root namespace for all Sound Byte Libs functionality.
RGB LED component — state holder with 8-bit color depth.
GPIO pin handle with port, pin number, and polarity.
Common types for SBL hardware abstraction.