1 /*
2  * Copyright (c) 2006-2022, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  * 2019-01-08     zylx         first version
9  */
10 
11 #ifndef __LCD_PORT_H__
12 #define __LCD_PORT_H__
13 
14 /* atk 4.3 inch screen, 800 * 480 */
15 
16 struct drv_lcd_device
17 {
18     struct rt_device parent;
19 
20     struct rt_device_graphic_info lcd_info;
21 
22     struct rt_semaphore lcd_lock;
23 
24     /* 0:front_buf is being used 1: back_buf is being used*/
25     rt_uint8_t cur_buf;
26     rt_uint8_t *front_buf;
27     rt_uint8_t *back_buf;
28 };
29 
30 #define LCD_WIDTH           800
31 #define LCD_HEIGHT          480
32 #define LCD_BITS_PER_PIXEL  24
33 #define LCD_BUF_SIZE        (LCD_WIDTH * LCD_HEIGHT * LCD_BITS_PER_PIXEL / 8)
34 #define LCD_PIXEL_FORMAT    RTGRAPHIC_PIXEL_FORMAT_RGB888
35 
36 #define LCD_HSYNC_WIDTH     1
37 #define LCD_VSYNC_HEIGHT    1
38 #define LCD_HBP             88
39 #define LCD_VBP             32
40 #define LCD_HFP             40
41 #define LCD_VFP             13
42 
43 #define LCD_BACKLIGHT_USING_GPIO
44 #define LCD_BL_GPIO_NUM     GET_PIN(D, 4)
45 #define LCD_DISP_GPIO_NUM   GET_PIN(B, 5)
46 /* atk 4.3 inch screen, 800 * 480 */
47 
48 #endif /* __LCD_PORT_H__ */
49