1 /*
2  * Copyright (c) 2006-2024, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author         Notes
8  * 2018-07-28     liu2guang      the first version for STM32F469NI-Discovery.
9  */
10 
11 #ifndef __DRV_LCD_H_
12 #define __DRV_LCD_H_
13 
14 #include <rtthread.h>
15 #include <rtdevice.h>
16 
17 typedef enum
18 {
19     ROTATION_ZERO = 0,
20     ROTATION_090 = 90,
21     ROTATION_180 = 180,
22     ROTATION_270 = 270,
23 } bsp_rotation;
24 
25 #define LCD_WIDTH           DISPLAY_HSIZE_INPUT0
26 #define LCD_HEIGHT          DISPLAY_VSIZE_INPUT0
27 #define LCD_BITS_PER_PIXEL  DISPLAY_BITS_PER_PIXEL_INPUT1
28 #define LCD_PIXEL_FORMAT    RTGRAPHIC_PIXEL_FORMAT_RGB565
29 #define LCD_BUF_SIZE        (LCD_WIDTH * LCD_HEIGHT * LCD_BITS_PER_PIXEL / 8)
30 
31 #define LCD_XSTRIDE_PHYS          (((DISPLAY_BUFFER_STRIDE_PIXELS_INPUT0 * LCD_BITS_PER_PIXEL + 0x1FF) & 0xFFFFFE00) / LCD_BITS_PER_PIXEL)
32 #define LCD_NUM_FRAMEBUFFERS    (2)
33 
34 #define LCD_BL_PIN  BSP_IO_PORT_04_PIN_04
35 
36 #endif
37