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 * 2020-08-07 NU-LL first version 9 */ 10 11 #ifndef __LCD_PORT_H__ 12 #define __LCD_PORT_H__ 13 14 #include <rtthread.h> 15 #include "lcd.h" 16 #include "st7735.h" 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 //LCD 23 #define LCD_HEIGHT (80U) 24 #define LCD_WIDTH (160U) 25 #define LCD_BITS_PER_PIXEL (16) 26 #define LCD_PIXEL_FORMAT (RTGRAPHIC_PIXEL_FORMAT_RGB565) 27 #define LCD_BUF_SIZE (LCD_WIDTH*LCD_HEIGHT*LCD_BITS_PER_PIXEL/8) 28 //PWM 29 #define LCD_PWM_DEV_NAME "pwm1" 30 #define LCD_PWM_DEV_CHANNEL (2) 31 //SPI 32 #define LCD_SPI_BUS_NAME "spi4" 33 #define LCD_SPI_DEV_NAME "spi40" 34 #define LCD_SPI_DEV_CS_GPIO (RT_NULL) 35 #define LCD_SPI_DEV_CS_PIN (RT_NULL) 36 37 #ifdef __cplusplus 38 } 39 #endif 40 41 #endif 42 43