LPD8808 based LED Strip

Driver for LPD8808 based LED strips. More...

Detailed Description

Driver for LPD8808 based LED strips.

LPD8808 based LED strips consist of a number of LEDs driven by LPD8808 chips. In these strips, each LED can be controlled individually. For this, every two LEDs are driven by a LPD8808 chip, which are chained and form a long shift register. To control a certain LED, the target color value needs to be shifted to the LEDs position on the strip.

This driver implementation does not buffer the current values for each LED. It expects the application to take care of this.

Files

file  lpd8808.h
 Interface definition for the LPD8808 LED strip driver.
 
file  lpd8808_params.h
 Default configuration for LPD8808 based LED strips.
 

Data Structures

struct  lpd8808_params_t
 Parameters needed for configuration. More...
 

Typedefs

typedef lpd8808_params_t lpd8808_t
 Device descriptor, same as the configuration parameters.
 

Functions

int lpd8808_init (lpd8808_t *dev, const lpd8808_params_t *params)
 Initialize the given LPD8808 based LED strip. More...
 
void lpd8808_load_rgb (const lpd8808_t *dev, color_rgb_t vals[])
 Set the color value of each LED on the strip. More...
 

Function Documentation

◆ lpd8808_init()

int lpd8808_init ( lpd8808_t dev,
const lpd8808_params_t params 
)

Initialize the given LPD8808 based LED strip.

Parameters
[out]devdevice to initialize
[in]paramsparameters used for initialization
Returns
0 on success
<0 on error

◆ lpd8808_load_rgb()

void lpd8808_load_rgb ( const lpd8808_t dev,
color_rgb_t  vals[] 
)

Set the color value of each LED on the strip.

This function sets the color value of each LED on the strip by shifting out the corresponding color values one after the other. The function expects an array of color_rgb_t values of the same length as LEDs on the strip.

Parameters
[in]devdevice to load color values to
[in]valsarray of color values, MUST be of same length as LEDs on the strip