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