Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
hd44780_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 HD44780_PARAMS_H
19
#define HD44780_PARAMS_H
20
21
#include "board.h"
22
#include "
periph/gpio.h
"
23
24
#ifdef __cplusplus
25
extern
"C"
26
{
27
#endif
28
29
/* The default pins corresponds to Arduino pins on the Arduino Zero board. */
30
31
#ifndef HD44780_PARAM_COLS
32
#define HD44780_PARAM_COLS (16U)
33
#endif
34
#ifndef HD44780_PARAM_ROWS
35
#define HD44780_PARAM_ROWS (2U)
36
#endif
37
#ifndef HD44780_PARAM_PIN_RS
38
#define HD44780_PARAM_PIN_RS GPIO_PIN(0, 14)
/* Arduino D2 */
39
#endif
40
#ifndef HD44780_PARAM_PIN_RW
41
#define HD44780_PARAM_PIN_RW GPIO_UNDEF
42
#endif
43
#ifndef HD44780_PARAM_PIN_ENABLE
44
#define HD44780_PARAM_PIN_ENABLE GPIO_PIN(0, 9)
/* Arduino D3 */
45
#endif
46
#ifndef HD44780_PARAM_PINS_DATA
47
#define HD44780_PARAM_PINS_DATA { GPIO_PIN(0, 8),
/* Arduino D4 */
\
48
GPIO_PIN(0, 15),
/* Arduino D5 */
\
49
GPIO_PIN(0, 20),
/* Arduino D6 */
\
50
GPIO_PIN(0, 21),
/* Arduino D7 */
\
51
GPIO_UNDEF, \
52
GPIO_UNDEF, \
53
GPIO_UNDEF, \
54
GPIO_UNDEF }
55
#endif
56
57
#ifndef HD44780_PARAMS
58
#define HD44780_PARAMS { .cols = HD44780_PARAM_COLS, \
59
.rows = HD44780_PARAM_ROWS, \
60
.rs = HD44780_PARAM_PIN_RS, \
61
.rw = HD44780_PARAM_PIN_RW, \
62
.enable = HD44780_PARAM_PIN_ENABLE, \
63
.data = HD44780_PARAM_PINS_DATA }
64
#endif
65
69
static
const
hd44780_params_t
hd44780_params
[] =
70
{
71
HD44780_PARAMS,
72
};
73
74
#ifdef __cplusplus
75
}
76
#endif
77
78
#endif
/* HD44780_PARAMS_H */
79
hd44780_params_t
Parameters needed for device initialization.
Definition:
hd44780.h:60
gpio.h
Low-level GPIO peripheral driver interface definitions.
hd44780_params
static const hd44780_params_t hd44780_params[]
LCM1602C configuration.
Definition:
hd44780_params.h:69
Generated on Tue Nov 24 2020 19:46:50 by
1.8.17