久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费
標題:
SimpleGUI一套針對單色顯示屏的開源GUI接口源程序+說明文檔
[打印本頁]
作者:
李牧林
時間:
2019-9-17 19:33
標題:
SimpleGUI一套針對單色顯示屏的開源GUI接口源程序+說明文檔
222.png
(44.34 KB, 下載次數: 61)
下載附件
2019-9-17 19:32 上傳
有詳細說明文檔。詳見附件。
111.png
(3.47 KB, 下載次數: 71)
下載附件
2019-9-17 19:32 上傳
單片機源程序如下:
/*************************************************************************/
/** Copyright. **/
/** FileName: DemoProc.c **/
/** Author: Polarix **/
/** Description: User operation interface. **/
/*************************************************************************/
//=======================================================================//
//= Include files. =//
//=======================================================================//
#include "DemoProc.h"
#ifdef _SIMPLE_GUI_VIRTUAL_ENVIRONMENT_SIMULATOR_
#include "SDKInterface.h"
#include "SGUI_FlashData.h"
#else
#include "OLED.h"
#include "DemoActions.h"
#endif
//=======================================================================//
//= Static variable declaration. =//
//=======================================================================//
SGUI_SCR_DEV g_stDeviceInterface;
HMI_SCREEN_OBJECT* g_arrpstScreenObjs[] =
{
&g_stHMIDemo_ScrollingText,
&g_stHMIDemo_List,
&g_stHMIDemo_TextNotice,
&g_stHMIDemo_RTCNotice,
&g_stHMIDemo_VariableBox,
&g_stHMI_DemoRealtimeGraph,
};
HMI_ENGINE_OBJECT g_stDemoEngine;
//=======================================================================//
//= Static function declare. =//
//=======================================================================//
static void KeyPressEventProc(void);
static void RTCEventProc(void);
static void SysTickTimerEventProc(void);
//=======================================================================//
//= Function define. =//
//=======================================================================//
/*****************************************************************************/
/** Function Name: SimpleGUI_DemoProcess **/
/** Purpose: Simple GUI HMI engine and interface demo process. **/
/** Parameters: None. **/
/** Return: HMI_ENGINE_RESULT. **/
/** Notice: This function demonstrates how to use the interface and **/
/** HMI engine of Simple GUI. **/
/*****************************************************************************/
HMI_ENGINE_RESULT InitializeEngine(void)
{
/*----------------------------------*/
/* Variable Declaration */
/*----------------------------------*/
HMI_ENGINE_RESULT eProcessResult;
int iIndex;
/*----------------------------------*/
/* Initialize */
/*----------------------------------*/
eProcessResult = HMI_RET_NORMAL;
/*----------------------------------*/
/* Process */
/*----------------------------------*/
/* Clear structure. */
SGUI_SystemIF_MemorySet(&g_stDeviceInterface, 0x00, sizeof(SGUI_SCR_DEV));
SGUI_SystemIF_MemorySet(&g_stDemoEngine, 0x00, sizeof(HMI_ENGINE_OBJECT));
#ifdef _SIMPLE_GUI_VIRTUAL_ENVIRONMENT_SIMULATOR_
/* Initialize display size. */
g_stDeviceInterface.stSize.Width = 128;
g_stDeviceInterface.stSize.Height = 64;
/* Initialize interface object. */
g_stDeviceInterface.fnSetPixel = SGUI_SDK_SetPixel;
g_stDeviceInterface.fnGetPixel = SGUI_SDK_GetPixel;
g_stDeviceInterface.fnClearScreen = SGUI_SDK_ClearDisplay;
g_stDeviceInterface.fnRefreshScreen = SGUI_SDK_RefreshDisplay;
#else
/* Initialize display size. */
g_stDeviceInterface.stSize.Width = 128;
g_stDeviceInterface.stSize.Height = 64;
/* Initialize interface object. */
g_stDeviceInterface.stActions.fnSetPixel = OLED_SetPixel;
g_stDeviceInterface.stActions.fnGetPixel = OLED_GetPixel;
g_stDeviceInterface.stActions.fnClearScreen = OLED_ClearDisplay;
g_stDeviceInterface.stActions.fnRefreshScreen = OLED_RefreshScreen;
#endif
do
{
/* Prepare HMI engine object. */
g_stDemoEngine.ScreenCount = sizeof(g_arrpstScreenObjs)/sizeof(*g_arrpstScreenObjs);
g_stDemoEngine.ScreenObjPtr = g_arrpstScreenObjs;
g_stDemoEngine.Interface = &g_stDeviceInterface;
/* Initialize all screen object. */
if(NULL != g_stDemoEngine.ScreenObjPtr)
{
for(iIndex=0; iIndex<g_stDemoEngine.ScreenCount; iIndex++)
{
if( (NULL != g_stDemoEngine.ScreenObjPtr[iIndex])
&& (NULL != g_stDemoEngine.ScreenObjPtr[iIndex]->pstActions)
&& (g_stDemoEngine.ScreenObjPtr[iIndex]->pstActions->Initialize)
)
{
g_stDemoEngine.ScreenObjPtr[iIndex]->pstActions->Initialize(&g_stDeviceInterface);
g_stDemoEngine.ScreenObjPtr[iIndex]->pstPrevious = NULL;
}
}
}
else
{
}
/* Active engine object. */
eProcessResult = HMI_ActiveEngine(&g_stDemoEngine, HMI_SCREEN_ID_DEMO_SCROLLING_TEXT);
if(HMI_PROCESS_FAILED(eProcessResult))
{
/* Active engine failed. */
break;
}
/* Start engine process. */
eProcessResult = HMI_StartEngine(NULL);
if(HMI_PROCESS_FAILED(eProcessResult))
{
/* Start engine failed. */
break;
}
}while(0);
return eProcessResult;
}
int DemoMainProcess(void)
{
/*----------------------------------*/
/* Initialize */
/*----------------------------------*/
// Initialize Engine.
InitializeEngine();
/*----------------------------------*/
/* Process */
/*----------------------------------*/
while(1)
{
// Check and process heart-beat timer event.
if(true == SGUI_SDK_GetEventSyncFlag(ENV_FLAG_IDX_SDK_TIM_EVENT))
{
SysTickTimerEventProc();
SGUI_SDK_SetEvnetSyncFlag(ENV_FLAG_IDX_SDK_TIM_EVENT, false);
}
// Check and process key press event.
if(true == SGUI_SDK_GetEventSyncFlag(ENV_FLAG_IDX_SDK_KEY_EVENT))
{
KeyPressEventProc();
SGUI_SDK_SetEvnetSyncFlag(ENV_FLAG_IDX_SDK_KEY_EVENT, false);
}
// Check and process RTC event.
if(true == SGUI_SDK_GetEventSyncFlag(ENV_FLAG_IDX_SDK_RTC_EVENT))
{
RTCEventProc();
SGUI_SDK_SetEvnetSyncFlag(ENV_FLAG_IDX_SDK_RTC_EVENT, false);
}
}
return 0;
}
void KeyPressEventProc(void)
{
/*----------------------------------*/
/* Variable Declaration */
/*----------------------------------*/
KEY_PRESS_EVENT stEvent;
/*----------------------------------*/
/* Initialize */
/*----------------------------------*/
HMI_EVENT_INIT(stEvent);
/*----------------------------------*/
/* Process */
/*----------------------------------*/
stEvent.Head.iType = EVENT_TYPE_ACTION;
stEvent.Head.iID = EVENT_ID_KEY_PRESS;
stEvent.Data.uiKeyValue = SGUI_SDK_GetKeyEventData();
// Post key press event.
HMI_ProcessEvent((HMI_EVENT_BASE*)(&stEvent));
}
void SysTickTimerEventProc(void)
{
/*----------------------------------*/
/* Variable Declaration */
/*----------------------------------*/
DATA_EVENT stEvent;
/*----------------------------------*/
/* Initialize */
/*----------------------------------*/
HMI_EVENT_INIT(stEvent);
/*----------------------------------*/
/* Process */
/*----------------------------------*/
stEvent.Head.iType = EVENT_TYPE_DATA;
stEvent.Head.iID = EVENT_ID_TIMER;
……………………
…………限于本文篇幅 余下代碼請從51黑下載附件…………
復制代碼
所有資料51hei提供下載:
simplegui.7z
(2.42 MB, 下載次數: 112)
2019-9-17 23:14 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
作者:
lanmanck
時間:
2020-4-20 15:35
不放到gitee上嗎?
作者:
wpppmlah
時間:
2024-2-22 14:12
玩不轉它的VirtualSDK.有編譯好的虛擬窗口嗎,或者它的編譯環境文件。下載不了
歡迎光臨 (http://m.zg4o1577.cn/bbs/)
Powered by Discuz! X3.1
主站蜘蛛池模板:
亚洲免费小视频
|
天天干夜夜
|
少妇中文字幕
|
激情网站在线观看
|
亚洲第十页
|
九九热在线视频观看
|
一区二区三区在线观看免费
|
茄子视频色
|
久久久久久国产精品
|
久久久网站
|
亚洲精品99
|
一本一道久久a久久精品蜜桃
|
亚洲综合激情
|
av片在线观看
|
天天操网
|
aaaaa级片
|
精品一区二区三区免费
|
天天操免费视频
|
欧美视频在线观看免费
|
免费成人结看片
|
亚洲精品久久久久
|
久久亚洲免费视频
|
99精品久久久久久中文字幕
|
久久亚洲国产精品
|
中文字幕在线视频播放
|
亚洲另类视频
|
最新超碰
|
黄色免费片
|
免费在线毛片
|
欧美激情网址
|
97人人插
|
精品一区二区三区免费看
|
精品一区二区三区四区五区
|
黄色片视频免费
|
成人免费高清视频
|
日本一本在线
|
夜夜夜夜操
|
国内精品一区二区
|
亚洲成人免费网站
|
国产精品区二区三区日本
|
av毛片网站
|