Loading...
Searching...
No Matches
apa102.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
19
20#include "color.h"
21#include "periph/gpio.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
30typedef struct {
32 gpio_t data_pin;
33 gpio_t clk_pin;
35
40
50void apa102_init(apa102_t *dev, const apa102_params_t *params);
51
61void apa102_load_rgba(const apa102_t *dev, const color_rgba_t vals[]);
62
63#ifdef __cplusplus
64}
65#endif
66
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:39
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:30
gpio_t data_pin
data pin
Definition apa102.h:32
gpio_t clk_pin
clock pin
Definition apa102.h:33
int led_numof
number of chained LEDs
Definition apa102.h:31
RGBA color value.
Definition color.h:54