⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lcdlib.h

📁 linux下测试usb端口
💻 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


//Color STN LCD Panel(320*240)
#define MODE_CSTN_8BIT   (0x2001)


//Color STN
#define LCD_XSIZE_CSTN 	(320)
#define LCD_YSIZE_CSTN 	(240)

//Color STN
#define SCR_XSIZE_CSTN 	(LCD_XSIZE_CSTN*2)   //for virtual screen  
#define SCR_YSIZE_CSTN 	(LCD_YSIZE_CSTN*2)



//Color STN
#define HOZVAL_CSTN		(LCD_XSIZE_CSTN*3/8-1)	// Valid VD data line number is 8.
#define LINEVAL_CSTN		(LCD_YSIZE_CSTN-1)


//CSTN timing parameter for LCBHBT161M(NANYA)
#define WLH_CSTN	        (0)
#define WDLY_CSTN		(0)
#define LINEBLANK_CSTN		(16 &0xff)




#define CLKVAL_CSTN		(6) 	
    // 130hz @50Mhz,WLH=16hclk,WDLY=16hclk,LINEBLANK=16*8hclk,VD=8  

#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                



//Color STN
extern U32 (*frameBuffer8Bit)[SCR_XSIZE_CSTN/4];




void Lcd_Init();
void Lcd_CstnOnOff(int onoff);



void PutPixel(U32 x,U32 y,U32 c);
void Glib_Rectangle(int x1,int y1,int x2,int y2,int color);
void Glib_FilledRectangle(int x1,int y1,int x2,int y2,int color);
void Glib_Line(int x1,int y1,int x2,int y2,int color);
void Glib_ClearScr(U32 c);


#endif /*__LCDLIB_H__*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -