grove_ledbar_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 HAW Hamburg
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 
18 #ifndef GROVE_LEDBAR_PARAMS_H
19 #define GROVE_LEDBAR_PARAMS_H
20 
21 #include "board.h"
22 #include "periph/gpio.h"
23 #include "saul_reg.h"
24 
25 #include "grove_ledbar.h"
26 #include "my9221.h"
27 
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32 
36 #ifndef GROVE_LEDBAR_CLK
37 #define GROVE_LEDBAR_CLK (GPIO_PIN(0,1))
38 #endif
39 
43 #ifndef GROVE_LEDBAR_DAT
44 #define GROVE_LEDBAR_DAT (GPIO_PIN(0,2))
45 #endif
46 
50 #ifndef GROVE_LEDBAR_DIR
51 #define GROVE_LEDBAR_DIR GROVE_LEDBAR_G2R
52 #endif
53 
57 #ifndef GROVE_LEDBAR_PARAMS
58 #define GROVE_LEDBAR_PARAMS { .leds = 10, \
59  .dir = GROVE_LEDBAR_DIR, \
60  .clk = GROVE_LEDBAR_CLK, \
61  .dat = GROVE_LEDBAR_DAT }
62 #endif
63 
67 #define GROVE_LEDBAR_SAUL_INFO { .name = "Grove LED bar" }
68 
73 {
75 };
76 
81 {
83 };
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif /* GROVE_LEDBAR_PARAMS_H */
90 
GROVE_LEDBAR_SAUL_INFO
#define GROVE_LEDBAR_SAUL_INFO
SAUL info.
Definition: grove_ledbar_params.h:67
saul_reg_info_t
Additional data to collect for each entry.
Definition: saul_reg.h:49
grove_ledbar.h
Interface for the Grove ledbar driver.
grove_ledbar_params
static const grove_ledbar_params_t grove_ledbar_params[]
Grove LED bar configuration.
Definition: grove_ledbar_params.h:72
grove_ledbar_saul_info
static const saul_reg_info_t grove_ledbar_saul_info[]
Additional meta information to keep in the SAUL registry.
Definition: grove_ledbar_params.h:80
saul_reg.h
SAUL registry interface definition.
gpio.h
Low-level GPIO peripheral driver interface definitions.
my9221.h
Interface for the MY9221 LED controller driver.
GROVE_LEDBAR_PARAMS
#define GROVE_LEDBAR_PARAMS
Default parameter settings.
Definition: grove_ledbar_params.h:58
my9221_params_t
Parameters needed for device initialization.
Definition: my9221.h:70