📄 main.c
字号:
/****************************************************************************/
/* */
/* Name main.c */
/* */
/* Function this file contains Application_Initialize function */
/* called by Nucleus environment */
/* Version 0.1 */
/* */
/* Date Modification */
/* ------------------------------------ */
/* 18 June 2001 Create */
/* */
/* Author Laurent Sollier */
/* */
/* (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved*/
/****************************************************************************/
/*==== INCLUDES ===================================================*/
#include "l1sw.cfg" /* OP_L1_STANDALONE definition */
#if (OP_L1_STANDALONE == 0)
#include "rv.cfg"
#include "debug.cfg"
#endif
#include "board.cfg"
#include "l1_confg.h"
#if (OP_L1_STANDALONE == 1)
#include "uart/uart.h"
#endif
/*==== FUNCTIONS ==================================================*/
#if (PSP_STANDALONE == 0)
#if (OP_L1_STANDALONE == 1)
extern void Initialize_L1_stand_alone (void *first_available_memory);
#else
extern void Cust_Init_Layer1(void);
extern void StartFrame(void);
#endif
#endif /* PSP_STANDALONE == 0 */
#if (CODE_VERSION != SIMULATION)
extern void Init_Target(void);
extern void Init_Unmask_IT(void);
extern void Init_Drivers(void);
#endif
#if (PSP_STANDALONE == 0)
extern void Init_Serial_Flows (void);
#endif
#if (OP_L1_STANDALONE == 0)
#if WCP_PROF == 1
extern void prf_Init(void);
#endif
#endif
/*
* Application_Initialize
*
* Initialization Main function, called by Nucleus (INC_Initialize)
*/
//extern void bios_gpio_irqmode(unsigned long gpio);
void Application_Initialize (void *first_available_memory)
{
#if (CODE_VERSION != SIMULATION)
/*
* Low-level HW Initialization.
*/
Init_Target ();
/*
* Drivers Initialization.
*/
Init_Drivers ();
#endif /* (CODE_VERSION != SIMULATION) */
#if (PSP_STANDALONE == 0)
#if (OP_L1_STANDALONE == 0)
#if (_GSM==1)
/*
* Layer1 SW Initialization.
*/
Cust_Init_Layer1 ();
/*
* SerialSwitch & Serial Flows Initialization.
* WARNING!!! Must always be done after Layer1 Initialization
*/
Init_Serial_Flows ();
#endif // _GSM
#else
Init_Serial_Flows ();
Initialize_L1_stand_alone (first_available_memory);
#endif /* (OP_L1_STANDALONE == 0) */
#if (OP_L1_STANDALONE == 0)
#if (_GSM==1)
/*
* Condat G2-3 SW Initialization including Frame.
*/
Init_Unmask_KeyIT(); //lifanc for power on
StartFrame ();
#endif // _GSM
#if (TEST==1) && (_GSM==0)
/*
* The Watchdog is used as a General Purpose Timer for the Nucleus Ticks when
* The Layer1 is not started => Test without GSM/GPRS.
*/
Init_Watchdog_Timer ();
#endif
#if WCP_PROF == 1
/*
* WCP Performance Profiler, Ver.2.
*
* WARNING!!! Must always be done after StartFrame() because
* profiler uses Frame services!
*/
prf_Init();
#endif
#endif /* (OP_L1_STANDALONE == 0) */
#else
/*
* SerialSwitch & Serial Flows Initialization.
* WARNING!!! Must always be done after Layer1 Initialization
*/
Init_Serial_Flows ();
/*
* The Watchdog is used as a General Purpose Timer for the Nucleus Ticks when
* The Layer1 is not started => Test without GSM/GPRS.
*/
Init_Watchdog_Timer ();
#endif
#if (CODE_VERSION != SIMULATION)
/*
* Unmask used Interrupts.
*/
#if (REMU==1)
rv_start();
#endif
Init_Unmask_IT ();
//Create_Timer_Interrupt();
#endif /* (CODE_VERSION != SIMULATION) */
/*
#if( LEN_PDT_ID==2)
bios_gpio_irqmode(26);
#endif
*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -