graphics_dc_lcd_drv.h
Go to the documentation of this file.
1 /**
2 ****************************************************************************************
3 *
4 * @file graphics_dc_lcd_drv.h
5 * @author BLE Driver Team
6 * @brief Header file containing functions prototypes of Graphics library.
7 *
8 ****************************************************************************************
9 * @attention
10 #####Copyright (c) 2019 GOODIX
11 All rights reserved.
12
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions are met:
15 * Redistributions of source code must retain the above copyright
16 notice, this list of conditions and the following disclaimer.
17 * Redistributions in binary form must reproduce the above copyright
18 notice, this list of conditions and the following disclaimer in the
19 documentation and/or other materials provided with the distribution.
20 * Neither the name of GOODIX nor the names of its contributors may be used
21 to endorse or promote products derived from this software without
22 specific prior written permission.
23
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 POSSIBILITY OF SUCH DAMAGE.
35 ****************************************************************************************
36 */
37
38 /** @addtogroup GRAPHICS_SDK Graphics
39 * @{
40 */
41
42 /** @addtogroup GRAPHICS_PORTING Porting
43 * @{
44 */
45
46 /** @defgroup GRAPHICS_DC_LCD_DRV DC LCD DRV
47 * @brief LCD Driver reference design for DC Module.
48 * @{
49 */
50
51 #ifndef __GRAPHICS_DC_LCD_DRV_H__
52 #define __GRAPHICS_DC_LCD_DRV_H__
53
54 #include "grx_sys.h"
55 #include "app_graphics_dc.h"
56
57 /**
58 * @addtogroup GRAPHICS_DC_LCD_DRV_MACRO Defines
59 * @{
60 */
61 /** @defgroup GRAPHICS_DC_LCD_DRV_RES_DEFINE The LCD resolution definition
62 * @{
63 */
64 #define LCD_RES_390 0 /**< The resolution is 390X390 */
65 #define LCD_RES_454 1 /**< The resolution is 454X454*/
66 #define LCD_RES_360 2 /**< The resolution is 360X360*/
67 /** @} */
68
69 /** @defgroup GRAPHICS_DC_IS_SK_BOARD_DEFINE The board definition
70 * @{
71 */
72 #define IS_SK_BOARD 1 /* 0 - EVB Board
73 * 1 - SK Board
74 */
75 /** @} */
76
77 /** @defgroup GRAPHICS_DC_LCD_DRV_RES_TYPE Typedef
78 * @{
79 */
80 typedef uint32_t lcd_res_e; /**< The LCD resolution type */
81 /** @} */
82
83 /** @} */
84
85 /** @addtogroup GRAPHICS_DC_LCD_DRV_ENUM Enumerations
86 * @{
87 */
88 /**
89 * @brief Lcd pixel mode
90 */
91 typedef enum {
92 LCD_PIXEL_mode_16bit = 0, /**< The lcd pixel is 16bits */
93 LCD_PIXEL_mode_24bit, /**< The lcd pixel is 24bits */
94 } lcd_pixel_mode_e;
95 /** @} */
96
97 /**
98 * @defgroup GRAPHICS_DC_LCD_DRV_FUNCTION Functions
99 * @{
100 */
101 /**
102 *****************************************************************************************
103 * @brief DC rm69330 qspi lcd init
104 *
105 * @param[in] res: The lcd resolution
106 * @param[in] pixel_mode: The lcd pixel mode
107 * @param[in] mipi_format: The DC output mode
108 *****************************************************************************************
109 */
110 void graphics_dc_rm69330_qspi_lcd_init(lcd_res_e res, lcd_pixel_mode_e pixel_mode, graphics_dc_mipi_format_e mipi_format) ;
111
112 /**
113 *****************************************************************************************
114 * @brief DC rm69330 lcd test
115 *
116 * @param[in] res: The lcd resolution
117 * @param[in] pixel_mode: The lcd pixel mode
118 * @param[in] frame_timing: The DC output frame timing
119 * @param[in] mipi_format: The DC output mode
120 *****************************************************************************************
121 */
122 void graphics_dc_rm69330_qspi_lcd_test(lcd_res_e res, lcd_pixel_mode_e pixel_mode, app_graphics_dc_frame_timing_e frame_timing, graphics_dc_mipi_format_e mipi_format);
123
124 /**
125 *****************************************************************************************
126 * @brief DC rm69330 lcd set show area for qspi output
127 *
128 * @param[in] x1: The X start
129 * @param[in] x2: The X end
130 * @param[in] y1: The Y start
131 * @param[in] y2: The Y end
132 *****************************************************************************************
133 */
134 void graphics_dc_rm69330_qspi_lcd_set_show_area(uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2);
135
136 /**
137 *****************************************************************************************
138 * @brief DC rm69330 lcd send one frame data
139 *
140 * @param[in] layer0: The Layer number
141 * @param[in] lcd_w: The W resolution
142 * @param[in] lcd_h: The H resolution
143 *****************************************************************************************
144 */
145 void graphics_dc_rm69330_qspi_send_frame(app_graphics_dc_framelayer_t layer0, uint32_t lcd_w, uint32_t lcd_h);
146
147 /**
148 *****************************************************************************************
149 * @brief DC rm69330 dspi lcd init
150 *
151 * @param[in] res: The lcd resolution
152 * @param[in] pixel_mode: The lcd pixel mode
153 * @param[in] mipi_format: The DC output mode
154 *****************************************************************************************
155 */
156 void graphics_dc_st7789_dspi_lcd_init(lcd_res_e res, lcd_pixel_mode_e pixel_mode, graphics_dc_mipi_format_e mipi_format);
157
158 /**
159 *****************************************************************************************
160 * @brief DC rm69330 lcd set show area for dspi output
161 *
162 * @param[in] x1: The X start
163 * @param[in] x2: The X end
164 * @param[in] y1: The Y start
165 * @param[in] y2: The Y end
166 *****************************************************************************************
167 */
168 void graphics_dc_st7789_dspi_lcd_set_show_area(uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2);
169
170 /**
171 *****************************************************************************************
172 * @brief DC rm69330 spi lcd init
173 *
174 * @param[in] res: The lcd resolution
175 * @param[in] pixel_mode: The lcd pixel mode
176 * @param[in] mipi_format: The DC output mode
177 *****************************************************************************************
178 */
179 void graphics_dc_rm69330_spi_lcd_init(lcd_res_e res, lcd_pixel_mode_e pixel_mode, graphics_dc_mipi_format_e mipi_format);
180
181 /**
182 *****************************************************************************************
183 * @brief DC rm69330 lcd set show area for spi output
184 *
185 * @param[in] x1: The X start
186 * @param[in] x2: The X end
187 * @param[in] y1: The Y start
188 * @param[in] y2: The Y end
189 *****************************************************************************************
190 */
191 void graphics_dc_rm69330_spi_lcd_set_show_area(uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2);
192
193 /**
194 *****************************************************************************************
195 * @brief DC fls-amo139 qspi lcd init
196 *
197 * @param[in] res: The lcd resolution
198 * @param[in] pixel_mode: The lcd pixel mode
199 * @param[in] mipi_format: The DC output mode
200 *****************************************************************************************
201 */
202 void graphics_dc_am139_qspi_lcd_init(lcd_res_e res, lcd_pixel_mode_e pixel_mode, graphics_dc_mipi_format_e mipi_format);
203
204
205 /**
206 *****************************************************************************************
207 * @brief DC fls-amo139 lcd set show area for qspi output
208 *
209 * @param[in] x1: The X start
210 * @param[in] x2: The X end
211 * @param[in] y1: The Y start
212 * @param[in] y2: The Y end
213 *****************************************************************************************
214 */
215 void graphics_dc_am139_qspi_lcd_set_show_area(uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2);
216
217 /**
218 *****************************************************************************************
219 * @brief DC fls-amo139 lcd send one frame data
220 *
221 * @param[in] layer0: The Layer number
222 * @param[in] lcd_w: The W resolution
223 * @param[in] lcd_h: The H resolution
224 *****************************************************************************************
225 */
226 void graphics_dc_am139_qspi_send_frame(app_graphics_dc_framelayer_t layer0, uint32_t lcd_w, uint32_t lcd_h);
227
228
229 /** @} */
230
231 #endif /* __GRAPHICS_DC_LCD_DRV_H__ */
232
233 /** @} */
234 /** @} */
235 /** @} */
236
graphics_dc_am139_qspi_lcd_init
void graphics_dc_am139_qspi_lcd_init(lcd_res_e res, lcd_pixel_mode_e pixel_mode, graphics_dc_mipi_format_e mipi_format)
DC fls-amo139 qspi lcd init.
graphics_dc_am139_qspi_send_frame
void graphics_dc_am139_qspi_send_frame(app_graphics_dc_framelayer_t layer0, uint32_t lcd_w, uint32_t lcd_h)
DC fls-amo139 lcd send one frame data.
graphics_dc_rm69330_spi_lcd_set_show_area
void graphics_dc_rm69330_spi_lcd_set_show_area(uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2)
DC rm69330 lcd set show area for spi output.
lcd_res_e
uint32_t lcd_res_e
The LCD resolution type
Definition: graphics_dc_lcd_drv.h:78
graphics_dc_am139_qspi_lcd_set_show_area
void graphics_dc_am139_qspi_lcd_set_show_area(uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2)
DC fls-amo139 lcd set show area for qspi output.
app_graphics_dc_framelayer_t
Define DC Frame Layer configuration.
Definition: app_graphics_dc.h:276
LCD_PIXEL_mode_16bit
@ LCD_PIXEL_mode_16bit
The lcd pixel is 16bits.
Definition: graphics_dc_lcd_drv.h:90
app_graphics_dc_frame_timing_e
app_graphics_dc_frame_timing_e
Define the Output Frame Timing for DC.
Definition: app_graphics_dc.h:215
graphics_dc_rm69330_qspi_lcd_test
void graphics_dc_rm69330_qspi_lcd_test(lcd_res_e res, lcd_pixel_mode_e pixel_mode, app_graphics_dc_frame_timing_e frame_timing, graphics_dc_mipi_format_e mipi_format)
DC rm69330 lcd test.
lcd_pixel_mode_e
lcd_pixel_mode_e
Lcd pixel mode.
Definition: graphics_dc_lcd_drv.h:89
app_graphics_dc.h
Header file containing functions prototypes of DC app library.
graphics_dc_rm69330_qspi_lcd_init
void graphics_dc_rm69330_qspi_lcd_init(lcd_res_e res, lcd_pixel_mode_e pixel_mode, graphics_dc_mipi_format_e mipi_format)
DC rm69330 qspi lcd init.
LCD_PIXEL_mode_24bit
@ LCD_PIXEL_mode_24bit
The lcd pixel is 24bits.
Definition: graphics_dc_lcd_drv.h:91
graphics_dc_rm69330_spi_lcd_init
void graphics_dc_rm69330_spi_lcd_init(lcd_res_e res, lcd_pixel_mode_e pixel_mode, graphics_dc_mipi_format_e mipi_format)
DC rm69330 spi lcd init.
grx_sys.h
GR55XX System API.
graphics_dc_mipi_format_e
graphics_dc_mipi_format_e
Define the Output MIPI Timing for DATA Phase of DC Timing of MIPICFG_2RGB888_OPT1 is True MIPICFG_2RG...
Definition: app_graphics_dc.h:192
graphics_dc_rm69330_qspi_send_frame
void graphics_dc_rm69330_qspi_send_frame(app_graphics_dc_framelayer_t layer0, uint32_t lcd_w, uint32_t lcd_h)
DC rm69330 lcd send one frame data.
graphics_dc_rm69330_qspi_lcd_set_show_area
void graphics_dc_rm69330_qspi_lcd_set_show_area(uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2)
DC rm69330 lcd set show area for qspi output.
graphics_dc_st7789_dspi_lcd_init
void graphics_dc_st7789_dspi_lcd_init(lcd_res_e res, lcd_pixel_mode_e pixel_mode, graphics_dc_mipi_format_e mipi_format)
DC rm69330 dspi lcd init.
graphics_dc_st7789_dspi_lcd_set_show_area
void graphics_dc_st7789_dspi_lcd_set_show_area(uint16_t x1, uint16_t x2, uint16_t y1, uint16_t y2)
DC rm69330 lcd set show area for dspi output.