📄 downtimes.c
字号:
/****************************************************************
** *
** FILE : DownTimes.C *
** COPYRIGHT : (c) 2001 .Xiamen Yaxon NetWork CO.LTD *
** *
** *
** By : qzc 2004.10.08 *
****************************************************************/
#include "includes.h"
#include "public.h"
#include "tools.h"
#include "ItemMenu.h"
#include "Prompt.h"
#if EN_HANDSET > 0
static PROMPT_STRUCT DownTimesPrompt;
static buf[2];
static void GetDownTimes(void)
{
if(PubParaValid(DOWNTIMES_))
{
//buf[0]=downtimes.times;
HexToAscii((INT8U *)buf, (INT8U *)&downtimes.times, 1);
DownTimesPrompt.Mode = 0;
DownTimesPrompt.LiveTime = 0;
DownTimesPrompt.TextPtr = (INT8U *)buf;
DownTimesPrompt.TextLen = sizeof(buf);
DownTimesPrompt.ExitProc = 0;
DownTimesPrompt.ExitKeyProc = 0;
ActivatePrompt(&DownTimesPrompt);
}
else ActivateStringPrompt("数据无效");
}
static void ClearTimes(void)
{
downtimes.times = 0;
StorePubPara(DOWNTIMES_);
ActivateStringPrompt("清楚完毕");
}
static ITEMMENU_STRUCT MENU_CHECK = {ITEM_FCN, "查看",GetDownTimes,0,0};
static ITEMMENU_STRUCT MENU_CLEAR = {ITEM_FCN, "清除",ClearTimes,0,0};
static ITEMMENU_STRUCT *MENU_DOWNTIMES_CHILD[] = { &MENU_CHECK,
&MENU_CLEAR
};
ITEMMENU_STRUCT MENU_DOWNTIMES = {ITEM_FMENU,"RAM掉电次数",0,2,MENU_DOWNTIMES_CHILD};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -