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

📄 pocketanalyzer.c

📁 可编程器件厂商Xilinx的手持式逻辑分析仪的逻辑设计
💻 C
📖 第 1 页 / 共 3 页
字号:
/*============================================================================*/
/* Filename:    PocketAnalyzer.c                                              */
/*                                                                            */
/* Description: This file contains the application specific functions for the */
/*              Pocket Logic Analyzer application.                            */
/*                                                                            */
/* Required Header File(s): PalmOS.h                                          */
/*                          PocketAnalyzerRsc.h                               */
/*                                                                            */
/* Function List:                                                             */
/*      ?()             This function ...                                     */
/*                                                                            */
/*============================================================================*/
/* COPYRIGHT (C) 2001                                                         */
/* NowTech, LLC                                                               */
/* Knoxville, TN                                                              */
/*                                                                            */
/* ALL RIGHTS RESERVED                                                        */
/*                                                                            */
/* This software and all information and ideas contained within are the sole  */
/* property of NowTech, LLC and are confidential.  Neither this software nor  */
/* any part nor any information contained in it may be disclosed or furnished */
/* to others without the prior written consent of NowTech, LLC.               */
/*                                                                            */
/*============================================================================*/

/*============================================================================*/
/* System Level Include Files:                                                */
/*============================================================================*/
#include <PalmOS.h>

/*============================================================================*/
/* Project Specific Include Files:                                            */
/*============================================================================*/
#include "PocketAnalyzerRsc.h"
#include "GlobalDefs.h"

/*============================================================================*/
/* Define any data structures that are used exclusively by the functions      */
/* local to this source file.                                                 */
/*============================================================================*/
/***** None *****/

/*============================================================================*/
/* Define all constants used by the functions in this source file.            */
/*============================================================================*/
#define appFileCreator      'LogA'
#define appVersionNum        0x01
#define appPrefID            0x00
#define appPrefVersionNum    0x01
#define appMinVersion        sysMakeROMVersion(3,5,0,sysROMStageRelease,0)

/*============================================================================*/
/* Define all variables which must have project global scope.  All variables  */
/* defined in this section will be accessible by all functions in all source  */
/* files in this project and must have a corresponding extern statement in    */
/* the GlobalDefs.h include file.                                             */
/*============================================================================*/
AppPrefsType AppPrefs;
PlotDataType PlotData;
Int32 EventLoopTimeout = evtWaitForever;

/*============================================================================*/
/* Define all variables which must have source file global scope but not have */
/* project wide scope.  These variables must be defined with the "static"     */
/* type qualifier so that the variables scope will be limited to only the     */
/* functions in this source file.                                             */
/*============================================================================*/
/***** None *****/

/*============================================================================*/
/* Define the function prototypes for all local functions.  The prototypes    */
/* for all global functions should be defined in the GlobalDefs.h include     */
/* file.                                                                      */
/*============================================================================*/
Err RomVersionCompatible(UInt32, UInt16);
Err AppStart (void);
void AppStop (void);
void AppEventLoop(void);
Boolean AppHandleEvent(EventPtr);






/*============================================================================*/
/* Function:            PilotMain                                             */
/* Description:         This routine is the entry point functions for the     */
/*                      PocketAnalyzer program.  The function examines the    */
/*                      launch code to determine how and if to startup.       */
/*                                                                            */
/* Arguments:           uiLaunchCode  = word value specifying the launch code.*/
/*                      pLaunchCode   = pointer to a structure that is        */
/*                                      associated witht he launch code.      */
/*                      uiLaunchFlags = word value providing extra information*/
/*                                      about the launch.                     */
/* Returns:             uiResult      = Result of the applications launch.    */
/* Globals affected:    None                                                  */
/* Hardware affected:   None                                                  */
/*                                                                            */
/*============================================================================*/
/* Change History:                                                            */
/*                                                                            */
/* ECO#:  ?                                                                   */
/* Change Date:  dd-mmm-yyyy                                                  */
/* Changed By:   ?                                                            */
/* Description of Change:  ?                                                  */
/*                                                                            */
/*============================================================================*/
UInt32 PilotMain( UInt16 uiLaunchCode, MemPtr pLaunchCode, UInt16 uiLaunchFlags)
{
    /*========================================================================*/
    /* Declare all local variables.                                           */
    /*========================================================================*/
    Err error;

    /*========================================================================*/
    /* Insure that the version of the PalmOS that is running is at least as   */
    /* high as our minimum required version.  If it is not, return the error  */
    /* and do not launch the application.                                     */
    /*========================================================================*/
    error = RomVersionCompatible (appMinVersion, uiLaunchFlags);
    if (error)
        return (error);

    /*========================================================================*/
    /* Examine the launch code to determine if and/or how to launch the app.  */
    /*========================================================================*/
    switch (uiLaunchCode)
    {
        /*====================================================================*/
        /* If this is a normal launch then call the AppStart function to      */
        /* initialize the application.  If there is no error during the init  */
        /* then display the main form and enter the applications event loop.  */
        /* When the user exits the application, call AppStop to cleanup and   */
        /* store any necessary data before exiting.                           */
        /*====================================================================*/
        case sysAppLaunchCmdNormalLaunch:
            error = AppStart();
            if (error)
                return error;

            FrmGotoForm(FrmMainForm);
            AppEventLoop();
            AppStop();
            break;

        default:
            break;
    }

    /*========================================================================*/
    /* If not errors have occurred (i.e. we have not returned with an error   */
    /* condition before this) return indicating that no error exists.         */
    /*========================================================================*/
    return(errNone);
}


/*============================================================================*/
/* Function:            RomVersionCompatible                                  */
/* Description:         This routine verifies that the PalmOS ROM version on  */
/*                      the device meets the minimum required version         */
/*                      specified for this application.                       */
/*                                                                            */
/* Arguments:           ulRequiredVersion = Minimum required ROM version.     */
/*                      uiLaunchFlags     = word value providing extra        */
/*                                          information about the launch.     */
/* Returns:             ErrorCode         = Error code or zero if ROM is      */
/*                                          compatible.                       */
/* Globals affected:    None                                                  */
/* Hardware affected:   None                                                  */
/*                                                                            */
/*============================================================================*/
/* Change History:                                                            */
/*                                                                            */
/* ECO#:  ?                                                                   */
/* Change Date:  dd-mmm-yyyy                                                  */
/* Changed By:   ?                                                            */

⌨️ 快捷键说明

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