20#ifndef SBL_CONTROL_DISPLAY_RGB_LED_HPP_
21#define SBL_CONTROL_DISPLAY_RGB_LED_HPP_
57 RgbLed() : r_(0), g_(0), b_(0) {}
60 void set_rgb(uint8_t r, uint8_t g, uint8_t b) {
68 uint8_t c =
static_cast<uint8_t
>(color);
69 r_ = (c & 4) ? 255 : 0;
70 g_ = (c & 2) ? 255 : 0;
71 b_ = (c & 1) ? 255 : 0;
RGB LED state holder with 8-bit per-channel duty cycle.
void set_rgb(uint8_t r, uint8_t g, uint8_t b)
Set per-channel duty cycle (0-255)
void set_color(Color color)
Set from Color enum (full brightness per active channel)
RgbLedState state() const
Current state.
void off()
Turn off all channels.
Indicators: RGB LED state and colors.
Color
3-bit color enum - all 8 RGB combinations