📄 lcd.h.bak
字号:
#ifndef __LCD_H__
#define __LCD_H__
#include "..\cpu\def.h"
#define SCR_XSIZE (320)
#define SCR_YSIZE (240)
#define COLOR_NUMBER 256
//active lcd buffer size
#define LCD_XSIZE (320)
#define LCD_YSIZE (240)
#define M5D(n) ((n) & 0x1fffff)
#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-1)
#define MVAL (13)
#define CLKVAL_COLOR (4) //60Mhz
#define MVAL_USED 0
#define LCD_BUF_SIZE (SCR_XSIZE * SCR_YSIZE)
/*
*************************************************************************
* Copyright (c) 2003, The Lab of Embedded System and Net Security,WHUT..
* All rights reserved.
*
* Filename: lcd.h
* Discription: This file drives lcd
*
* version: 1.0
* Author: Qiu Yanfei <qyfhm@tom.com>
* Accomplished Date: 2004/7/28 19:55:00
*************************************************************************
*/
//define some colors
#define BLACK 0x00
#define WHITE 0xff
#define RED 0xe0
#define GREEN 0x1c
#define BLUE 0x03
#define YELLOW 0xfc
#define ALLBLACK ((BLACK << 24) | (BLACK << 16) | (BLACK << 8) | BLACK)
#define ALLWHITE ((WHITE << 24) | (WHITE << 16) | (WHITE << 8) | WHITE)
#define ALLBLUE ((BLUE << 24) | (BLUE << 16) | (BLUE << 8) | BLUE)
#define LIGHTGRAY 0xa0
#define DARKGRAY 0x50
#define TRANSPARENCY 0xff
#define DEFAULT_COLOR (YELLOW)
extern U32 aLcdActiveBuffer[LCD_YSIZE][LCD_XSIZE/4];
#define LCD_PutPixel(x, y, c)\
aLcdActiveBuffer[(y)][(x)/4]=(( aLcdActiveBuffer[(y)][(x)/4] & (~(0xff000000>>((x)%4)*8)) ) | ( (c)<<((4-1-((x)%4))*8) ));
#define LCD_ActivePutPixel(x, y, c)\
aLcdActiveBuffer[(y)][(x)/4]=(( aLcdActiveBuffer[(y)][(x)/4] & (~(0xff000000>>((x)%4)*8)) )\
| ( (c)<<((4-1-((x)%4))*8) ));
#define GUISWAP(a, b) {a^=b; b^=a; a^=b;}
void Lcd_Init(void);
void Lcd_Clr(void);
void Lcd_Draw_Box (U16 usLeft, U16 usTop, U16 usRight, U16 usBottom, U8 ucColor);
void Lcd_Draw_Line (U16 usX0, U16 usY0, U16 usX1, U16 usY1, U8 ucColor, U16 usWidth);
void Lcd_Draw_HLine (U16 usX0, U16 usX1, U16 usY0, U8 ucColor, U16 usWidth);
void Lcd_Draw_VLine (U16 usY0, U16 usY1, U16 usX0, U8 ucColor, U16 usWidth);
void Lcd_Fill_Box (U16 usX0, U16 usY0, U16 usX1, U16 usY1, U8 ucColor);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -