|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Typedefs | |
| using | RgbLed = sbl::components::display::RgbLed |
| using | RgbLedState = sbl::components::display::RgbLedState |
| using | Color = sbl::components::display::Color |
Functions | |
| template<typename Driver > | |
| void | write (const RgbLed &led, const GpioHandle &r, const GpioHandle &g, const GpioHandle &b) |
| Write RgbLed state to GPIO pins (bang-bang) | |
| template<typename Driver > | |
| void | write (const RgbLed &led, uint8_t r_ch, uint8_t g_ch, uint8_t b_ch) |
| Write RgbLed state via SoftPwm channels (8-bit BCM) | |
| using sbl::led::Color = typedef sbl::components::display::Color |
Definition at line 31 of file output.hpp.
| using sbl::led::RgbLed = typedef sbl::components::display::RgbLed |
Definition at line 29 of file output.hpp.
| using sbl::led::RgbLedState = typedef sbl::components::display::RgbLedState |
Definition at line 30 of file output.hpp.
|
inline |
Write RgbLed state to GPIO pins (bang-bang)
Reads the LED's current state and writes each channel to its GPIO pin. Duty values > 0 are treated as ON. Gpio::write() handles active_low.
| Driver | GPIO driver type (e.g., sbl::driver::Gpio) |
| led | RGB LED instance to read state from |
| r | GPIO handle for red channel |
| g | GPIO handle for green channel |
| b | GPIO handle for blue channel |
Definition at line 48 of file output.hpp.
References sbl::components::display::RgbLed::state().
|
inline |
Write RgbLed state via SoftPwm channels (8-bit BCM)
Pushes per-channel duty cycles to the BCM engine. The Driver must provide set_duty(uint8_t channel, uint8_t duty).
| Driver | SoftPwm-compatible driver type (e.g., sbl::driver::SoftPwm) |
| led | RGB LED instance to read state from |
| r_ch | SoftPwm channel index for red |
| g_ch | SoftPwm channel index for green |
| b_ch | SoftPwm channel index for blue |
Definition at line 71 of file output.hpp.
References sbl::components::display::RgbLed::state().