libyggdrasil  v1.0.0
bsp::ygg::prph::RGBMatrix Class Reference

RGB Led driver SK9822 through SPI. More...

#include <rgb_matrix.hpp>

Public Member Functions

 RGBMatrix ()=delete
 

Static Public Member Functions

static bool init ()
 Initialization function. More...
 
static void enable ()
 Enables the SK9822 led. More...
 
static void disable ()
 Disable the SK9822 led. More...
 
static void clear ()
 Clear all leds. More...
 
static void setLed (u8 index, RGBA8 color)
 set a single led to RGBA8 color More...
 
static void setLedMasked (u16 enableMask, RGBA8 color)
 set multiple leds to RGBA8 color using a bit mask More...
 
static void dice (u8 number, RGBA8 color)
 Function to display a dice. More...
 
static void flush ()
 Send the saved color values to the leds. More...
 

Detailed Description

RGB Led driver SK9822 through SPI.

Note
Use flush() to write the leds

Constructor & Destructor Documentation

◆ RGBMatrix()

bsp::ygg::prph::RGBMatrix::RGBMatrix ( )
delete

Member Function Documentation

◆ clear()

static void bsp::ygg::prph::RGBMatrix::clear ( )
inlinestatic

Clear all leds.

◆ dice()

static void bsp::ygg::prph::RGBMatrix::dice ( u8  number,
RGBA8  color 
)
inlinestatic

Function to display a dice.

Parameters
numberNumber to display
colorRGBA8 color

◆ disable()

static void bsp::ygg::prph::RGBMatrix::disable ( )
inlinestatic

Disable the SK9822 led.

◆ enable()

static void bsp::ygg::prph::RGBMatrix::enable ( )
inlinestatic

Enables the SK9822 led.

◆ flush()

static void bsp::ygg::prph::RGBMatrix::flush ( )
inlinestatic

Send the saved color values to the leds.

◆ init()

static bool bsp::ygg::prph::RGBMatrix::init ( )
inlinestatic

Initialization function.

Returns
Success

◆ setLed()

static void bsp::ygg::prph::RGBMatrix::setLed ( u8  index,
RGBA8  color 
)
inlinestatic

set a single led to RGBA8 color

Parameters
indexLed number from 0 to 8
colorRGBA8 color

◆ setLedMasked()

static void bsp::ygg::prph::RGBMatrix::setLedMasked ( u16  enableMask,
RGBA8  color 
)
inlinestatic

set multiple leds to RGBA8 color using a bit mask

Parameters
enableMaskBitmask to enabled the leds
colorRGBA8 color

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