eGUI alias D4D  Release 3.0
Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
d4dlcdhw_k70_lcdc.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 __D4DLCDHW_K70_LCDC_H
47 #define __D4DLCDHW_K70_LCDC_H
48 
49  #if (D4D_MK_STR(D4D_LLD_LCD_HW) == d4dlcdhw_k70_lcdc_ID)
50 
51  /******************************************************************************
52  * Includes
53  ******************************************************************************/
54  #include "d4dlcdhw_k70_lcdc_cfg.h"
55 
56  /******************************************************************************
57  * Constants
58  ******************************************************************************/
59 
60  // TWR-LCDRBG board revA - with TWR-K70 on SPI2
61  #define TWR_LCDRGB_A 1
62 
63  // TWR-LCDRBG board revB
64  #define TWR_LCDRGB_B 2
65 
66  #ifndef D4DLCDHWFB_DOUBLE_BUFFER
67  #define D4DLCDHWFB_DOUBLE_BUFFER 0
68  #endif
69 
70  #ifndef D4DLCDHWFB_DMA_ENABLE
71  #define D4DLCDHWFB_DMA_ENABLE 0
72  #endif
73 
74  #ifndef D4DLCDHWFB_DMA_CHANNEL
75  #define D4DLCDHWFB_DMA_CHANNEL 0
76  #endif
77 
78  #ifndef D4DLCDHWFB_DMA_CHPRI
79  #define D4DLCDHWFB_DMA_CHPRI (DMA_DCHPRI3_ECP_MASK | DMA_DCHPRI3_DPA_MASK | (D4DLCDHWFB_DMA_CHANNEL & 0xf))
80  #endif
81 
82  #define D4DLCDHWFB_DMA_INTVECT (INT_DMA0_DMA16 + (D4DLCDHWFB_DMA_CHANNEL & 0xf))
83 
84  #define D4DLCDHWFB_FRAMEBUFFER_SIZE ((D4DLCDHWFB_X_MAX * D4DLCDHWFB_Y_MAX * D4DLCDHWFB_BPP_BYTE) + 32) // add 32 to manage non alligned buffer at 16 byte (burst line)
85 
86  #ifndef D4DLCDHWFB_START_ADDRESS
87  #define D4DLCDHWFB_START_ADDRESS 0
88  #endif
89 
90  #ifndef D4DLCDHWFB_START_ADDRESS_2ND
91  #define D4DLCDHWFB_START_ADDRESS_2ND 0
92  #endif
93 
94  #ifndef D4DLCDHWFB_X_MAX
95  #define D4DLCDHWFB_X_MAX 480
96  #endif
97 
98  #ifndef D4DLCDHWFB_Y_MAX
99  #define D4DLCDHWFB_Y_MAX 800
100  #endif
101 
102  #ifndef D4DLCDHWFB_BPP_BYTE
103  #define D4DLCDHWFB_BPP_BYTE 4
104  #endif
105 
106  #ifndef D4DLCDHWFB_BPP
107  #define D4DLCDHWFB_BPP BPP24
108  #endif
109 
110  #ifndef D4DLCDHWFB_MIRROWED
111  #define D4DLCDHWFB_MIRROWED 0
112  #endif
113 
114  #ifndef D4DLCDHWFB_CACHE_FLUSH_ENABLE
115  #define D4DLCDHWFB_CACHE_FLUSH_ENABLE 0
116  #endif
117 
118  #ifndef D4DMOUSE_CURSOR_SIZE_X
119  #define D4DMOUSE_CURSOR_SIZE_X 16
120  #endif
121 
122  #ifndef D4DMOUSE_CURSOR_SIZE_Y
123  #define D4DMOUSE_CURSOR_SIZE_Y 16
124  #endif
125 
126  #ifndef D4DMOUSE_CURSOR_BMPFORMAT
127  #define D4DMOUSE_CURSOR_BMPFORMAT (D4D_BMP_ENDIAN_FLAG | D4D_BMP_16MNOPAL)
128  #endif
129 
130 // List of supported LCD Panels
131 // d4dlcdhw_k70_lcdc_twr_rgbA - TWR-LCD-RGB rev A; on TWR-K70 and SPI2 - it must be on TWR-PROTO board rerouted SPI2 signals
132 // d4dlcdhw_k70_lcdc_twr_rgbB - TWR-LCD_RGB rev B; general (it doesn't need SPI initialization)
133 
134  #ifndef D4D_LLD_LCD_HW_K70LCDC
135  #define D4D_LLD_LCD_HW_K70LCDC d4dlcdhw_k70_lcdc_twr_rgbB
136  #endif
137 
138 
139 
140 
141  /******************************************************************************
142  * Types
143  ******************************************************************************/
145  {
146  unsigned char (*D4DLCDHWFBK70LCDC_InitPanel)(void);
148 
149 
150  /******************************************************************************
151  * Macros
152  ******************************************************************************/
153 
154 
155  /******************************************************************************
156  * Global variables
157  ******************************************************************************/
158 
160 
161  /******************************************************************************
162  * Global functions
163  ******************************************************************************/
164 
165 
166 
167 /************************* Structure/Union Data types ************************/
168 
169 typedef enum
186 } ACD_DIV;
187 
188 
189 typedef enum
195 
196 typedef enum
197 {
198  BPP1=0,
199  BPP2=1,
200  BPP4=2,
201  BPP8=3,
202  BPP12=4,
203  BPP16=5,
204  BPP18=6,
206 } BPP_TYPE;
207 
208  #endif
209 #endif /* __D4DLCDHW_K70_LCDC_H */
210 
211 
212 
213 
214 
215 
216 
217 
218 
219 
unsigned char(* D4DLCDHWFBK70LCDC_InitPanel)(void)
struct D4DLCDHWFBK70LCDC_FUNCTIONS_S D4DLCDHWFBK70LCDC_FUNCTIONS
#define D4D_LLD_LCD_HW_K70LCDC