Driver for chained APA102 RGB LEDs. More...

Detailed Description

Driver for chained APA102 RGB LEDs.

Files

file  apa102.h
 Interface for controlling APA102 LEDs.
 

Data Structures

struct  apa102_params_t
 Configuration parameters for (chained) APA102 LEDs. More...
 

Typedefs

typedef apa102_params_t apa102_t
 Device descriptor definition for APA102 LEDs.
 

Functions

void apa102_init (apa102_t *dev, const apa102_params_t *params)
 Initialize (chained) APA102 LEDs. More...
 
void apa102_load_rgba (const apa102_t *dev, const color_rgba_t vals[])
 Apply the given color values to the connected LED(s) More...
 

Function Documentation

◆ apa102_init()

void apa102_init ( apa102_t dev,
const apa102_params_t params 
)

Initialize (chained) APA102 LEDs.

Parameters
[out]devdevice descriptor
[in]paramsdevice configuration
Precondition
dev != NULL
params != NULL

◆ apa102_load_rgba()

void apa102_load_rgba ( const apa102_t dev,
const color_rgba_t  vals[] 
)

Apply the given color values to the connected LED(s)

Parameters
[in]devdevice descriptor
[in]valscolor values, MUST be of size dev->led_numof
Precondition
dev != NULL
vals != NULL