📄 lcd.h
字号:
/*********************************************************************************************
* File: lcd.h
* Author: Embest
* Desc: header file of lcd
* History:
* Y.J.Guo, Programming modify, April 12, 2005
*********************************************************************************************/
#ifndef __LCD_H__
#define __LCD_H__
#include "def.h"
/*------------------------------------------------------------------------------------------*/
/* macro define */
/*------------------------------------------------------------------------------------------*/
#define SCR_XSIZE (320)
#define SCR_YSIZE (240)
#define LCD_XSIZE (320)
#define LCD_YSIZE (240)
#define COLOR_NUMBER 256
#define HOZVAL (LCD_XSIZE/4-1)
#define HOZVAL_COLOR (LCD_XSIZE*3/8-1)
#define LINEVAL (LCD_YSIZE-1)
#define MVAL (13)
#define M5D(n) ((n) & 0x1fffff)
#define MVAL_USED 0
#define CLKVAL_COLOR (4)
#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 RED 0xe0
#define GREEN 0x1c
#define BLUE 0x03
//#define LCD_PutPixel(x, y, c)\
g_unLcdActiveBuffer[(y)][(x)/4]=(( g_unLcdActiveBuffer[(y)][(x)/4] & (~(0xff000000>>((x)%4)*8)) ) | ( (c)<<((4-1-((x)%4))*8) ));
//#define LCD_ActivePutPixel(x, y, c)\
g_unLcdActiveBuffer[(y)][(x)/4]=(( g_unLcdActiveBuffer[(y)][(x)/4] & (~(0xff000000>>((x)%4)*8)) )\
| ( (c)<<((4-1-((x)%4))*8) ));
#define GUISWAP(a, b) {a^=b; b^=a; a^=b;}
/*------------------------------------------------------------------------------------------*/
/* external variables */
/*------------------------------------------------------------------------------------------*/
extern UINT32T g_unLcdActiveBuffer[LCD_YSIZE][LCD_XSIZE/4];
/*------------------------------------------------------------------------------------------*/
/* function declare */
/*------------------------------------------------------------------------------------------*/
void Test_Lcd_Stn_1Bit(void);
void Test_Lcd_Stn_2Bit(void);
void Test_Lcd_Stn_4Bit(void);
void Test_Lcd_Cstn_8Bit(void);
void Test_Lcd_Cstn_12Bit(void);
void Test_Lcd_Cstn_8Bit_On(void);
void Test_Lcd_Tft_8Bit_240320(void);
void Test_Lcd_Tft_8Bit_240320_On(void);
void Test_Lcd_Tft_16Bit_240320(void);
void Test_Lcd_Tft_1Bit_640480(void);
void Test_Lcd_Tft_8Bit_640480(void);
void Test_Lcd_Tft_16Bit_640480(void);
void Test_Lcd_Tft_24Bit_640480(void);
void Test_Lcd_Tft_8Bit_640480_Palette(void);
void Test_Lcd_Tft_8Bit_640480_Bswp(void);
void Test_Lcd_Tft_16Bit_640480_Hwswp(void);
void Test_Lcd_Tft_16Bit_640480_Bmp(void);
void Test_Lcd_Tft_1Bit_800600(void);
void Test_Lcd_Tft_8Bit_800600(void);
void Test_Lcd_Tft_16Bit_800600(void);
#endif //__LCD_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -