📄 lcd.h
字号:
#define LCD_DEVCAP_YSIZE 0x2 /* Quest vert. res. of display */
#define LCD_DEVCAP_VXSIZE 0x3 /* Quest vert. res. of virtual disp.*/
#define LCD_DEVCAP_VYSIZE 0x4 /* Quest vert. res. of virtual disp.*/
#define LCD_DEVCAP_XORG 0x5 /* X-origin ... usually 0 */
#define LCD_DEVCAP_YORG 0x6 /* Y-origin ... usually 0 */
#define LCD_DEVCAP_CONTROLLER 0x7 /* LCD Controller (Numerical) */
#define LCD_DEVCAP_BITSPERPIXEL 0x8 /* Bits per pixel ... 1/2/4/8 */
#define LCD_DEVCAP_NUMPAGES 0x10 /* Quest number of pages of display */
#define LCD_DEVCAP_COLOR 0x1000 /* Quest Color[0]
0x1001 Quest Color[1]
0x1002 Quest Color[2]
... */
/* The next 4095 entries are reserved so up to 4096 colors
can be queried ...*/
int LCD_GetXSize(void);
int LCD_GetXSize_1(void);
int LCD_GetXSizeEx(int Index);
int LCD_GetYSize(void);
int LCD_GetYSize_1(void);
int LCD_GetYSizeEx(int Index);
int LCD_GetVXSize(void);
int LCD_GetVXSize_1(void);
int LCD_GetVXSizeEx(int Index);
int LCD_GetVYSize(void);
int LCD_GetVYSize_1(void);
int LCD_GetVYSizeEx(int Index);
U32 LCD_GetNumColors(void);
U32 LCD_GetNumColors_1(void);
U32 LCD_GetNumColorsEx(int Index);
int LCD_GetBitsPerPixel(void);
int LCD_GetBitsPerPixel_1(void);
int LCD_GetBitsPerPixelEx(int Index);
int LCD_GetFixedPalette(void);
int LCD_GetFixedPalette_1(void);
I32 LCD_GetFixedPaletteEx(int Index);
int LCD_GetXMag(void);
int LCD_GetXMag_1(void);
int LCD_GetXMagEx(int Index);
int LCD_GetYMag(void);
int LCD_GetYMag_1(void);
int LCD_GetYMagEx(int Index);
int LCD_GetMirrorXEx(int LayerIndex);
int LCD_GetMirrorYEx(int LayerIndex);
int LCD_GetSwapXYEx(int LayerIndex);
int LCD_GetSwapRBEx(int LayerIndex);
int LCD_GetDeltaModeEx(int LayerIndex);
int LCD_GetBitsPerPixel_L0Ex(int LayerIndex);
tLCDDEV_Index2Color * LCD_GetpfIndex2ColorEx(int LayerIndex);
tLCDDEV_Color2Index * LCD_GetpfColor2IndexEx(int LayerIndex);
int LCD_GetNumLayers(void);
int LCD_SetAlphaEx(int Alpha, int LayerIndex);
#define LCD_GetNumDisplays() LCD_GetNumLayers()
#define LCD_GET_XSIZE() LCD_GetXSize()
#define LCD_GET_YSIZE() LCD_GetYSize()
#define LCD_GET_VXSIZE() LCD_GetVXSize()
#define LCD_GET_VYSIZE() LCD_GetVYSize()
#define LCD_GET_NUMCOLORS() LCD_GetNumColors()
#define LCD_GET_BITSPERPIXEL() LCD_GetBitsPerPixel()
#define LCD_DEVFUNC_READRECT 0x1 /* Request of a function pointer for reading a rectangular display area */
#define LCD_DEVFUNC_SETALPHA 0x2 /* Request of a function pointer for setting the alpha blending factor */
#define LCD_DEVFUNC_SETPOS 0x3 /* Request of a function pointer for setting the layer position */
#define LCD_DEVFUNC_SETSIZE 0x4 /* Request of a function pointer for setting the layer size */
#define LCD_DEVFUNC_SETVIS 0x5 /* Request of a function pointer for setting the visibility of a layer */
void * LCD_L0_GetDevFunc(int Index);
/*********************************************************************
*
* LCD_CLIP function table
*
**********************************************************************
*/
typedef void tLCD_HL_DrawHLine (int x0, int y0, int x1);
typedef void tLCD_HL_DrawPixel (int x0, int y0);
typedef struct {
tLCD_HL_DrawHLine* pfDrawHLine;
tLCD_HL_DrawPixel* pfDrawPixel;
} tLCD_HL_APIList;
void LCD_DrawHLine(int x0, int y0, int x1);
void LCD_DrawPixel(int x0, int y0);
void LCD_DrawVLine (int x, int y0, int y1);
/*********************************************************************
*
* Declarations for LCD_
*
**********************************************************************
*/
void LCD_SetClipRectEx(const LCD_RECT* pRect);
void LCD_SetClipRectMax(void);
/* Get device capabilities (0 if not supported) */
I32 LCD_GetDevCap(int Index);
/* Initialize LCD using config-paramters */
int LCD_Init(void);
void LCD_SetBkColor (LCD_COLOR Color); /* Set background color */
void LCD_SetColor (LCD_COLOR Color); /* Set foreground color */
void LCD_SetPixelIndex(int x, int y, int ColorIndex);
/* Palette routines (Not available on all drivers) */
void LCD_InitLUT(void);
/* Decompressors */
//typedef void tfDrawSpecialBitmap(int x0,int y0,int xsize, int ysize, const U8 GUI_UNI_PTR *pPixel, const LCD_LOGPALETTE GUI_UNI_PTR * pLogPal, int xMag, int yMag);
void LCD_DrawBitmap_RLE8(int x0,int y0,int xsize, int ysize, const U8 GUI_UNI_PTR *pPixel, const LCD_LOGPALETTE GUI_UNI_PTR * pLogPal, int xMag, int yMag);
void LCD_DrawBitmap_RLE4(int x0,int y0,int xsize, int ysize, const U8 GUI_UNI_PTR *pPixel, const LCD_LOGPALETTE GUI_UNI_PTR * pLogPal, int xMag, int yMag);
void LCD_DrawBitmap_565 (int x0,int y0,int xsize, int ysize, const U8 GUI_UNI_PTR *pPixel, const LCD_LOGPALETTE GUI_UNI_PTR * pLogPal, int xMag, int yMag);
void LCD_DrawBitmap_M565(int x0,int y0,int xsize, int ysize, const U8 GUI_UNI_PTR *pPixel, const LCD_LOGPALETTE GUI_UNI_PTR * pLogPal, int xMag, int yMag);
LCD_DRAWMODE LCD_SetDrawMode (LCD_DRAWMODE dm);
void LCD_SetColorIndex(int Index);
void LCD_SetBkColorIndex(int Index);
void LCD_FillRect(int x0, int y0, int x1, int y1);
typedef void tLCD_SetPixelAA(int x, int y, U8 Intens);
void LCD_SetPixelAA (int x, int y, U8 Intens);
void LCD_SetPixelAA_NoTrans(int x, int y, U8 Intens);
void LCD_SetPixelAA_Xor (int x, int y, U8 Intens);
LCD_COLOR LCD_AA_MixColors(LCD_COLOR Color, LCD_COLOR BkColor, U8 Intens);
LCD_COLOR LCD_MixColors256(LCD_COLOR Color, LCD_COLOR BkColor, unsigned Intens);
LCD_COLOR LCD_GetPixelColor(int x, int y); /* Get RGB color of pixel */
unsigned int LCD_GetPixelIndex(int x, int y);
int LCD_GetBkColorIndex (void);
int LCD_GetColorIndex (void);
/*********************************************************************
*
* Optional support for rotatation
*
**********************************************************************
*/
#if GUI_SUPPORT_ROTATION
typedef void tLCD_DrawBitmap(int x0, int y0, int xsize, int ysize,
int xMul, int yMul, int BitsPerPixel, int BytesPerLine,
const U8 GUI_UNI_PTR * pPixel, const void * pTrans);
typedef void tRect2TextRect (LCD_RECT * pRect);
struct tLCD_APIList_struct {
tLCD_DrawBitmap * pfDrawBitmap;
tRect2TextRect * pfRect2TextRect;
};
typedef struct tLCD_APIList_struct tLCD_APIList;
extern tLCD_APIList LCD_APIListCCW;
extern tLCD_APIList LCD_APIListCW;
extern tLCD_APIList LCD_APIList180;
#define GUI_ROTATION tLCD_APIList
#define GUI_ROTATE_CCW &LCD_APIListCCW
#define GUI_ROTATE_CW &LCD_APIListCW
#define GUI_ROTATE_180 &LCD_APIList180
#define GUI_ROTATE_0 0
#endif
/* *************************************************************
* *
* LCD publics not used by GUI *
* *
*************************************************************
The following functions can, but do not have to be defined in the LCD driver
as they are not used by the GUI level.
*/
#define LCD_On LCD_L0_On
#define LCD_Off LCD_L0_Off
#define LCD_ReInit LCD_L0_ReInit
#define LCD_SetLUTEntry LCD_L0_SetLUTEntry
#define LCD_CC_UNLOCK (0) /* Default mode: Cache is transparent */
#define LCD_CC_LOCK (1) /* Cache is locked, no write operations */
#define LCD_CC_FLUSH (2) /* Flush cache, do not change mode */
U8 LCD_L0_ControlCache(U8 mode);
U8 LCD_L0_1_ControlCache(U8 mode);
U8 LCD_L0_2_ControlCache(U8 mode);
U8 LCD_L0_3_ControlCache(U8 mode);
U8 LCD_L0_4_ControlCache(U8 mode);
U8 LCD_L0_5_ControlCache(U8 mode);
void LCD_L0_Refresh(void);
void LCD_L0_1_Refresh(void);
void LCD_L0_2_Refresh(void);
void LCD_L0_3_Refresh(void);
void LCD_L0_4_Refresh(void);
void LCD_L0_5_Refresh(void);
/* Check if controller is still properly initialized */
int LCD_L0_CheckInit(void); /* returns if init is still O.K.
by reading all available registers of
Display controller.
0: Init O.K.
*/
#define LCD_ControlCache LCD_L0_ControlCache
/*
******************************************
* *
* Support for paging *
* *
******************************************
*/
int LCD_SelPage (int NewPage); /* returns formerly sel. page */
int LCD_ShowPage (int NewPage); /* sets / returns visible page */
int LCD_GetSelPage (void); /* returns selected page */
int LCD_GetVisPage (void); /* returns visible page */
/* *************************************************************
* *
* LCD imports *
* (for routines in LCDColor) *
* *
*************************************************************
*/
int LCD_Color2Index (LCD_COLOR Color);
LCD_COLOR LCD_Index2Color (int Index);
LCD_COLOR LCD_Index2ColorEx (int i, unsigned int LayerIndex);
/*********************************************************************
*
* LCD_X_...
*
**********************************************************************
*/
void LCD_X_Init(void);
void LCD_X_On (void);
void LCD_X_Off (void);
char LCD_X_Read00(void);
char LCD_X_Read01(void);
void LCD_X_Write00(char c);
void LCD_X_Write01(char c);
void LCD_X_WriteM01(char * pData, int NumBytes);
#if defined(__cplusplus)
}
#endif
#endif /* LCD_H */
/*************************** End of file ****************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -