eGUI alias D4D
Release 3.0
Reference Manual
Introduction
Pages
Reference
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
d4dlcdhw_gpio8080_byte_8b.h
Go to the documentation of this file.
1
/**************************************************************************
2
*
3
* Copyright 2014 by Petr Gargulak. eGUI Community.
4
* Copyright 2009-2013 by Petr Gargulak. Freescale Semiconductor, Inc.
5
*
6
***************************************************************************
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU Lesser General Public License Version 3
9
* or later (the "LGPL").
10
*
11
* As a special exception, the copyright holders of the eGUI project give you
12
* permission to link the eGUI sources with independent modules to produce an
13
* executable, regardless of the license terms of these independent modules,
14
* and to copy and distribute the resulting executable under terms of your
15
* choice, provided that you also meet, for each linked independent module,
16
* the terms and conditions of the license of that module.
17
* An independent module is a module which is not derived from or based
18
* on this library.
19
* If you modify the eGUI sources, you may extend this exception
20
* to your version of the eGUI sources, but you are not obligated
21
* to do so. If you do not wish to do so, delete this
22
* exception statement from your version.
23
*
24
* This program is distributed in the hope that it will be useful,
25
* but WITHOUT ANY WARRANTY; without even the implied warranty of
26
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27
*
28
* You should have received a copy of the GNU General Public License
29
* and the GNU Lesser General Public License along with this program.
30
* If not, see <http://www.gnu.org/licenses/>.
31
*
32
***************************************************************************/
46
#ifndef __D4DRVHW_GPIO8080BYTE_8B_H
47
#define __D4DRVHW_GPIO8080BYTE_8B_H
48
49
#if (D4D_MK_STR(D4D_LLD_LCD_HW) == d4dlcdhw_gpio8080_byte_8b_ID)
50
51
52
/******************************************************************************
53
* Includes
54
******************************************************************************/
55
#include "d4dlcdhw_gpio8080_byte_8b_cfg.h"
56
57
/******************************************************************************
58
* Macros
59
******************************************************************************/
60
61
#define SET(x) (x##_PORT) |= (1 << (x))
62
#define RESET(x) (x##_PORT) &= ~(1 << (x))
63
#define SET_ALL(x) (x##_PORT) = 0xFF
64
#define RESET_ALL(x) (x##_PORT) = 0
65
66
#define OUTPUT(x) (x##_DDR) |= (1 << (x))
67
#define INPUT(x) (x##_DDR) &= ~(1 << (x))
68
#define OUTPUT_ALL(x) (x##_DDR) = 0xFF
69
#define INPUT_ALL(x) (x##_DDR) = 0
70
71
/******************************************************************************
72
* Constants
73
******************************************************************************/
74
75
#ifndef D4DLCD_INIT_CS
76
#ifndef D4DLCD_CS
77
#error "The Macro D4DLCD_CS must be set in LCD low level driver configuration file."
78
#else
79
#define D4DLCD_INIT_CS OUTPUT(D4DLCD_CS);
80
#endif
81
#endif
82
83
#ifndef D4DLCD_ASSERT_CS
84
#ifndef D4DLCD_CS
85
#error "The Macro D4DLCD_CS must be set in LCD low level driver configuration file."
86
#else
87
#define D4DLCD_ASSERT_CS RESET(D4DLCD_CS);
88
#endif
89
#endif
90
91
#ifndef D4DLCD_DEASSERT_CS
92
#ifndef D4DLCD_CS
93
#error "The Macro D4DLCD_CS must be set in LCD low level driver configuration file."
94
#else
95
#define D4DLCD_DEASSERT_CS SET(D4DLCD_CS);
96
#endif
97
#endif
98
99
#ifndef D4DLCD_INIT_DC
100
#ifndef D4DLCD_DC
101
#error "The Macro D4DLCD_DC must be set in LCD low level driver configuration file."
102
#else
103
#define D4DLCD_INIT_DC OUTPUT(D4DLCD_DC);
104
#endif
105
#endif
106
107
#ifndef D4DLCD_ASSERT_DC
108
#ifndef D4DLCD_DC
109
#error "The Macro D4DLCD_DC must be set in LCD low level driver configuration file."
110
#else
111
#define D4DLCD_ASSERT_DC RESET(D4DLCD_DC);
112
#endif
113
#endif
114
115
#ifndef D4DLCD_DEASSERT_DC
116
#ifndef D4DLCD_DC
117
#error "The Macro D4DLCD_DC must be set in LCD low level driver configuration file."
118
#else
119
#define D4DLCD_DEASSERT_DC SET(D4DLCD_DC);
120
#endif
121
#endif
122
123
124
#ifndef D4DLCD_READ_CMD_SUPPORT
125
#define D4DLCD_READ_CMD_SUPPORT D4D_TRUE
126
#endif
127
128
#ifndef D4DLCD_INIT_RD
129
#ifndef D4DLCD_RD
130
#error "The Macro D4DLCD_RD must be set in LCD low level driver configuration file."
131
#else
132
#define D4DLCD_INIT_RD OUTPUT(D4DLCD_RD);
133
#endif
134
#endif
135
136
#ifndef D4DLCD_ASSERT_RD
137
#ifndef D4DLCD_RD
138
#error "The Macro D4DLCD_RD must be set in LCD low level driver configuration file."
139
#else
140
#define D4DLCD_ASSERT_RD RESET(D4DLCD_RD);
141
#endif
142
#endif
143
144
#ifndef D4DLCD_DEASSERT_RD
145
#ifndef D4DLCD_RD
146
#error "The Macro D4DLCD_RD must be set in LCD low level driver configuration file."
147
#else
148
#define D4DLCD_DEASSERT_RD SET(D4DLCD_RD);
149
#endif
150
#endif
151
152
153
#ifndef D4DLCD_INIT_WR
154
#ifndef D4DLCD_WR
155
#error "The Macro D4DLCD_WR must be set in LCD low level driver configuration file."
156
#else
157
#define D4DLCD_INIT_WR OUTPUT(D4DLCD_WR);
158
#endif
159
#endif
160
161
#ifndef D4DLCD_ASSERT_WR
162
#ifndef D4DLCD_WR
163
#error "The Macro D4DLCD_WR must be set in LCD low level driver configuration file."
164
#else
165
#define D4DLCD_ASSERT_WR RESET(D4DLCD_WR);
166
#endif
167
#endif
168
169
#ifndef D4DLCD_DEASSERT_WR
170
#ifndef D4DLCD_WR
171
#error "The Macro D4DLCD_WR must be set in LCD low level driver configuration file."
172
#else
173
#define D4DLCD_DEASSERT_WR SET(D4DLCD_WR);
174
#endif
175
#endif
176
177
178
#ifndef D4DLCD_INIT_DATA
179
#ifndef D4DLCD_DATA
180
#error "The Macro D4DLCD_DATA must be set in LCD low level driver configuration file."
181
#else
182
#define D4DLCD_INIT_DATA OUTPUT_ALL(D4DLCD_DATA);
183
#endif
184
#endif
185
186
#ifndef D4DLCD_DATA_WRITE
187
#ifndef D4DLCD_DATA
188
#error "The Macro D4DLCD_DATA must be set in LCD low level driver configuration file."
189
#else
190
#define D4DLCD_DATA_WRITE(x) D4DLCD_DATA = x;
191
#endif
192
#endif
193
194
#ifdef D4DLCD_BACKLIGHT
195
196
#ifndef D4DLCD_INIT_BACKLIGHT
197
#define D4DLCD_INIT_BACKLIGHT OUTPUT(D4DLCD_BACKLIGHT);
198
#endif
199
200
#ifndef D4DLCD_ASSERT_BACKLIGHT
201
#define D4DLCD_ASSERT_BACKLIGHT RESET(D4DLCD_BACKLIGHT);
202
#endif
203
204
#ifndef D4DLCD_DEASSERT_BACKLIGHT
205
#define D4DLCD_DEASSERT_BACKLIGHT SET(D4DLCD_BACKLIGHT);
206
#endif
207
208
#endif
209
210
#ifndef D4DLCD_INIT_RESET
211
#ifndef D4DLCD_RESET
212
#error "The Macro D4DLCD_RESET must be set in LCD low level driver configuration file."
213
#else
214
#define D4DLCD_INIT_RESET OUTPUT(D4DLCD_RESET);
215
#endif
216
#endif
217
218
#ifndef D4DLCD_ASSERT_RESET
219
#ifndef D4DLCD_RESET
220
#error "The Macro D4DLCD_RESET must be set in LCD low level driver configuration file."
221
#else
222
#define D4DLCD_ASSERT_RESET RESET(D4DLCD_RESET);
223
#endif
224
#endif
225
226
#ifndef D4DLCD_DEASSERT_RESET
227
#ifndef D4DLCD_RESET
228
#error "The Macro D4DLCD_RESET must be set in LCD low level driver configuration file."
229
#else
230
#define D4DLCD_DEASSERT_RESET SET(D4DLCD_RESET);
231
#endif
232
#endif
233
234
/******************************************************************************
235
* Types
236
******************************************************************************/
237
238
/******************************************************************************
239
* Macros
240
******************************************************************************/
241
242
/******************************************************************************
243
* Global variables
244
******************************************************************************/
245
246
/******************************************************************************
247
* Global functions
248
******************************************************************************/
249
250
#endif
251
#endif
/* __D4DRVHW_GPIO8080BYTE_8B_H */
252
253
254
255
256
257
258
259
260
261
GIT
PRIVATE
eGUI
D4D
low_level_drivers
LCD
lcd_hw_interface
gpio_8080_byte_8bit
d4dlcdhw_gpio8080_byte_8b.h
Generated on Thu Sep 21 2017 08:47:44 for eGUI alias D4D by
1.8.5