📄 lcd.h
字号:
#ifndef __LCD_H__
#define __LCD_H__
#define MVAL (13)
#define MVAL_USED (0<<7)
#define MODE_TFT (3<<5)
#define BPP_16 (0x0C<<1)
#define LCD_DIS (0)
#define LCD_EN (1)
#define M5D(n) ((n) & 0x1fffff) // To get lower 21bits
#define MODE_TFT_24BIT_640480 (0x4208)
//TFT DISPLAY
//#define LCD_DISPLAY_XSIZE (800)
//#define LCD_DISPLAY_YSIZE (600)
#define LCD_DISPLAY_XSIZE (640)
#define LCD_DISPLAY_YSIZE (480)
#define LCD_DISPLAY_HOZVAL (LCD_DISPLAY_XSIZE-1)
#define LCD_DISPLAY_LINEVAL (LCD_DISPLAY_YSIZE-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 LCD_DISPLAY_CLKVAL (1)
//53.5hz @90Mhz
//VSYNC,HSYNC should be inverted
//HBPD=47VCLK,HFPD=15VCLK,HSPW=95VCLK
//VBPD=32HSYNC,VFPD=9HSYNC,VSPW=1HSYNC
//#define LCD_DISPLAY_VBPD (22)
//#define LCD_DISPLAY_VFPD (1)
//#define LCD_DISPLAY_VSPW (2)
//#define LCD_DISPLAY_HBPD (128)
//#define LCD_DISPLAY_HFPD (24)
//#define LCD_DISPLAY_HSPW (72)
#define LCD_DISPLAY_VBPD (33-1)
#define LCD_DISPLAY_VFPD (10-1)
#define LCD_DISPLAY_VSPW (2-1)
#define LCD_DISPLAY_HBPD (48-1)
#define LCD_DISPLAY_HFPD (16-1)
#define LCD_DISPLAY_HSPW (96-1)
//#define LCD_DISPLAY_VBPD (4)
//#define LCD_DISPLAY_VFPD (1)
//#define LCD_DISPLAY_VSPW (2)
//#define LCD_DISPLAY_HBPD (32)
//#define LCD_DISPLAY_HFPD (24)
//#define LCD_DISPLAY_HSPW (36)
#define LCD_DISPLAY_CLKVAL (1<<8)
//TFT 640480
#define RGB(r,g,b) (unsigned int)( (r << 16) + (g << 8) + b )
extern void Lcd_Init(void);
extern void Lcd_ClearDisplayBuff(void);
extern void Lcd_Switch(int cmd);
extern void Lcd_White(void);
#endif /*__LCD_H__*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -