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

📄 lcd.h

📁 三星公司的ARM44B0的LCD测试程序
💻 H
字号:
/***********************************************/
// 定义LCD控制器寄存器设置值等。
/***********************************************/
#ifndef __LCD_H__
#define __LCD_H__
//#include	"..\Target\Def.h"     

#define BLACK 0x0
#define ALLBLACK ((BLACK << 24) | (BLACK << 16) | (BLACK << 8) | BLACK)
#define WHITE 0xff
#define ALLWHITE ((WHITE << 24)  | (WHITE << 16)  | (WHITE << 8)  | WHITE)
#define LIGHTGRAY    0xa0
#define DARKGRAY     0x50

#define TRANSPARENCY 0xff

#define RED 0xe0
#define GREEN 0x1c
#define BLUE 0x03

#define SCR_XSIZE 	(320)  
#define SCR_YSIZE 	(240)
#define SCR_GXSIZE 	320//(240)  
#define SCR_GYSIZE 	240//(320)
#define SCR_BXSIZE 	640//(240)  
#define SCR_BYSIZE 	480//(320)


#define COLOR_NUMBER 256

#define LCD_XSIZE 	(320)
#define LCD_YSIZE 	(240)
#define LCD_GXSIZE 	320//(240)  
#define LCD_GYSIZE 	240//(320)
#define LCD_BXSIZE 	(640)
#define LCD_BYSIZE 	(480)

#define M5D(n) ((n) & 0x1fffff)
#define ARRAY_SIZE_COLOR 	(SCR_XSIZE/1*SCR_YSIZE)
#define HOZVAL_G16			(LCD_GXSIZE/4-1)
#define HOZVAL_COLOR		(LCD_XSIZE*3/8-1)
#define HOZVAL_BCOLOR		(LCD_BXSIZE*3/8-1)
#define LINEVAL_G16			(LCD_GYSIZE-1)
#define LINEVAL_COLOR       (LCD_YSIZE-1)
#define LINEVAL_BCOLOR      (LCD_BYSIZE-1)
#define MVAL			    (13)
#define CLKVAL_COLOR 		(4) //60Mhz 
#define MVAL_USED 0
#define LCD_BUF_SIZE (SCR_XSIZE * SCR_YSIZE)


void Lcd_Init320x240(void);
void Lcd_Init640x480(void);
void LcdDraw_backgroundcolor320x240(unsigned char color_code);
void LcdDrawbox(int V_offset, int H_offset, int V_size, int H_size, unsigned char color_code);
void Test_640x480LCD(void);
void Test_320x240LCD(void);
void Test_grayLCD(void);

#endif

⌨️ 快捷键说明

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