hd44780_internal.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 
19 #ifndef HD44780_INTERNAL_H
20 #define HD44780_INTERNAL_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
30 #define HD44780_CLEARDISPLAY (0x01)
31 #define HD44780_RETURNHOME (0x02)
32 #define HD44780_ENTRYMODESET (0x04)
33 #define HD44780_DISPLAYCONTROL (0x08)
34 #define HD44780_CURSORSHIFT (0x10)
35 #define HD44780_FUNCTIONSET (0x20)
36 #define HD44780_SETCGRAMADDR (0x40)
37 #define HD44780_SETDDRAMADDR (0x80)
38 
44 #define HD44780_ENTRYRIGHT (0x00)
45 #define HD44780_ENTRYLEFT (0x02)
46 #define HD44780_ENTRYSHIFTINCREMENT (0x01)
47 #define HD44780_ENTRYSHIFTDECREMENT (0x00)
48 
54 #define HD44780_DISPLAYON (0x04)
55 #define HD44780_DISPLAYOFF (0x00)
56 #define HD44780_CURSORON (0x02)
57 #define HD44780_CURSOROFF (0x00)
58 #define HD44780_BLINKON (0x01)
59 #define HD44780_BLINKOFF (0x00)
60 
66 #define HD44780_DISPLAYMOVE (0x08)
67 #define HD44780_CURSORMOVE (0x00)
68 #define HD44780_MOVERIGHT (0x04)
69 #define HD44780_MOVELEFT (0x00)
70 
76 #define HD44780_8BITMODE (0x10)
77 #define HD44780_4BITMODE (0x00)
78 #define HD44780_2LINE (0x08)
79 #define HD44780_1LINE (0x00)
80 #define HD44780_5x10DOTS (0x04)
81 #define HD44780_5x8DOTS (0x00)
82 
88 #define HD44780_CMD_WAIT (2000U)
89 #define HD44780_INIT_WAIT_XXL (50000U)
90 #define HD44780_INIT_WAIT_LONG (4500U)
91 #define HD44780_INIT_WAIT_SHORT (150U)
92 #define HD44780_PULSE_WAIT_SHORT (1U)
93 #define HD44780_PULSE_WAIT_LONG (100U)
94 
96 #ifdef __cplusplus
97 }
98 #endif
99 
100 #endif /* HD44780_INTERNAL_H */
101