Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
Public Member Functions | List of all members
sbl::components::display::RgbLed Class Reference

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

#include <rgb_led.hpp>

Collaboration diagram for sbl::components::display::RgbLed:

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.
 

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.

Constructor & Destructor Documentation

◆ RgbLed()

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

Definition at line 58 of file rgb_led.hpp.

Member Function Documentation

◆ off()

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

Turn off all channels.

Definition at line 76 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.

◆ 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.

◆ 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().

Here is the caller graph for this function:

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