?? gui_sellcd.c
字號:
/*************************************************************************************************************
uC/GUI
嵌入式通用圖形軟件
File : GUI_SelLCD.C
Purpose : emWin GSC, selection of LCD display--液晶顯示器的選擇
************************************************************************************************************/
#include <stddef.h> /* needed for definition of NULL */
#include "GUI_Private.H"
#include "GUIDebug.h"
#include "LCD_Private.h" /* Required for configuration, APIList */
#if (LCD_NUM_DISPLAYS > 1) && (GUI_SUPPORT_MEMDEV)
/*************************************************************************************************************
* LCD Device
* (if memory devices are supported--如果存儲設備的支持)
*************************************************************************************************************/
const tLCDDEV_APIList LCD_L0_1_APIList =
{
#if LCD_YMAG_1 == 1
LCD_L0_1_Color2Index,
LCD_L0_1_DrawBitmap,
LCD_L0_1_DrawHLine,
LCD_L0_1_DrawVLine,
LCD_L0_1_FillRect,
LCD_L0_1_GetPixelIndex,
LCD_L0_1_GetRect,
LCD_L0_1_Index2Color,
LCD_L0_1_SetPixelIndex,
LCD_L0_1_XorPixel
#else
LCD_L0_1_Color2Index,
LCD_L0_1_MAG_DrawBitmap,
LCD_L0_1_MAG_DrawHLine,
LCD_L0_1_MAG_DrawVLine,
LCD_L0_1_MAG_FillRect,
LCD_L0_1_MAG_GetPixelIndex,
LCD_L0_1_GetRect, /* Original routine is o.k. here, since we use the logical
coordinates for clipping, which are not magnified */
LCD_L0_1_Index2Color,
LCD_L0_1_MAG_SetPixelIndex,
LCD_L0_1_MAG_XorPixel
#endif
};
/***************************************************************************************************************
* GUI_SelLCD
***************************************************************************************************************/
const tLCDDEV_APIList * const aAPI[] =
{
&LCD_L0_APIList
#if LCD_NUM_DISPLAYS >1
,&LCD_L0_1_APIList
#endif
};
unsigned int GUI_SelLCD(unsigned int Index)
{
unsigned int OldIndex = 0;
if (Index < LCD_NUM_DISPLAYS)
{
GUI_LOCK();
GUI_SetDefault();
OldIndex = (GUI_Context.pDeviceAPI == aAPI[0]) ? 0 : 1;
GUI_Context.pDeviceAPI = aAPI[Index];
LCD_SetClipRectMax();
}
GUI_UNLOCK();
return OldIndex;
}
#else
void GUI_SelLCD_(void)
{}
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -