Loading...
Searching...
No Matches
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
9#pragma once
10
22
23#include "color.h"
24#include "periph/gpio.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
33typedef struct {
35 gpio_t data_pin;
36 gpio_t clk_pin;
38
43
53void apa102_init(apa102_t *dev, const apa102_params_t *params);
54
64void apa102_load_rgba(const apa102_t *dev, const color_rgba_t vals[]);
65
66#ifdef __cplusplus
67}
68#endif
69
Headers for the color handling module.
Low-level GPIO peripheral driver interface definitions.
apa102_params_t apa102_t
Device descriptor definition for APA102 LEDs.
Definition apa102.h:42
void apa102_load_rgba(const apa102_t *dev, const color_rgba_t vals[])
Apply the given color values to the connected LED(s)
void apa102_init(apa102_t *dev, const apa102_params_t *params)
Initialize (chained) APA102 LEDs.
Configuration parameters for (chained) APA102 LEDs.
Definition apa102.h:33
gpio_t data_pin
data pin
Definition apa102.h:35
gpio_t clk_pin
clock pin
Definition apa102.h:36
int led_numof
number of chained LEDs
Definition apa102.h:34
RGBA color value.
Definition color.h:43