int main(int argc, char *argv[], char *envp[]) { Application app; Application_Init(&app, argc, argv, envp); int ret = ExitStatus_Success; try { ret = Application_Run(&app) ? ExitStatus_Success : ExitStatus_Failure; } catchAny { Exception_Print(e); #if Exception_SaveTrace Backtrace_PrintTrace( Exception_GetTraceBuffer(), Exception_GetTraceLength()); #endif ret = ExitStatus_Failure; } finally { Application_Destroy(&app); } tryEnd; return ret; }
int main(void) { uint32 i=0; RCC_Configuration(); //Mema_Init(MemBuf); //USART_Configuration(0); //USART_WriteLine(USART1,"fdsafdsafsaf"); Application_Run(); while(1); }
void Temp(void *Tags) { Frist_CheckEnv(); Load_EnvConfig();//加载环境变量 while(1) { Tos_TaskDelay(200); WaitDownLoadCount--; //BOOT停留计数 if(enValue.UpdateApp!=False)WaitDownLoadCount=10;//应用不完整不进去应用 if(WaitDownLoadCount==0)Application_Run(ApplicationAddress);//超时进入应用 } }
/******************************************************************************* * Function Name: main ******************************************************************************** * Summary: * System entry point. This calls the BLE and other peripheral Component * APIs for achieving the desired system behaviour * * Parameters: * void * * Return: * int * *******************************************************************************/ int main() { /* This function will initialize all the Components and system variables */ InitializeSystem(); /*************************************************************************** * Main polling loop ***************************************************************************/ while(1) { /*********************************************************************** * Process all the pending BLE events in the stack ***********************************************************************/ BLE_Run(); /*********************************************************************** * Put BLE sub system in DeepSleep mode when it is idle ***********************************************************************/ BLE_ManagePower(); /*********************************************************************** * Run your application specific code here ***********************************************************************/ if(Application_GetPowerState() == ACTIVE) { /* ADD YOUR APPLICATION MAIN LOOP CODE IN THIS FUNCTION */ Application_Run(); } /*********************************************************************** * Process application and system power modes ***********************************************************************/ Application_ManagePower(); System_ManagePower(); } /* End of while(1) */ } /* End of main */
/******************************************************************************* * Function Name: main ******************************************************************************** * Summary: * System entry point. This calls the BLE and other peripheral Component * APIs for achieving the desired system behaviour * * Parameters: * void * * Return: * int * *******************************************************************************/ int main() { /* This function will initialize all the Components and system variables. * The low power clock startup code is called inside this routine */ InitializeSystem(); /*************************************************************************** * Main polling loop ***************************************************************************/ while(1) { /*********************************************************************** * Process all the pending BLE events in the stack ***********************************************************************/ BLE_Run(); /*********************************************************************** * Put BLE sub system in DeepSleep mode when it is idle ***********************************************************************/ BLE_ManagePower(); /*********************************************************************** * Run your application specific code here ***********************************************************************/ if(Application_GetPowerState() == ACTIVE) { Application_Run(); } /*********************************************************************** * Process application and system power modes ***********************************************************************/ Application_ManagePower(); System_ManagePower(); } /* End of while(1) */ } /* End of main */