Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::components::display::RgbLed Class Reference

RGB LED state holder with 8-bit per-channel duty cycle. More...

Detailed Description

RGB LED state holder with 8-bit per-channel duty cycle.

Note
All public methods are ISR-safe — pure state machine with no hardware I/O.

Definition at line 56 of file rgb_led.hpp.

#include <rgb_led.hpp>

Public Member Functions

 RgbLed ()
 
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)
 
void off ()
 Turn off all channels.
 
RgbLedState state () const
 Current state.
 

Constructor & Destructor Documentation

◆ RgbLed()

sbl::components::display::RgbLed::RgbLed ( )
inline

Definition at line 58 of file rgb_led.hpp.

Member Function Documentation

◆ set_rgb()

void sbl::components::display::RgbLed::set_rgb ( uint8_t  r,
uint8_t  g,
uint8_t  b 
)
inline

Set per-channel duty cycle (0-255)

Definition at line 61 of file rgb_led.hpp.

◆ set_color()

void sbl::components::display::RgbLed::set_color ( Color  color)
inline

Set from Color enum (full brightness per active channel)

Definition at line 68 of file rgb_led.hpp.

◆ off()

void sbl::components::display::RgbLed::off ( )
inline

Turn off all channels.

Definition at line 76 of file rgb_led.hpp.

◆ state()

RgbLedState sbl::components::display::RgbLed::state ( ) const
inline

Current state.

Definition at line 83 of file rgb_led.hpp.

Referenced by sbl::led::write(), and sbl::led::write().


The documentation for this class was generated from the following file: