📄 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(240*320)
#define MODE_TFT_1BIT_240320 (0x4101)
#define MODE_TFT_8BIT_240320 (0x4102)
#define MODE_TFT_16BIT_240320 (0x4104)
//TFT 240320
#define LCD_XSIZE_TFT_240320 (240)
#define LCD_YSIZE_TFT_240320 (320)
//TFT 240320
#define SCR_XSIZE_TFT_240320 (LCD_XSIZE_TFT_240320*2)
#define SCR_YSIZE_TFT_240320 (LCD_YSIZE_TFT_240320*2)
//TFT240320
#define HOZVAL_TFT_240320 (LCD_XSIZE_TFT_240320-1)
#define LINEVAL_TFT_240320 (LCD_YSIZE_TFT_240320-1)
//Timing parameter for LTS350Q1(SAMSUNG)
#define VBPD_240320 ((1-1)&0xff)
#define VFPD_240320 ((7-1)&0xff)
#define VSPW_240320 ((1-1) &0x3f)
#define HBPD_240320 ((7-1)&0x7f)
#define HFPD_240320 ((14-1)&0xff)
#define HSPW_240320 ((1-1)&0xff)
#define CLKVAL_TFT_240320 (9)
// 60hz @50Mhz
//VSYNC,HSYNC should be inverted
//HBPD=6VCLK,HFPD=2VCLK,HSPW=3VCLK
//VBPD=1HSYNC,VFPD=2HSYNC,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
//TFT 240320
extern U32 (*frameBuffer8BitTft240320)[SCR_XSIZE_TFT_240320/4];
extern U32 (*frameBuffer16BitTft240320)[SCR_XSIZE_TFT_240320/2];
void Lcd_Init(int type);
void MoveViewPort(int);
void Lcd_CstnOnOff(int onoff);
void Lcd_EnvidOnOff(int onoff);
void Lcd_PowerEnable(int invpwren,int pwren);
void Lcd_MoveViewPort(int vx,int vy,int type);
void Lcd_Lpc3600Enable(void);
#endif /*__LCDLIB_H__*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -