#ifndef _LCD_FUNC_H_
#define _LCD_FUNC_H_

#include "math.h"
#include "type.h"

// GBR
#define grBLACK					0x0000
#define grBLUE						0x000F
#define grCYAN      				0x03E8
#define grGREEN     				0x03C0
#define grMAGENTA   				0x7BE0
#define grRED						0x7800
#define grBROWN		  			0x03EF
#define grGRAY						0x39E7
#define grLTBLUE   				0x001F
#define grLTCYAN					0x07FF
#define grLTGREEN   				0x07E0
#define grLTMAGENTA				0xF81F
#define grLTRED   				0xF800
#define grYELLOW					0xFFE0
#define grLTGRAY					0x7BEF
#define grWHITE					0xFFFF

#define FONT_8x16					0
#define FONT_12x24				1


#define TRANSPARENCY				0
#define OPAQUE						1


extern UINT16 LCD_XSIZE_TFT;
extern UINT16 LCD_YSIZE_TFT;


void LT268_TFT_SetWindows(UINT16 XStar,UINT16 yStar,UINT16 Width,UINT16 High);
void ST7789VPanelSleepInMode(void);
void ST7789VPanelSleepOutMode(void);
void LT268_Display_ON(void);
void LT268_Display_OFF(void);

//LCD_pin_test
void LCD_PIN_TEST(void);


void LT268_TFT_DrawLine(UINT16 x1,UINT16 y1,UINT16 x2,UINT16 y2,UINT16 color);
void LT268_TFT_DrawCircle(UINT16 xc, UINT16 yc, UINT16 r, UINT16 color);

void LT268_TFT_FillColor(UINT16 x,UINT16 y,UINT16 Width,UINT16 High,UINT16 color);
void LT268_TFT_DrawPoint(UINT16 x,UINT16 y,UINT16 color);
void LT268_TFT_DrawSquare_Fill(UINT16 x1,UINT16 y1,UINT16 x2,UINT16 y2,UINT16 color);

void TFT_Data_Tran(UINT8* Tx_Addr, UINT32 length);
void TFT_Data_Tran2(UINT16 Tx_Addr, UINT32 length);

extern void Display_Text(UINT16 x,UINT16 y,UINT8 size,UINT8 transparency,UINT16 fgColor,UINT16 bgColor,char *str);
extern void Display_16BitBMP(UINT16 x,UINT16 y,unsigned const char *bmp,UINT16 transColor);
extern void Screen_Clear(UINT16 color);
	
#endif


