Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
apa102.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2017 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
21
#ifndef APA102_H
22
#define APA102_H
23
24
#include "
color.h
"
25
#include "
periph/gpio.h
"
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
34
typedef
struct
{
35
int
led_numof
;
36
gpio_t
data_pin
;
37
gpio_t
clk_pin
;
38
}
apa102_params_t
;
39
43
typedef
apa102_params_t
apa102_t
;
44
54
void
apa102_init
(
apa102_t
*dev,
const
apa102_params_t
*params);
55
65
void
apa102_load_rgba
(
const
apa102_t
*dev,
const
color_rgba_t
vals[]);
66
67
#ifdef __cplusplus
68
}
69
#endif
70
71
#endif
/* APA102_H */
72
apa102_params_t::data_pin
gpio_t data_pin
data pin
Definition:
apa102.h:36
color_rgba_t
RGBA color value.
Definition:
color.h:44
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)
apa102_init
void apa102_init(apa102_t *dev, const apa102_params_t *params)
Initialize (chained) APA102 LEDs.
apa102_params_t
Configuration parameters for (chained) APA102 LEDs.
Definition:
apa102.h:34
apa102_params_t::led_numof
int led_numof
number of chained LEDs
Definition:
apa102.h:35
gpio.h
Low-level GPIO peripheral driver interface definitions.
color.h
Headers for the color handling module.
apa102_t
apa102_params_t apa102_t
Device descriptor definition for APA102 LEDs.
Definition:
apa102.h:43
apa102_params_t::clk_pin
gpio_t clk_pin
clock pin
Definition:
apa102.h:37
Generated on Tue Nov 24 2020 19:46:50 by
1.8.17