eGUI alias D4D  Release 3.0
Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
d4dlcd_LS020.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 __D4DLCD_LS020_H
47 #define __D4DLCD_LS020_H
48 
49  #if (D4D_MK_STR(D4D_LLD_LCD) == d4dlcd_ls020_ID)
50 
51  /******************************************************************************
52  * Includes
53  ******************************************************************************/
54  #include "d4dlcd_ls020_cfg.h"
55 
56  /******************************************************************************
57  * Constants
58  ******************************************************************************/
59 
60  /******************************************************************************
61  * Types
62  ******************************************************************************/
63 
64  /******************************************************************************
65  * Macros
66  ******************************************************************************/
67 
68  /******************************************************************************
69  * Global variables
70  ******************************************************************************/
71 
72  #ifdef D4D_LLD_LCD_HW
74  #endif
75 
76  /******************************************************************************
77  * Global functions
78  ******************************************************************************/
79 
80  #endif
81 #endif /* __D4DLCD_LS020_H */
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
92 #if 0 // will be implemented ASAP, Petr Gargulak
93 
94 /**************************************************************************
95 *
96 * Copyright 2014 by Petr Gargulak. eGUI Community.
97 * Copyright 2009-2013 by Petr Gargulak. Freescale Semiconductor, Inc.
98 *
99 ***************************************************************************
100 * This program is free software: you can redistribute it and/or modify
101 * it under the terms of the GNU Lesser General Public License Version 3
102 * or later (the "LGPL").
103 *
104 * As a special exception, the copyright holders of the eGUI project give you
105 * permission to link the eGUI sources with independent modules to produce an
106 * executable, regardless of the license terms of these independent modules,
107 * and to copy and distribute the resulting executable under terms of your
108 * choice, provided that you also meet, for each linked independent module,
109 * the terms and conditions of the license of that module.
110 * An independent module is a module which is not derived from or based
111 * on this library.
112 * If you modify the eGUI sources, you may extend this exception
113 * to your version of the eGUI sources, but you are not obligated
114 * to do so. If you do not wish to do so, delete this
115 * exception statement from your version.
116 *
117 * This program is distributed in the hope that it will be useful,
118 * but WITHOUT ANY WARRANTY; without even the implied warranty of
119 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
120 *
121 * You should have received a copy of the GNU General Public License
122 * and the GNU Lesser General Public License along with this program.
123 * If not, see <http://www.gnu.org/licenses/>.
124 *
125 ***************************************************************************/
139 #ifndef __D4DLCD_D3000TFT2_1_H
140 #define __D4DLCD_D3000TFT2_1_H
141 
142 #if (D4D_LLD_LCD == D4D_LLD_LCD_D3000TFT2_1)
143 
144  /******************************************************************************
145  * Includes
146  ******************************************************************************/
147  #include "d4dlcd_d3000TFT2_1_cfg.h"
148  /******************************************************************************
149  * Constants
150  ******************************************************************************/
151 
152  #define D4DLCD_COMM_HW_NONE 0
153  #define D4DLCD_COMM_HW_SPI 1
154  #define D4DLCD_COMM_HW_QSPI 2
155  #define D4DLCD_COMM_HW_DSPI 3
156  #define D4DLCD_COMM_HW_SWSPI 4
157  #define D4DLCD_COMM_HW_PAR_GPIO 10
158  #define D4DLCD_COMM_HW_PAR_FLEX 11
159 
160 
161 
162  #define D4DLCD_PIXEL_COUNT (D4D_SCREEN_SIZE_SHORTER_SIDE * D4D_SCREEN_SIZE_LONGER_SIDE)
163 
164 
165  #ifndef D4DLCD_INIT_CS
166  #ifndef D4DLCD_CS
167  #error "The Macro D4DLCD_CS must be set in LCD low level driver configuration file."
168  #else
169  #define D4DLCD_INIT_CS OUTPUT(D4DLCD_CS);
170  #endif
171  #endif
172 
173  #ifndef D4DLCD_ASSERT_CS
174  #ifndef D4DLCD_CS
175  #error "The Macro D4DLCD_CS must be set in LCD low level driver configuration file."
176  #else
177  #define D4DLCD_ASSERT_CS RESET(D4DLCD_CS);
178  #endif
179  #endif
180 
181  #ifndef D4DLCD_DEASSERT_CS
182  #ifndef D4DLCD_CS
183  #error "The Macro D4DLCD_CS must be set in LCD low level driver configuration file."
184  #else
185  #define D4DLCD_DEASSERT_CS SET(D4DLCD_CS);
186  #endif
187  #endif
188 
189 
190 
191  #ifndef D4DLCD_INIT_RESET
192  #ifndef D4DLCD_RESET
193  #error "The Macro D4DLCD_RESET must be set in LCD low level driver configuration file."
194  #else
195  #define D4DLCD_INIT_RESET OUTPUT(D4DLCD_RESET);
196  #endif
197  #endif
198 
199  #ifndef D4DLCD_ASSERT_RESET
200  #ifndef D4DLCD_RESET
201  #error "The Macro D4DLCD_RESET must be set in LCD low level driver configuration file."
202  #else
203  #define D4DLCD_ASSERT_RESET RESET(D4DLCD_RESET);
204  #endif
205  #endif
206 
207  #ifndef D4DLCD_DEASSERT_RESET
208  #ifndef D4DLCD_RESET
209  #error "The Macro D4DLCD_RESET must be set in LCD low level driver configuration file."
210  #else
211  #define D4DLCD_DEASSERT_RESET SET(D4DLCD_RESET);
212  #endif
213  #endif
214 
215 
216 
217  #ifndef D4DLCD_INIT_DC
218  #ifndef D4DLCD_DC
219  #error "The Macro D4DLCD_DC must be set in LCD low level driver configuration file."
220  #else
221  #define D4DLCD_INIT_DC OUTPUT(D4DLCD_DC);
222  #endif
223  #endif
224 
225  #ifndef D4DLCD_ASSERT_DC
226  #ifndef D4DLCD_DC
227  #error "The Macro D4DLCD_DC must be set in LCD low level driver configuration file."
228  #else
229  #define D4DLCD_ASSERT_DC RESET(D4DLCD_DC);
230  #endif
231  #endif
232 
233  #ifndef D4DLCD_DEASSERT_DC
234  #ifndef D4DLCD_DC
235  #error "The Macro D4DLCD_DC must be set in LCD low level driver configuration file."
236  #else
237  #define D4DLCD_DEASSERT_DC SET(D4DLCD_DC);
238  #endif
239  #endif
240 
241 
242  #ifndef D4DLCD_INIT_SPICLK
243  #ifndef D4DLCD_SPICLK
244  #error "The Macro D4DLCD_SPICLK must be set in LCD low level driver configuration file."
245  #else
246  #define D4DLCD_INIT_SPICLK OUTPUT(D4DLCD_SPICLK);
247  #endif
248  #endif
249 
250  #ifndef D4DLCD_ASSERT_SPICLK
251  #ifndef D4DLCD_SPICLK
252  #error "The Macro D4DLCD_SPICLK must be set in LCD low level driver configuration file."
253  #else
254  #define D4DLCD_ASSERT_SPICLK RESET(D4DLCD_SPICLK);
255  #endif
256  #endif
257 
258  #ifndef D4DLCD_DEASSERT_SPICLK
259  #ifndef D4DLCD_SPICLK
260  #error "The Macro D4DLCD_SPICLK must be set in LCD low level driver configuration file."
261  #else
262  #define D4DLCD_DEASSERT_SPICLK SET(D4DLCD_SPICLK);
263  #endif
264  #endif
265 
266  #ifndef D4DLCD_INIT_SPIDATA
267  #ifndef D4DLCD_SPIDATA
268  #error "The Macro D4DLCD_SPIDATA must be set in LCD low level driver configuration file."
269  #else
270  #define D4DLCD_INIT_SPIDATA OUTPUT(D4DLCD_SPIDATA);
271  #endif
272  #endif
273 
274  #ifndef D4DLCD_ASSERT_SPIDATA
275  #ifndef D4DLCD_SPIDATA
276  #error "The Macro D4DLCD_SPIDATA must be set in LCD low level driver configuration file."
277  #else
278  #define D4DLCD_ASSERT_SPIDATA RESET(D4DLCD_SPIDATA);
279  #endif
280  #endif
281 
282  #ifndef D4DLCD_DEASSERT_SPIDATA
283  #ifndef D4DLCD_SPIDATA
284  #error "The Macro D4DLCD_SPIDATA must be set in LCD low level driver configuration file."
285  #else
286  #define D4DLCD_DEASSERT_SPIDATA SET(D4DLCD_SPIDATA);
287  #endif
288  #endif
289 
290  #ifdef D4DLCD_COMM_HW
291 
292  #if D4DLCD_COMM_HW == D4DLCD_COMM_HW_SPI
293 
294  #if D4DLCD_COMM_HW_ID == 0
295  #define D4DLCD_SPIBR SPIBR
296  #define D4DLCD_SPIC1 SPIC1
297  #define D4DLCD_SPIC2 SPIC2
298  #define D4DLCD_SPID SPID
299  #define D4DLCD_SPIS_SPTEF SPIS_SPTEF
300  #elif D4DLCD_COMM_HW_ID == 1
301  #define D4DLCD_SPIBR SPI1BR
302  #define D4DLCD_SPIC1 SPI1C1
303  #define D4DLCD_SPIC2 SPI1C2
304  #define D4DLCD_SPID SPI1D
305  #define D4DLCD_SPIS_SPTEF SPI1S_SPTEF
306  #elif D4DLCD_COMM_HW_ID == 2
307  #define D4DLCD_SPIBR SPI2BR
308  #define D4DLCD_SPIC1 SPI2C1
309  #define D4DLCD_SPIC2 SPI2C2
310  #define D4DLCD_SPID SPI2D
311  #define D4DLCD_SPIS_SPTEF SPI2S_SPTEF
312  #elif D4DLCD_COMM_HW_ID == 3
313  #define D4DLCD_SPIBR SPI3BR
314  #define D4DLCD_SPIC1 SPI3C1
315  #define D4DLCD_SPIC2 SPI3C2
316  #define D4DLCD_SPID SPI3D
317  #define D4DLCD_SPIS_SPTEF SPI3S_SPTEF
318  #endif
319 
320  #define LCD_READ_CMD_SUPPORT 0
321 
322  #elif D4DLCD_COMM_HW == D4DLCD_COMM_HW_QSPI
323 
324  #if D4DLCD_COMM_HW_ID == 0
325  #define D4DLCD_QSPI_QIR MCF_QSPI_QIR
326  #define D4DLCD_QSPI_QIR_WCEF MCF_QSPI_QIR_WCEF
327  #define D4DLCD_QSPI_QIR_ABRT MCF_QSPI_QIR_ABRT
328  #define D4DLCD_QSPI_QIR_SPIF MCF_QSPI_QIR_SPIF
329  #define D4DLCD_QSPI_QDLYR MCF_QSPI_QDLYR
330  #define D4DLCD_QSPI_QDLYR_SPE MCF_QSPI_QDLYR_SPE
331  #define D4DLCD_QSPI_QWR MCF_QSPI_QWR
332  #define D4DLCD_QSPI_QWR_HALT MCF_QSPI_QWR_HALT
333  #define D4DLCD_QSPI_QWR_CSIV MCF_QSPI_QWR_CSIV
334  #define D4DLCD_QSPI_QWR_NEWQP MCF_QSPI_QWR_NEWQP
335  #define D4DLCD_QSPI_QWR_ENDQP MCF_QSPI_QWR_ENDQP
336  #define D4DLCD_QSPI_QMR MCF_QSPI_QMR
337  #define D4DLCD_QSPI_QMR_MSTR MCF_QSPI_QMR_MSTR
338  #define D4DLCD_QSPI_QAR MCF_QSPI_QAR
339  #define D4DLCD_QSPI_QAR_CMD MCF_QSPI_QAR_CMD
340  #define D4DLCD_QSPI_QAR_TRANS MCF_QSPI_QAR_TRANS
341  #define D4DLCD_QSPI_QDR MCF_QSPI_QDR
342  #define D4DLCD_QSPI_QDR_BITSE MCF_QSPI_QDR_BITSE
343  #elif D4DLCD_COMM_HW_ID == 1
344  #define D4DLCD_QSPI_QIR MCF_QSPI1_QIR
345  #define D4DLCD_QSPI_QIR_WCEF MCF_QSPI1_QIR_WCEF
346  #define D4DLCD_QSPI_QIR_ABRT MCF_QSPI1_QIR_ABRT
347  #define D4DLCD_QSPI_QIR_SPIF MCF_QSPI1_QIR_SPIF
348  #define D4DLCD_QSPI_QDLYR MCF_QSPI1_QDLYR
349  #define D4DLCD_QSPI_QDLYR_SPE MCF_QSPI1_QDLYR_SPE
350  #define D4DLCD_QSPI_QWR MCF_QSPI1_QWR
351  #define D4DLCD_QSPI_QWR_HALT MCF_QSPI1_QWR_HALT
352  #define D4DLCD_QSPI_QWR_CSIV MCF_QSPI1_QWR_CSIV
353  #define D4DLCD_QSPI_QWR_NEWQP MCF_QSPI1_QWR_NEWQP
354  #define D4DLCD_QSPI_QWR_ENDQP MCF_QSPI1_QWR_ENDQP
355  #define D4DLCD_QSPI_QMR MCF_QSPI1_QMR
356  #define D4DLCD_QSPI_QMR_MSTR MCF_QSPI1_QMR_MSTR
357  #define D4DLCD_QSPI_QAR MCF_QSPI1_QAR
358  #define D4DLCD_QSPI_QAR_CMD MCF_QSPI1_QAR_CMD
359  #define D4DLCD_QSPI_QAR_TRANS MCF_QSPI1_QAR_TRANS
360  #define D4DLCD_QSPI_QDR MCF_QSPI1_QDR
361  #define D4DLCD_QSPI_QDR_BITSE MCF_QSPI1_QDR_BITSE
362  #elif D4DLCD_COMM_HW_ID == 2
363  #define D4DLCD_QSPI_QIR MCF_QSPI2_QIR
364  #define D4DLCD_QSPI_QIR_WCEF MCF_QSPI2_QIR_WCEF
365  #define D4DLCD_QSPI_QIR_ABRT MCF_QSPI2_QIR_ABRT
366  #define D4DLCD_QSPI_QIR_SPIF MCF_QSPI2_QIR_SPIF
367  #define D4DLCD_QSPI_QDLYR MCF_QSPI2_QDLYR
368  #define D4DLCD_QSPI_QDLYR_SPE MCF_QSPI2_QDLYR_SPE
369  #define D4DLCD_QSPI_QWR MCF_QSPI2_QWR
370  #define D4DLCD_QSPI_QWR_HALT MCF_QSPI2_QWR_HALT
371  #define D4DLCD_QSPI_QWR_CSIV MCF_QSPI2_QWR_CSIV
372  #define D4DLCD_QSPI_QWR_NEWQP MCF_QSPI2_QWR_NEWQP
373  #define D4DLCD_QSPI_QWR_ENDQP MCF_QSPI2_QWR_ENDQP
374  #define D4DLCD_QSPI_QMR MCF_QSPI2_QMR
375  #define D4DLCD_QSPI_QMR_MSTR MCF_QSPI2_QMR_MSTR
376  #define D4DLCD_QSPI_QAR MCF_QSPI2_QAR
377  #define D4DLCD_QSPI_QAR_CMD MCF_QSPI2_QAR_CMD
378  #define D4DLCD_QSPI_QAR_TRANS MCF_QSPI2_QAR_TRANS
379  #define D4DLCD_QSPI_QDR MCF_QSPI2_QDR
380  #define D4DLCD_QSPI_QDR_BITSE MCF_QSPI2_QDR_BITSE
381  #endif
382 
383  #elif D4DLCD_COMM_HW == D4DLCD_COMM_HW_PAR_GPIO
384  #define LCD_READ_CMD_SUPPORT 1
385 
386 
387  #ifndef D4DLCD_INIT_RD
388  #ifndef D4DLCD_RD
389  #error "The Macro D4DLCD_RD must be set in LCD low level driver configuration file."
390  #else
391  #define D4DLCD_INIT_RD OUTPUT(D4DLCD_RD);
392  #endif
393  #endif
394 
395  #ifndef D4DLCD_ASSERT_RD
396  #ifndef D4DLCD_RD
397  #error "The Macro D4DLCD_RD must be set in LCD low level driver configuration file."
398  #else
399  #define D4DLCD_ASSERT_RD RESET(D4DLCD_RD);
400  #endif
401  #endif
402 
403  #ifndef D4DLCD_DEASSERT_RD
404  #ifndef D4DLCD_RD
405  #error "The Macro D4DLCD_RD must be set in LCD low level driver configuration file."
406  #else
407  #define D4DLCD_DEASSERT_RD SET(D4DLCD_RD);
408  #endif
409  #endif
410 
411 
412  #ifndef D4DLCD_INIT_WR
413  #ifndef D4DLCD_WR
414  #error "The Macro D4DLCD_WR must be set in LCD low level driver configuration file."
415  #else
416  #define D4DLCD_INIT_WR OUTPUT(D4DLCD_WR);
417  #endif
418  #endif
419 
420  #ifndef D4DLCD_ASSERT_WR
421  #ifndef D4DLCD_WR
422  #error "The Macro D4DLCD_WR must be set in LCD low level driver configuration file."
423  #else
424  #define D4DLCD_ASSERT_WR RESET(D4DLCD_WR);
425  #endif
426  #endif
427 
428  #ifndef D4DLCD_DEASSERT_WR
429  #ifndef D4DLCD_WR
430  #error "The Macro D4DLCD_WR must be set in LCD low level driver configuration file."
431  #else
432  #define D4DLCD_DEASSERT_WR SET(D4DLCD_WR);
433  #endif
434  #endif
435 
436 
437  #ifndef D4DLCD_INIT_DATA
438  #ifndef D4DLCD_DATA
439  #error "The Macro D4DLCD_DATA must be set in LCD low level driver configuration file."
440  #else
441  #define D4DLCD_INIT_DATA OUTPUT_ALL(D4DLCD_DATA);
442  #endif
443  #endif
444 
445  #else
446 
447  #define LCD_READ_CMD_SUPPORT 0
448 
449  #endif
450  #else
451 
452  #error "The Macro D4DLCD_COMM_HW must be set in LCD low level configuration file."
453 
454  #endif
455 
456 
457  /******************************************************************************
458  * Types
459  ******************************************************************************/
460 
461 
462  /******************************************************************************
463  * Macros
464  ******************************************************************************/
465 
466 
467 
468 
469 
470  /******************************************************************************
471  * Global variables
472  ******************************************************************************/
473 
474  /******************************************************************************
475  * Global functions
476  ******************************************************************************/
477 
478 
479 #endif
480 #endif /* __D4DLCD_D3000TFT2_1_H */
481 
482 #endif
D4D low level standard LCD Hardware interface API structure.
Definition: d4d_lldapi.h:163
#define D4D_LLD_LCD_HW
Definition: d4d_types.h:76