Loading...
Searching...
No Matches
apa102_params.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
17
18#include "board.h"
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
28#ifndef APA102_PARAM_LED_NUMOF
29#define APA102_PARAM_LED_NUMOF (64) /* many have 64 per meter... */
30#endif
31#ifndef APA102_PARAM_DATA_PIN
32#define APA102_PARAM_DATA_PIN (GPIO_PIN(0, 0))
33#endif
34#ifndef APA102_PARAM_CLK_PIN
35#define APA102_PARAM_CLK_PIN (GPIO_PIN(0, 1))
36#endif
37
38#ifndef APA102_PARAMS
39#define APA102_PARAMS { .led_numof = APA102_PARAM_LED_NUMOF, \
40 .data_pin = APA102_PARAM_DATA_PIN, \
41 .clk_pin = APA102_PARAM_CLK_PIN }
42#endif
44
49{
50 APA102_PARAMS
51};
52
53#ifdef __cplusplus
54}
55#endif
56
static const apa102_params_t apa102_params[]
APA102 configuration.
Configuration parameters for (chained) APA102 LEDs.
Definition apa102.h:33