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

📄 lcd.h

📁 2440超级bios(ads1.2 rvds2.2)通用
💻 H
字号:

#ifndef __LCD_H__
#define __LCD_H__

#define LTS350Q1			1		// samsung
#define LTV350QVF04			2		// samsung
#define PHE350Q1			3		// powertip
#define MT502TML8B			4		// shanghai
#define PHE480272			5		// powertip
#define WX3500F				6		// WANXIN

#define LCD_TYPE			LTV350QVF04

#if 	(LCD_TYPE == LTS350Q1)
	#define LCD_XSIZE		240
	#define LCD_YSIZE		320
//con1
	#define CLKVAL			8
	#define MMODE			0
	#define PNRMODE			3
	#define BPPMODE			12
//con2
	#define VBPD			3
	//line val
	#define VFPD			5
	#define VSPW			15
//con3
	#define HBPD			5
	//hozval
	#define HFPD			15
//con4
	#define MVAL			13
	#define HSPW			8
//con5
	#define BPP24BL			0
	#define FRM565			1
	#define INVVCLK			0
	#define INVVLINE		1
	#define INVVFRAME		1
	#define INVVD			0
	#define INVVDEN			0
	#define INVPWREN		0
	#define INVENDLINE		0
	#define PWREN			1
	#define ENLEND			0
	#define BSWP			0
	#define HWSWP			0
#elif 	(LCD_TYPE == LTV350QVF04)
	#define LCD_XSIZE		320
	#define LCD_YSIZE		240
//con1
	#define CLKVAL			6
	#define MMODE			0
	#define PNRMODE			3
	#define BPPMODE			12
//con2
	#define VBPD			(10-1)
	//line val
	#define VFPD			(1-1)
	#define VSPW			(22-1)
//con3
	#define HBPD			(22-1)
	//hozval
	#define HFPD			(2-1)
//con4
	#define MVAL			13
	#define HSPW			(10-1)
//con5
	#define BPP24BL			0
	#define FRM565			1
	#define INVVCLK			1
	#define INVVLINE		1
	#define INVVFRAME		1
	#define INVVD			0
	#define INVVDEN			0
	#define INVPWREN		0
	#define INVENDLINE		0
	#define PWREN			0
	#define ENLEND			0
	#define BSWP			0
	#define HWSWP			0
#elif 	(LCD_TYPE == PHE350Q1)
	#define LCD_XSIZE		320
	#define LCD_YSIZE		240
//con1
	#define CLKVAL			4
	#define MMODE			0
	#define PNRMODE			3
	#define BPPMODE			12
//con2
	#define VBPD			(2-1)
	//line val
	#define VFPD			(8-1)
	#define VSPW			(17-1)
//con3
	#define HBPD			(12-1)
	//hozval
	#define HFPD			(2-1)
//con4
	#define MVAL			13
	#define HSPW			(56-1)
//con5
	#define BPP24BL			0
	#define FRM565			1
	#define INVVCLK			1
	#define INVVLINE		1
	#define INVVFRAME		1
	#define INVVD			1
	#define INVVDEN			0
	#define INVPWREN		0
	#define INVENDLINE		0
	#define PWREN			1
	#define ENLEND			0
	#define BSWP			0
	#define HWSWP			0
#elif 	(LCD_TYPE == MT502TML8B)
	#define LCD_XSIZE		320
	#define LCD_YSIZE		240
//con1
	#define CLKVAL			4
	#define MMODE			0
	#define PNRMODE			3
	#define BPPMODE			12
//con2
	#define VBPD			(2-1)
	//line val
	#define VFPD			(8-1)
	#define VSPW			(17-1)
//con3
	#define HBPD			(12-1)
	//hozval
	#define HFPD			(2-1)
//con4
	#define MVAL			13
	#define HSPW			(56-1)
//con5
	#define BPP24BL			0
	#define FRM565			1
	#define INVVCLK			1
	#define INVVLINE		1
	#define INVVFRAME		1
	#define INVVD			1
	#define INVVDEN			0
	#define INVPWREN		0
	#define INVENDLINE		0
	#define PWREN			0
	#define ENLEND			0
	#define BSWP			0
	#define HWSWP			0
#elif 	(LCD_TYPE == PHE480272)
	#define LCD_XSIZE		480
	#define LCD_YSIZE		272
//con1
	#define CLKVAL			5
	#define MMODE			0
	#define PNRMODE			3
	#define BPPMODE			12
//con2
	#define VBPD			(5-1)	// 值越大图像越下移
	//line val
	#define VFPD			(1-1)
	#define VSPW			(7-1)	// 值越大图像越下移
//con3
	#define HBPD			(10-1)	// 值越大图像越右移
	//hozval
	#define HFPD			(10-1)
//con4
	#define MVAL			13
	#define HSPW			(33-1)	// 值越大图像越右移
//con5
	#define BPP24BL			0
	#define FRM565			1
	#define INVVCLK			1
	#define INVVLINE		1
	#define INVVFRAME		1
	#define INVVD			0
	#define INVVDEN			0
	#define INVPWREN		0
	#define INVENDLINE		1
	#define PWREN			1
	#define ENLEND			0
	#define BSWP			0
	#define HWSWP			0
#else
#endif

#define SCR_XSIZE	 	(LCD_XSIZE*1)
#define SCR_YSIZE	 	(LCD_YSIZE*1)

#define M5D(n)			((n) & 0x1fffff)

#if		(SYSTEM_TYPE == NAVACCESS_E801)
	#define set_backlight()	rGPBDAT	|=  (1 << 3)
	#define clr_backlight()	rGPBDAT	&= ~(1 << 3)
#elif	(SYSTEM_TYPE == NAVACCESS_E802)
	#define set_backlight()	rGPBDAT	|=  (1 << 2)
	#define clr_backlight()	rGPBDAT	&= ~(1 << 2)
#else
	#define set_backlight()
	#define clr_backlight()
#endif

extern const unsigned char gImage_Welcome[];

extern const unsigned char gImage_p1[];
extern const unsigned char gImage_p2[];
extern const unsigned char gImage_p3[];
extern const unsigned char gImage_p4[];

#ifdef __cplusplus
extern "C"
{
#endif

	extern void put_pixel(U32 x,U32 y,U32 color,U08 type);
	extern void gDispChar(U32 x,U32 y,U08 Char,U32 color,U32 type);
	extern void LcdDispCharacter(U32 x,U32 y,U16 character,U32 color,U32 type);

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

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