⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 formpage.c

📁 在ARM7和UC/OSII的平台上实现了GPS自动报站的功能,涉及GPS模块LEA_4S的驱动,位置速寻算法,语音芯片ISD4004的录放音驱动,LED页面管理等等.从启动代码到操作系统的移植以及到业
💻 C
字号:
/****************************************************************
**                                                              *
**  FILE         : FormPage.c                                   *
**                                                              *
**  By : Cyb 2007.07.01                                         *
****************************************************************/
#define FORMPAGE_GLOBALS 


#include "includes.h"
#include "FormPage.h"
#include "WinStack.h"
#include "DisplayTask.h"

void FormPageInitProc(FORMPAGE *formpage)
{
     void (*execfunc)(void);
      
     execfunc = formpage->initfunc;
     
     if (execfunc != NULL) (*execfunc)();
     
     execfunc = formpage->createfunc;
     if (execfunc != NULL) (*execfunc)();
     
    
}    

void FormPageHdlKeyProc(FORMPAGE *formpage)
{
     void (*hdlkeyfunc)(void);
     INT8U recvkey;
     
     recvkey = GetCurKey();
     hdlkeyfunc = formpage->hdlkeyfunc;
        
     if (hdlkeyfunc != NULL) 
     {
         (*hdlkeyfunc)();
           return ;
     }   
      
     if (recvkey == KEY_CLR) 
     {
        PopFormStack();
     }
}

void FormPageDestroyProc(FORMPAGE *formpage)
{
   
   void (*execfunc)(void);

   execfunc = formpage->destroyfunc;
   if (execfunc != NULL) (*execfunc)();
}

void FormPageSuspendProc(FORMPAGE *formpage)
{
     void (*execfunc)(void);
     
     execfunc = formpage->suspendfunc;
     if (execfunc != NULL) (*execfunc)();
}

void FormPageResumeProc(FORMPAGE *formpage)
{
     void (*execfunc)(void);
     
        
     execfunc = formpage->resuinitfunc;
     if (execfunc != NULL) (*execfunc)();
     
     execfunc = formpage->resumefunc;
     if (execfunc != NULL) (*execfunc)();
}

void SetFormPageLifeTime(FORMPAGE *formpage,INT8U lifetime)
{   
      formpage->lifetime = lifetime;
}


void CreateFormPage(void)
{
     PushFormStack();
}
    

void RefreshFormPage(void)
{
     RefreshFormStack();
}


void CloseFormPage(void)
{
     PopFormStack();
}    


void CloseMultipleFormPage(INT8U closenum)
{
     INT8U curdepth;
     curdepth = GetFormPageDepth();
     if (curdepth <= closenum) {
        ReturnSpecifiedPage(0);
     }  else {
        curdepth -= closenum;
        ReturnSpecifiedPage(curdepth);	
     }
}


void ResetFormPage(FORMPAGE *formpage)
{
     memset((INT8U*)formpage,0,sizeof(FORMPAGE));
     formpage->lifetime = PAGELIFE_NORMAL;
     formpage->formattrib = NORMALFORMPAGE;
}     

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -