?? lcd_tx06d18.h
字號:
/**************************************************************
The initial and control for 320×240 16Bpp TFT LCD----TX06D18
**************************************************************/
#define MVAL (13)
#define MVAL_USED (0) //0=each frame 1=rate by MVAL
#define INVVDEN (1) //0=normal 1=inverted
#define BSWP (0) //Byte swap control
#define HWSWP (1) //Half word swap control
#define M5D(n) ((n) & 0x1fffff) // To get lower 21bits
//TFT 240320
#define LCD_XSIZE_TFT_240320 (240)
#define LCD_YSIZE_TFT_240320 (320)
//TFT 320240
#define LCD_XSIZE_TFT_320240 (320)
#define LCD_YSIZE_TFT_320240 (240)
//TFT 240320
#define SCR_XSIZE_TFT_240320 (640)
#define SCR_YSIZE_TFT_240320 (480)
//#define SCR_XSIZE_TFT_240320 (240)
//#define SCR_YSIZE_TFT_240320 (320)
//TFT 320240
#define SCR_XSIZE_TFT_320240 (320)
#define SCR_YSIZE_TFT_320240 (240)
//TFT 320240
//TFT240320
#define HOZVAL_TFT_240320 (LCD_XSIZE_TFT_240320-1)
#define LINEVAL_TFT_240320 (LCD_YSIZE_TFT_240320-1)
//TFT320240
#define HOZVAL_TFT_320240 (LCD_XSIZE_TFT_320240-1)
#define LINEVAL_TFT_320240 (LCD_YSIZE_TFT_320240-1)
//Timing parameter for LCD
#define VBPD_240320 (2) //垂直同步信號的后肩
#define VFPD_240320 (2) //垂直同步信號的前肩
#define VSPW_240320 (4) //垂直同步信號的脈寬
#define HBPD_240320 (8) //水平同步信號的后肩
#define HFPD_240320 (8) //水平同步信號的前肩
#define HSPW_240320 (6) //水平同步信號的脈寬
#define CLKVAL_TFT_240320 (5)
//FCLK=180MHz,HCLK=90MHz,VCLK=6.5MHz
//for LTV350QV TFT 320240
#define CLKVAL_TFT_320240 (6)
static void Lcd_Init(void);
static void Lcd_EnvidOnOff(int onoff);
//static void Lcd_Lpc3600Enable(void);
//static void Lcd_PowerEnable(int invpwren,int pwren);
static void MoveViewPort(void);
static void Lcd_MoveViewPort(int vx,int vy);
static void PutPixel(U32 x,U32 y,U32 c);
//static void Glib_Rectangle(int x1,int y1,int x2,int y2,int color);
static void Glib_FilledRectangle(int x1,int y1,int x2,int y2,int color);
static void Glib_Line(int x1,int y1,int x2,int y2,int color);
static void Lcd_ClearScr(U16 c);
extern void Paint_Bmp(int x0,int y0,int h,int l,unsigned char bmp[]);
extern void accession_ico(int x0,int y0,int h,int l,unsigned char ico[]);
void Test_Lcd_Tft_TX06D18(int mode);
void LTV350QV_Powen_OFF(void);
void LTV350QV_Power_ON(void);
void LTV350QV_Write(U16 index, U16 regdata);
void LTV350QV_Short_Delay(U8 time);
void LTV350QV_Reset(void);
/******************************************
* *NOTE:add by baijb
* *DATE:2007-04-11
* *FUNCTION:for LTV350QV_POE TFT_LCD
******************************************/
#define LTV350QV_POE 0x1d //device ID
#define LTV350QV_VBPD 5
#define LTV350QV_VFPD 4
#define LTV350QV_VSPW 3
#define LTV350QV_HBPD 12
#define LTV350QV_HFPD 10
#define LTV350QV_HSPW 18
//simulate the SPI timing order.
#define LTV350QV_CS 8
#define LTV350QV_SCL 9
#define LTV350QV_SDI 10
#define LTV350QV_RST 0
//micro for LTV350QV_POE
#define CS_H rGPCDAT |=1<<LTV350QV_CS
#define CS_L rGPCDAT &=~(1<<LTV350QV_CS)
#define SCLK_H rGPCDAT |=1<<LTV350QV_SCL
#define SCLK_L rGPCDAT &=~(1<<LTV350QV_SCL)
#define SDI_H rGPCDAT |=1<<LTV350QV_SDI
#define SDI_L rGPCDAT &=~(1<<LTV350QV_SDI)
#define RST_H rGPDDAT |=1<<LTV350QV_RST
#define RST_L rGPDDAT &=~(1<<LTV350QV_RST)
#define SDI_STATE rGPCDAT & (1<<LTV350QV_SDI)
typedef struct _LTV350qv_spi_data_{
U8 Device_ID; //ID of the device
U16 Index; //index of register
U16 Structure; //structure to be writed
}LTV350QV_SPI_Data;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -