lpd8808.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Freie Universität Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
30 #ifndef LPD8808_H
31 #define LPD8808_H
32 
33 #include "color.h"
34 #include "periph/gpio.h"
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
43 typedef struct {
44  int led_cnt;
45  gpio_t pin_clk;
46  gpio_t pin_dat;
48 
53 
63 int lpd8808_init(lpd8808_t *dev, const lpd8808_params_t *params);
64 
76 void lpd8808_load_rgb(const lpd8808_t *dev, color_rgb_t vals[]);
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif /* LPD8808_H */
83 
lpd8808_t
lpd8808_params_t lpd8808_t
Device descriptor, same as the configuration parameters.
Definition: lpd8808.h:52
lpd8808_params_t::pin_dat
gpio_t pin_dat
pin connected to the strip's data signal
Definition: lpd8808.h:46
lpd8808_params_t
Parameters needed for configuration.
Definition: lpd8808.h:43
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.
gpio.h
Low-level GPIO peripheral driver interface definitions.
color.h
Headers for the color handling module.
color_rgb_t
Data-structure describing a RGB color.
Definition: color.h:35
lpd8808_init
int lpd8808_init(lpd8808_t *dev, const lpd8808_params_t *params)
Initialize the given LPD8808 based LED strip.
lpd8808_params_t::led_cnt
int led_cnt
number of LEDs on the strip
Definition: lpd8808.h:44
lpd8808_params_t::pin_clk
gpio_t pin_clk
pin connected to the strip's clock signal
Definition: lpd8808.h:45