lpd8808.h¶
Interface definition for the LPD8808 LED strip driver.
-
lpd8808_params_t
lpd8808_t
¶ Device descriptor, same as the configuration parameters.
-
int
lpd8808_init
(lpd8808.h::lpd8808_t
* dev, const lpd8808_params_t * params)¶ Initialize the given LPD8808 based LED strip.
Parameters
dev: device to initialize params: parameters used for initialization Return values
- 0 on success
- <0 on error
-
void
lpd8808_load_rgb
(constlpd8808.h::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
dev: device to load color values to vals: array of color values, MUST be of same length as LEDs on the strip
-
struct
lpd8808_params_t
¶ Parameters needed for configuration.
-
int
led_cnt
¶ number of LEDs on the strip
-
gpio.h::gpio_t
pin_clk
¶ pin connected to the strip’s clock signal
-
gpio.h::gpio_t
pin_dat
¶ pin connected to the strip’s data signal
-
int