39 lines
977 B
C
Executable File
39 lines
977 B
C
Executable File
#ifndef __LCD_INIT_H
|
|
#define __LCD_INIT_H
|
|
|
|
#include "dir_lcd.h"
|
|
|
|
#define USE_HORIZONTAL 2 //设置横屏或者竖屏显示 0或1为竖屏 2或3为横屏
|
|
|
|
|
|
#if USE_HORIZONTAL==0||USE_HORIZONTAL==1
|
|
#define LCD_W 480
|
|
#define LCD_H 320
|
|
|
|
#else
|
|
#define LCD_W 480
|
|
#define LCD_H 320
|
|
#endif
|
|
|
|
#define SYSFS_GPIO_HIGHT "1"
|
|
#define SYSFS_GPIO_LOW "0"
|
|
|
|
|
|
|
|
// #define LCD_BLK_Clr() HAL_GPIO_WritePin(LCD_BLK_GPIO_Port,LCD_BLK_Pin,GPIO_PIN_RESET)//BLK
|
|
// #define LCD_BLK_Set() HAL_GPIO_WritePin(LCD_BLK_GPIO_Port,LCD_BLK_Pin,GPIO_PIN_SET)
|
|
|
|
|
|
void LCD_GPIO_Init(void);//初始化GPIO
|
|
void LCD_Writ_Bus(u_int8_t dat);//模拟SPI时序
|
|
void LCD_WR_DATA8(u_int8_t dat);//写入一个字节
|
|
void LCD_WR_DATA(u_int16_t dat);//写入两个字节
|
|
void LCD_WR_REG(u_int8_t dat);//写入一个指令
|
|
void LCD_Address_Set(u_int16_t x1,u_int16_t y1,u_int16_t x2,u_int16_t y2);//设置坐标函数
|
|
void LCD_Init(void);//LCD初始化
|
|
#endif
|
|
|
|
|
|
|
|
|