www.pudn.com > BIOS-S3C2410.rar > LCD.h


/************************************************************** 
The initial and control for 320×240 16Bpp TFT LCD----LTV350QV-F05 
**************************************************************/ 
 
#define MVAL		(13) 
#define MVAL_USED 	(0)		//0=each frame   1=rate by MVAL 
#define INVVDEN		(1)		//0=normal       1=inverted 
#define BSWP		(0)		//Byte swap control 
#define HWSWP		(1)		//Half word swap control 
 
#define M5D(n) ((n) & 0x1fffff)	// To get lower 21bits 
 
//TFT 240320 
#define LCD_XSIZE_TFT_320240 	(320)	 
#define LCD_YSIZE_TFT_320240 	(240) 
 
//TFT 320240 
//#define SCR_XSIZE_TFT_240320 	(640) 
//#define SCR_YSIZE_TFT_240320 	(480) 
#define SCR_XSIZE_TFT_320240 	(320) 
#define SCR_YSIZE_TFT_320240 	(240) 
 
//TFT320240 
#define HOZVAL_TFT_320240	(LCD_XSIZE_TFT_320240-1) 
#define LINEVAL_TFT_320240	(LCD_YSIZE_TFT_320240-1) 
 
/* 
//Timing parameter for LCD ---- LTS350Q1-PE1 
#define VBPD_240320		(14)		//垂直同步信号的后肩 
#define VFPD_240320		(2)		//垂直同步信号的前肩 
#define VSPW_240320		(4)		//垂直同步信号的脉宽 
 
#define HBPD_240320		(8)		//水平同步信号的后肩 
#define HFPD_240320		(8)		//水平同步信号的前肩 
#define HSPW_240320		(4)		//水平同步信号的脉宽 
*/ 
 
//Timing parameter for LCD ---- LQ035Q7DB02 
/* 
#define VBPD_240320		(2)		//垂直同步信号的后肩 
#define VFPD_240320		(2)		//垂直同步信号的前肩 
#define VSPW_240320		(4)		//垂直同步信号的脉宽 
 
#define HBPD_240320		(8)		//水平同步信号的后肩 
#define HFPD_240320		(8)		//水平同步信号的前肩 
#define HSPW_240320		(6)		//水平同步信号的脉宽 
*/ 
//Timing parameter for LCD ---- LQ035Q7DB02 
#define VBPD_320240		(4)		//垂直同步信号的后肩 
#define VFPD_320240		(4)		//垂直同步信号的前肩 
#define VSPW_320240		(4)		//垂直同步信号的脉宽 
 
#define HBPD_320240		(13)	//水平同步信号的后肩 
#define HFPD_320240		(4)		//水平同步信号的前肩 
#define HSPW_320240		(18)	//水平同步信号的脉宽 
 
 
#define CLKVAL_TFT_320240	(7) 	 
//FCLK=180MHz,HCLK=90MHz,VCLK=6.5MHz 
 
//TFT 320240 
extern volatile unsigned short LCD_BUFER[SCR_XSIZE_TFT_320240][SCR_YSIZE_TFT_320240]; 
 
void Lcd_Init(void); 
void Lcd_EnvidOnOff(int onoff); 
void Lcd_Lpc3600Enable(void); 
void Lcd_PowerEnable(int invpwren,int pwren); 
 
void MoveViewPort(void); 
void Lcd_MoveViewPort(int vx,int vy); 
 
void PutPixel(U32 x,U32 y,U32 c); 
 
void Glib_Rectangle(int x1,int y1,int x2,int y2,int color); 
void Glib_FilledRectangle(int x1,int y1,int x2,int y2,int color); 
void Glib_Line(int x1,int y1,int x2,int y2,int color); 
void Lcd_ClearScr(U16 c); 
 
void Paint_Bmp(int x0,int y0,int h,int l,unsigned char bmp[]); 
 
void Test_Lcd_Tft_16Bpp_320_240(void);