24 #define MAGENTA 0xF81F
32 #define DARKBLUE 0x4C1C
33 #define LIGHTBLUE 0x67A
34 #define GRAYBLUE 0X5458
35 #define LIGHTGREEN 0X841F
37 #define LGRAYBLUE 0XA651
44 #define LCD_CTRLA CW_GPIOA
45 #define LCD_CTRLC CW_GPIOC
49 #define LCD_SCL GPIO_PIN_4
50 #define LCD_SDA GPIO_PIN_3
51 #define LCD_CS GPIO_PIN_0
53 #define LCD_LED GPIO_PIN_15
54 #define LCD_RS GPIO_PIN_1
55 #define LCD_RST GPIO_PIN_2
60 #define LCD_SCL_SET LCD_CTRLA->BSRR=LCD_SCL
61 #define LCD_SDA_SET LCD_CTRLA->BSRR=LCD_SDA
62 #define LCD_CS_SET LCD_CTRLA->BSRR=LCD_CS
65 #define LCD_LED_SET LCD_CTRLC->BSRR=LCD_LED
66 #define LCD_RS_SET LCD_CTRLA->BSRR=LCD_RS
67 #define LCD_RST_SET LCD_CTRLA->BSRR=LCD_RST
69 #define LCD_SCL_CLR LCD_CTRLA->BRR=LCD_SCL
70 #define LCD_SDA_CLR LCD_CTRLA->BRR=LCD_SDA
71 #define LCD_CS_CLR LCD_CTRLA->BRR=LCD_CS
73 #define LCD_LED_CLR LCD_CTRLC->BRR=LCD_LED
74 #define LCD_RST_CLR LCD_CTRLA->BRR=LCD_RST
75 #define LCD_RS_CLR LCD_CTRLA->BRR=LCD_RS
77 #define LCD_DATAOUT(x) LCD_DATA->ODR=x;
78 #define LCD_DATAIN LCD_DATA->IDR;
80 #define LCD_WR_DATA(data){\
94 #define X_MAX_PIXEL 160
95 #define Y_MAX_PIXEL 128
103 uint16_t Lcd_ReadReg(uint8_t LCD_Reg);
110 void Lcd_SetRegion(uint16_t x_start,uint16_t y_start,uint16_t x_end,uint16_t y_end);
112 void Lcd_Part_Clear(uint8_t x1,uint8_t y1,uint8_t x2,uint8_t y2,uint16_t Color);
void Lcd_SetXY(uint16_t x, uint16_t y)
设置lcd显示起始点
定义 Lcd_Driver.c:300
void Lcd_Clear(uint16_t Color)
全屏清屏函数
定义 Lcd_Driver.c:346
void Lcd_WriteReg(uint8_t Index, uint8_t Data)
向液晶屏寄存器写数据
定义 Lcd_Driver.c:122
void Gui_DrawPoint(uint16_t x, uint16_t y, uint16_t Data)
画一个点
定义 Lcd_Driver.c:314
void Lcd_SetRegion(uint16_t x_start, uint16_t y_start, uint16_t x_end, uint16_t y_end)
设置lcd显示区域,在此区域写点数据自动换行
定义 Lcd_Driver.c:274
void LCD_WriteData_16Bit(uint16_t Data)
向SPI总线传输一个16位数据
定义 Lcd_Driver.c:106
void LCD_GPIO_Init(void)
初始化LCD屏幕的GPIO配置
定义 Lcd_Driver.c:31
uint8_t lcd_brightness
LCD屏幕亮度
定义 Lcd_Driver.c:24
void Set_Lcd_Brightness(uint8_t light)
设置LCD屏幕的亮度
定义 Lcd_Driver.c:386
uint32_t Lcd_ReadPoint(uint16_t x, uint16_t y)
读TFT某一点的颜色
定义 Lcd_Driver.c:329
void Lcd_WriteIndex(uint8_t Index)
向液晶屏写一个8位指令
定义 Lcd_Driver.c:77
void Lcd_Part_Clear(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2, uint16_t Color)
部分区域清屏函数
定义 Lcd_Driver.c:368
void Lcd_Reset(void)
重置LCD屏幕
定义 Lcd_Driver.c:133
void Lcd_WriteData(uint8_t Data)
向液晶屏写一个8位数据
定义 Lcd_Driver.c:92
void Lcd_Init(void)
LCD屏幕初始化
定义 Lcd_Driver.c:147