|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
RGB LED component — state holder with 8-bit color depth. More...
#include <cstdint>Go to the source code of this file.
Classes | |
| struct | sbl::components::display::RgbLedState |
| class | sbl::components::display::RgbLed |
| RGB LED state holder with 8-bit per-channel duty cycle. More... | |
Namespaces | |
| namespace | sbl |
| Root namespace for all Sound Byte Libs functionality. | |
| namespace | sbl::components |
| Mid-level functional components. | |
| namespace | sbl::components::display |
| Display output components. | |
Enumerations | |
| enum class | sbl::components::display::Color : uint8_t { sbl::components::display::Off = 0 , sbl::components::display::Blue = 1 , sbl::components::display::Green = 2 , sbl::components::display::Cyan = 3 , sbl::components::display::Red = 4 , sbl::components::display::Magenta = 5 , sbl::components::display::Yellow = 6 , sbl::components::display::White = 7 } |
| 3-bit color enum — all 8 RGB combinations More... | |
RGB LED component — state holder with 8-bit color depth.
RgbLed stores per-channel duty cycle (0-255). The output backend (SoftPwm for BCM, or GPIO for bang-bang) reads state via state().
The 3-bit Color enum provides the 8 RGB cube corners at full brightness. For intermediate colors, use set_rgb().
Usage: sbl::components::display::RgbLed led; led.set_color(sbl::components::display::Color::Red); led.set_rgb(128, 0, 255); // purple at half red auto s = led.state(); // {128, 0, 255}
Definition in file rgb_led.hpp.