dsp0401_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Inria
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 
19 #ifndef DSP0401_PARAMS_H
20 #define DSP0401_PARAMS_H
21 
22 #include "board.h"
23 #include "dsp0401.h"
24 #include "periph/gpio.h"
25 #include "periph/pwm.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 #ifndef DSP0401_PARAM_SDI_PIN
36 #define DSP0401_PARAM_SDI_PIN GPIO_PIN(0, 10) /* D2 */
37 #endif
38 #ifndef DSP0401_PARAM_CLK_PIN
39 #define DSP0401_PARAM_CLK_PIN GPIO_PIN(1, 3) /* D3 */
40 #endif
41 #ifndef DSP0401_PARAM_LAT_PIN
42 #define DSP0401_PARAM_LAT_PIN GPIO_PIN(1, 5) /* D4 */
43 #endif
44 #ifndef DSP0401_PARAM_PWM_DEV
45 #define DSP0401_PARAM_PWM_DEV PWM_DEV(1)
46 #endif
47 #ifndef DSP0401_PARAM_PWM_CHAN
48 #define DSP0401_PARAM_PWM_CHAN (0U)
49 #endif
50 #ifndef DSP0401_PARAM_BRIGHTNESS
51 #define DSP0401_PARAM_BRIGHTNESS (255U)
52 #endif
53 #ifndef DSP0401_PARAM_MODULE_COUNT
54 #define DSP0401_PARAM_MODULE_COUNT (1U)
55 #endif
56 
57 #ifndef DSP0401_PARAMS
58 #define DSP0401_PARAMS { .sdi = DSP0401_PARAM_SDI_PIN, \
59  .clk = DSP0401_PARAM_CLK_PIN, \
60  .lat = DSP0401_PARAM_LAT_PIN, \
61  .pwm = DSP0401_PARAM_PWM_DEV, \
62  .pwm_channel = DSP0401_PARAM_PWM_CHAN, \
63  .brightness = DSP0401_PARAM_BRIGHTNESS, \
64  .module_count = DSP0401_PARAM_MODULE_COUNT }
65 #endif
66 
72 {
73  DSP0401_PARAMS,
74 };
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 #endif /* DSP0401_PARAMS_H */
81 
dsp0401_params_t
Device initialization parameters.
Definition: dsp0401.h:47
gpio.h
Low-level GPIO peripheral driver interface definitions.
dsp0401.h
Device driver interface for the DSP0401 alphanumeric display.
dsp0401_params
static const dsp0401_params_t dsp0401_params[]
Configure DSP0401.
Definition: dsp0401_params.h:71
pwm.h
Low-level PWM peripheral driver interface definitions.