1 /*
2  * Copyright (c) 2006-2023, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author            Notes
8  * 2023-03-24     spaceman          the first version
9  */
10 
11 #ifndef __LCD_PORT_H__
12 #define __LCD_PORT_H__
13 
14 #include <rtthread.h>
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 //LCD
21 #define LCD_HEIGHT          (240U)
22 #define LCD_WIDTH           (240U)
23 #define LCD_BITS_PER_PIXEL  (16)
24 #define LCD_PIXEL_FORMAT    (RTGRAPHIC_PIXEL_FORMAT_RGB565)
25 #define LCD_BUF_SIZE        (LCD_WIDTH*LCD_HEIGHT*LCD_BITS_PER_PIXEL/8)
26 //BACKLIGHT
27 #define LCD_BACKLIGHT_PIN   (GET_PIN(D, 15))
28 //CMD/DATA
29 #define LCD_CMD_DATA_PIN    (GET_PIN(E, 15))
30 //SPI
31 #define LCD_SPI_BUS_NAME    "spi4"
32 #define LCD_SPI_DEV_NAME    "spi40"
33 #define LCD_SPI_DEV_CS_PIN  (GET_PIN(E, 11))
34 #define LCD_SPI_MAX_SPEED   (60 * 1000 *1000)    /* 60M */
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 #endif /* __LCD_PORT_H__ */
41 
42