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 
9 #pragma once
10 
32 #include "color.h"
33 #include "periph/gpio.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
42 typedef struct {
43  int led_cnt;
44  gpio_t pin_clk;
45  gpio_t pin_dat;
47 
52 
62 int lpd8808_init(lpd8808_t *dev, const lpd8808_params_t *params);
63 
75 void lpd8808_load_rgb(const lpd8808_t *dev, color_rgb_t vals[]);
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
Headers for the color handling module.
Low-level GPIO peripheral driver interface definitions.
int lpd8808_init(lpd8808_t *dev, const lpd8808_params_t *params)
Initialize the given LPD8808 based LED strip.
lpd8808_params_t lpd8808_t
Device descriptor, same as the configuration parameters.
Definition: lpd8808.h:51
void lpd8808_load_rgb(const lpd8808_t *dev, color_rgb_t vals[])
Set the color value of each LED on the strip.
Data-structure describing a RGB color.
Definition: color.h:34
Parameters needed for configuration.
Definition: lpd8808.h:42
int led_cnt
number of LEDs on the strip
Definition: lpd8808.h:43
gpio_t pin_clk
pin connected to the strip's clock signal
Definition: lpd8808.h:44
gpio_t pin_dat
pin connected to the strip's data signal
Definition: lpd8808.h:45