📄 drv_glcd.h
字号:
/*************************************************************************
*
* Used with ICCARM and AARM.
*
* (c) Copyright IAR Systems 2008
*
* File name : drv_glcd.h
* Description : Graphical LCD driver include file
*
* History :
* 1. Date : 6, March 2008
* Author : Stanimir Bonev
* Description : Create
*
*
* $Revision: 18137 $
**************************************************************************/
#include "arm_comm.h"
#ifndef __GLCD_DRV_H
#define __GLCD_DRV_H
//extern Int32U SDRAM_BASE_ADDR;
#define SDRAM_BASE_ADDR ((Int32U)0xA0000000)
//#define LCD_VRAM_BASE_ADDR ((Int32U)&SDRAM_BASE_ADDR)
#define LCD_CURSOR_BASE_ADDR ((Int32U)0xFFE10800)
typedef struct _Bmp_t {
Int32U H_Size;
Int32U V_Size;
Int32U BitsPP;
Int32U BytesPP;
pInt32U pPalette;
pInt32U pPicStream;
pInt8U pPicDesc;
} Bmp_t, *pBmp_t;
typedef struct _FontType_t {
Int32U H_Size;
Int32U V_Size;
Int32U CharacterOffset;
Int32U CharactersNuber;
pInt8U pFontStream;
pInt8U pFontDesc;
} FontType_t, *pFontType_t;
typedef Int32U LdcPixel_t, *pLdcPixel_t;
// pixel clock frequency < 6.4MHz
// ~5.4Mhz = 408 clk per line * (240 line + 3 Vsynch pulse
// + 5 front porch + 15 back porch)
#define C_GLCD_REFRESH_FREQ (50HZ)
#define C_GLCD_H_SIZE 320
#define C_GLCD_H_PULSE 30
#define C_GLCD_H_FRONT_PORCH 20
#define C_GLCD_H_BACK_PORCH 38
#define C_GLCD_V_SIZE 240
#define C_GLCD_V_PULSE 3
#define C_GLCD_V_FRONT_PORCH 5
#define C_GLCD_V_BACK_PORCH 15
#define C_GLCD_PWR_ENA_DIS_DLY 10000
#define C_GLCD_ENA_DIS_DLY 10000
#define CRSR_PIX_32 0
#define CRSR_PIX_64 1
#define CRSR_ASYNC 0
#define CRSR_FRAME_SYNC 2
#define TEXT_DEF_TAB_SIZE 5
#define GLCD_COLOR_AQUA 0xFFFF00
#define GLCD_COLOR_BLACK 0x000000
#define GLCD_COLOR_BLUE 0xFF0000
#define GLCD_COLOR_FUSCHIA 0xFF00FF
#define GLCD_COLOR_GREEN 0x008000
#define GLCD_COLOR_GRAY 0x909090
#define GLCD_COLOR_LIME 0x00FF00
#define GLCD_COLOR_MARRON 0x000080
#define GLCD_COLOR_NAVY 0x800000
#define GLCD_COLOR_OLIVE 0x008080
#define GLCD_COLOR_PURPLE 0x800080
#define GLCD_COLOR_RED 0x0000FF
#define GLCD_COLOR_SILVER 0xC0C0C0
#define GLCD_COLOR_TEAL 0x808000
#define GLCD_COLOR_WHITE 0xFFFFFF
#define GLCD_COLOR_YELLOW 0x00FFFF
#define GLCD_COLOR_ORANGE 0x00A5FF
#define TEXT_BEL1_FUNC()
void GLCD_Init (const Int32U *pPain, const Int32U * pPallete);
void GLCD_SetPallet (const Int32U * pPallete);
void GLCD_Ctrl (Boolean bEna);
void GLCD_Cursor_Cfg(int Cfg);
void GLCD_Cursor_En(int cursor);
void GLCD_Cursor_Dis(int cursor);
void GLCD_Move_Cursor(int x, int y);
void GLCD_Copy_Cursor (const Int32U *pCursor, int cursor, int size);
Boolean GLCD_Cursor_OnWindow (Int32U X_Left, Int32U Y_Up,
Int32U X_Right, Int32U Y_Down);
void GLCD_SetFont(pFontType_t pFont, LdcPixel_t Color, LdcPixel_t BackgndColor);
void GLCD_SetWindow(Int32U X_Left, Int32U Y_Up,
Int32U X_Right, Int32U Y_Down);
void GLCD_TextSetPos(Int32U X, Int32U Y);
void GLCD_TextSetTabSize(Int32U Size);
static void LCD_SET_WINDOW (Int32U X_Left, Int32U X_Right,
Int32U Y_Up, Int32U Y_Down);
static void LCD_WRITE_PIXEL (Int32U Pixel);
static Boolean GLCD_TextCalcWindow (pInt32U pXL, pInt32U pXR,
pInt32U pYU, pInt32U pYD,
pInt32U pH_Size, pInt32U pV_Size);
void GLCD_LoadPic (Int32U X_Left, Int32U Y_Up, Bmp_t * pBmp, Int32U Mask);
int putchar (int c);
#endif // __GLCD_DRV_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -