📄 lcdlib.h
字号:
/************************************************
NAME : LCDLIB.H
DESC :
Revision History
2002.03.12 : draft ver 0.0
************************************************/
#ifndef __LCDLIB_H__
#define __LCDLIB_H__
#define MVAL (13)
#define MVAL_USED (0)
#define M5D(n) ((n) & 0x1fffff) // To get lower 21bits
//TFT LCD Panel(640*480)
#define MODE_TFT_1BIT_640480 (0x4201)
#define MODE_TFT_8BIT_640480 (0x4202)
#define MODE_TFT_16BIT_640480 (0x4204)
#define MODE_TFT_24BIT_640480 (0x4208)
//TFT 640480
#define LCD_XSIZE_TFT_640480 (640)
#define LCD_YSIZE_TFT_640480 (480)
//TFT 640480
#define SCR_XSIZE_TFT_640480 (LCD_XSIZE_TFT_640480*2)
#define SCR_YSIZE_TFT_640480 (LCD_YSIZE_TFT_640480*2)
//TFT640480
#define HOZVAL_TFT_640480 (LCD_XSIZE_TFT_640480-1)
#define LINEVAL_TFT_640480 (LCD_YSIZE_TFT_640480-1)
//Timing parameter for V16C6448AB(PRIME VIEW)
#define VBPD_640480 ((33-1)&0xff)
#define VFPD_640480 ((10-1)&0xff)
#define VSPW_640480 ((2-1) &0x3f)
#define HBPD_640480 ((48-1)&0x7f)
#define HFPD_640480 ((16-1)&0xff)
#define HSPW_640480 ((96-1)&0xff)
#define CLKVAL_TFT_640480 (1)
//53.5hz @90Mhz
//VSYNC,HSYNC should be inverted
//HBPD=47VCLK,HFPD=15VCLK,HSPW=95VCLK
//VBPD=32HSYNC,VFPD=9HSYNC,VSPW=1HSYNC
#define LCDFRAMEBUFFER 0x33800000 //_NONCACHE_STARTADDRESS
// 1. The LCD frame buffer should be write-through or non-cachable.
// 2. The total frame memory should be inside 4MB.
// 3. To meet above 2 conditions, the frame buffer should be
// inside the following regions.
// 0x31000000~0x313ffffff,
// 0x31400000~0x317ffffff,
// 0x31800000~0x31bffffff,
// .....
// 0x33800000~0x33bffffff
extern U32 (*frameBuffer16BitTft640480)[SCR_XSIZE_TFT_640480/2];
#endif /*__LCDLIB_H__*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -