lcd.h

来自「本代码是采用ARM7TDMI内核的S3C44BOX芯片硬件测试程序」· C头文件 代码 · 共 52 行

H
52
字号
/***********************************************/
// 定义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 COLOR_NUMBER 256

#define LCD_XSIZE 	(320)
#define LCD_YSIZE 	(240)
#define LCD_GXSIZE 	320//(240)  
#define LCD_GYSIZE 	240//(320)

#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 LINEVAL_G16			(LCD_GYSIZE-1)
#define LINEVAL_COLOR       (LCD_YSIZE-1)
#define MVAL			    (13)
#define CLKVAL_COLOR 		(4) //60Mhz 
#define MVAL_USED 0
#define LCD_BUF_SIZE (SCR_XSIZE * SCR_YSIZE)


void Lcd_Init(void);
void LcdDraw_backgroundcolor(unsigned char color_code);
void LcdDrawbox(int V_offset, int H_offset, int V_size, int H_size, unsigned char color_code);
void Test_LCD(void);
void Test_grayLCD(void);

#endif

⌨️ 快捷键说明

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