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