⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lcdlib.h

📁 三星的44B0液晶测试程序 44B0TESTlcd 是 sharp lm64p70 , lm64p72 的综合测试程序。 简易彩色液晶键盘 是带键盘的320*240 彩色液晶综合测试程序 (附
💻 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_240	(0)
#define CLCD_240_320	(1)
#define MLCD_320_240	(2)
#define MLCD_640_480	(3)
#define LCD_TYPE	MLCD_640_480

#define MODE_MONO 	(1)
#define MODE_G4	  	(4)
#define MODE_G16  	(16)
#define MODE_COLOR 	(256)

#if (LCD_TYPE==TLCD_160_240)
#define SCR_XSIZE 	(160)  
#define SCR_YSIZE 	(240)

#define LCD_XSIZE 	(160)
#define LCD_YSIZE 	(240)

#elif (LCD_TYPE==MLCD_320_240)
#define SCR_XSIZE 	(640)  
#define SCR_YSIZE 	(480)

#define LCD_XSIZE 	(320)
#define LCD_YSIZE 	(240)

#elif (LCD_TYPE==MLCD_640_480)
#define SCR_XSIZE 	(640)  
#define SCR_YSIZE 	(480)

#define LCD_XSIZE 	(640)
#define LCD_YSIZE 	(480)

#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) & 0x3fffff)

#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/2-1)
#define MVAL			(10)
//#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 		(10)  //60Mhz, CLKVAL=19 ->78.6Hz   //13
#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__*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -