Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
Namespaces | Typedefs | Functions
output.hpp File Reference

RGB LED output convenience functions. More...

#include <cstdint>
#include <sbl/types.hpp>
#include <sbl/components/display/rgb_led.hpp>
Include dependency graph for output.hpp:

Go to the source code of this file.

Namespaces

namespace  sbl
 Root namespace for all Sound Byte Libs functionality.
 
namespace  sbl::led
 

Typedefs

using sbl::led::RgbLed = sbl::components::display::RgbLed
 
using sbl::led::RgbLedState = sbl::components::display::RgbLedState
 
using sbl::led::Color = sbl::components::display::Color
 

Functions

template<typename Driver >
void sbl::led::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 sbl::led::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)
 

Detailed Description

RGB LED output convenience functions.

Composes RgbLed state with a driver backend in a single call. Two overloads:

Usage: // GPIO (bang-bang) sbl::led::write<sbl::driver::Gpio>(led, handle_r, handle_g, handle_b);

// SoftPwm (8-bit BCM) sbl::led::write<sbl::driver::SoftPwm>(led, ch_r, ch_g, ch_b);

Definition in file output.hpp.