grove_ledbar_params.h
1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/*
* Copyright (C) 2017 HAW Hamburg
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup drivers_grove_ledbar
*
* @{
* @file
* @brief Config for the Grove LED bar based on MY9221 LED controller
*
* @author Sebastian Meiling <s@mlng.net>
*/
#ifndef GROVE_LEDBAR_PARAMS_H
#define GROVE_LEDBAR_PARAMS_H
#include "board.h"
#include "periph/gpio.h"
#include "saul_reg.h"
#include "grove_ledbar.h"
#include "my9221.h"
#ifdef __cplusplus
extern "C"
{
#endif
/**
* @brief Clock GPIO pin
*/
#ifndef GROVE_LEDBAR_CLK
#define GROVE_LEDBAR_CLK (GPIO_PIN(0,1))
#endif
/**
* @brief Data GPIO pin
*/
#ifndef GROVE_LEDBAR_DAT
#define GROVE_LEDBAR_DAT (GPIO_PIN(0,2))
#endif
/**
* @brief Direction of LEDs
*/
#ifndef GROVE_LEDBAR_DIR
#define GROVE_LEDBAR_DIR GROVE_LEDBAR_G2R
#endif
/**
* @brief Default parameter settings
*/
#define GROVE_LEDBAR_PARAMS { \
.leds = 10, \
.dir = GROVE_LEDBAR_DIR, \
.clk = GROVE_LEDBAR_CLK, \
.dat = GROVE_LEDBAR_DAT, \
}
/**
* @brief Grove LED bar configuration
*/
static const grove_ledbar_params_t grove_ledbar_params[] =
{
#ifdef GROVE_LEDBAR_CUSTOM
GROVE_LEDBAR_CUSTOM,
#else
GROVE_LEDBAR_PARAMS,
#endif
};
/**
* @brief Additional meta information to keep in the SAUL registry
*/
static const saul_reg_info_t grove_ledbar_saul_info[] =
{
{
.name = "Grove LED bar"
}
};
#ifdef __cplusplus
}
#endif
#endif /* GROVE_LEDBAR_PARAMS_H */
/** @} */