www.pudn.com > hf44b0_TEST.rar > LCDLIB.H


#ifndef __LCDLIB_H__ 
#define __LCDLIB_H__ 
 
#include "..\inc\option.h" 
 
void Lcd_Init(int depth); 
void Lcd_MoveViewPort(int vx,int vy,int depth); 
 
 
#define TLCD_160_160	(0) 
#define CLCD_240_320	(1) 
#define MLCD_320_240	(2) 
#define LCD_TYPE	TLCD_160_160 
 
#define MODE_MONO 	(1) 
#define MODE_G4	  	(4) 
#define MODE_G16  	(16) 
#define MODE_COLOR 	(256) 
 
#if (LCD_TYPE==TLCD_160_160) 
#define SCR_XSIZE 	(320)   
#define SCR_YSIZE 	(320) 
 
#define LCD_XSIZE 	(160) 
#define LCD_YSIZE 	(160) 
 
#elif (LCD_TYPE==MLCD_320_240) 
#define SCR_XSIZE 	(320)   
#define SCR_YSIZE 	(240) 
 
#define LCD_XSIZE 	(320) 
#define LCD_YSIZE 	(240) 
 
#elif (LCD_TYPE==CLCD_240_320) 
#define SCR_XSIZE 	(640)   
#define SCR_YSIZE 	(480) 
 
#define LCD_XSIZE 	(240) 
#define LCD_YSIZE 	(320) 
#endif 
 
#define M5D(n) ((n) & 0x1fffff) 
 
#define ARRAY_SIZE_MONO 	(SCR_XSIZE/8*SCR_YSIZE) 
#define ARRAY_SIZE_G4   	(SCR_XSIZE/4*SCR_YSIZE) 
#define ARRAY_SIZE_G16  	(SCR_XSIZE/2*SCR_YSIZE) 
#define ARRAY_SIZE_COLOR 	(SCR_XSIZE/1*SCR_YSIZE) 
 
#define HOZVAL			(LCD_XSIZE/4-1) 
#define HOZVAL_COLOR		(LCD_XSIZE*3/8-1) 
#define LINEVAL			(LCD_YSIZE-1) 
#define MVAL			(13) 
//#define CLKVAL_MONO 		(19)  //60Mhz, CLKVAL=19 ->78.6Hz 
//#define CLKVAL_G4 		(19)  //60Mhz, CLKVAL=19 ->78.6Hz 
//#define CLKVAL_G16 		(19)  //60Mhz, CLKVAL=19 ->78.6Hz 
//#define CLKVAL_COLOR 		(19)  //60Mhz, CLKVAL=19 ->78.6Hz 
 
#define CLKVAL_MONO 		(13)  //60Mhz, CLKVAL=19 ->78.6Hz 
#define CLKVAL_G4 		(13)  //60Mhz, CLKVAL=19 ->78.6Hz 
#define CLKVAL_G16 		(13)  //60Mhz, CLKVAL=19 ->78.6Hz 
#define CLKVAL_COLOR 		(10)  //60Mhz, CLKVAL=19 ->78.6Hz 
 
 
 
 
 
extern unsigned int (*frameBuffer1)[SCR_XSIZE/32]; 
extern unsigned int (*frameBuffer4)[SCR_XSIZE/16]; 
extern unsigned int (*frameBuffer16)[SCR_XSIZE/8]; 
extern unsigned int (*frameBuffer256)[SCR_XSIZE/4]; 
 
#endif /*__LCDLIB_H__*/