KT25-1015_AC695x_SDK310/apps/kaotings/drv_st7789.h

53 lines
1.2 KiB
C
Raw Normal View History

2026-02-12 13:11:00 +00:00
#ifndef __DRV_ST7789_H__
#define __DRV_ST7789_H__
#include "kt.h"
#define LCD_SPI_CFG 2
#define LCD_RST_PIN IO_PORTB_07
#define LCD_CS_PIN IO_PORTB_08
#define LCD_CLK_PIN IO_PORTB_09
#define LCD_DATA_PIN IO_PORTB_10
#define LCD_DC_PIN IO_PORTB_11
#define LCD_TE_PIN IO_PORTA_12
#define LCD_BL_PIN IO_PORTC_02
#define USE_HORIZONTAL 0
#define LCD_COLUMN_OFFSET 0
#define LCD_LINE_OFFSET 0
#if USE_HORIZONTAL==0||USE_HORIZONTAL==1
#define LCD_W 240
#define LCD_H 320
#else
#define LCD_W 320
#define LCD_H 240
#endif
#define WHITE 0xFFFF
#define BLACK 0x0000
#define BLUE 0x001F
#define BRED 0XF81F
#define GRED 0XFFE0
#define GBLUE 0X07FF
#define RED 0xF800
#define MAGENTA 0xF81F
#define GREEN 0x07E0
#define CYAN 0x7FFF
#define YELLOW 0xFFE0
#define BROWN 0XBC40
#define BRRED 0XFC07
#define GRAY 0X8430
#define DARKBLUE 0X01CF
#define LIGHTBLUE 0X7D7C
#define GRAYBLUE 0X5458
#define LIGHTGREEN 0X841F
#define LGRAY 0XC618
#define LGRAYBLUE 0XA651
#define LBBLUE 0X2B12
void lcd_st7789_init(void);
#endif