#ifndef __LCD_DRIVE__
#define __LCD_DRIVE__

#include<reg52.h>

#define	DataH	P2
#define	DataL	P0
sbit	TFT_CS	=	P1^0;
sbit	RES	=P1^4;
sbit	RS	=	P1^1;
sbit	WRB	=	P1^2;
sbit	RDB	=	P1^3;

sbit	KEY =	P3^3;

#define Bcolor 	0xf800	  //显示IC   背景颜色
#define Fcolor 	0xffff			  //显示IC   字体颜色
#define FBcolor	0x001F		  //显示IC   字体背景颜色




void Display_ID();
void UART_init();
void UART_send_data(unsigned char lcdid);
void LCD_init();
unsigned int LCD_ID(unsigned int dat);
unsigned int LCD_ID_61581(unsigned int dat);
void LCD_read_id61581();
unsigned int LCD_ID_9341(unsigned int dat);
void LCD_read_8347id();
void LCD_read_id();
void LCD_read_id9341();
void HD_reset();
void LCD_WRITE_CMD(char cmd1,char cmd2);
void LCD_WRITE_DATA(char dataa,char datab);
void LLCD_WRITE_CMD(int cmd);
void LLCD_WRITE_DATA(int dataa);
void seng_cmd_dat(int cmd,int dataa);
void GUI_sprintf_string(unsigned char x, unsigned int y,char code *s, unsigned int color,unsigned int b_color);
void GUI_sprintf_char(unsigned char x, unsigned int y,unsigned char c, unsigned int color,unsigned int b_color);
void GUI_Point(unsigned char x, unsigned int y, unsigned int color);
void LCD_setxy(unsigned char x,unsigned int y);
void LCD_setwindow(unsigned char x0,unsigned int y0,unsigned char x1,unsigned int y1);
void LCD_TEST_SingleColor(unsigned int color);
void Keypress();
void delayms(unsigned int value);
void delayus(int value1);
void LLCD_TEST_SingleColor(void);


#endif