/****************************************Copyright (c)**************************************************** ** ** http://www.powermcu.com ** **--------------File Info--------------------------------------------------------------------------------- ** File name: main.c ** Descriptions: The UCOSII application function ** **-------------------------------------------------------------------------------------------------------- ** Created by: AVRman ** Created date: 2010-11-9 ** Version: v1.0 ** Descriptions: The original version ** **-------------------------------------------------------------------------------------------------------- ** Modified by: ** Modified date: ** Version: ** Descriptions: ** *********************************************************************************************************/ /* Includes ------------------------------------------------------------------*/ #include "includes.h" /********************************************************************************************************** * main() * * Description : This is the standard entry point for C code. It is assumed that your code will call * main() once you have performed all necessary initialization. * * Argument(s) : none. * * Return(s) : none. **********************************************************************************************************/ extern unsigned char g_ucTickFlag; extern unsigned char g_ucSecFlag; int main (void) { Uart1Init(); if (SysTick_Config(SystemCoreClock / 100)){ while (1); } W25Q64_Init(); FileSysInit(); //IapTrace(IAP_VERSION_NAME); g_ucRand=GetRandBySTM32ID(); memset(&sutMsg,0,sizeof(SUT_MSG)); NewTask(TASK_WAIT); //NewTask(TASK_DL_APP); CopyFileInit(); while(1) { if(sutMsg.Uart1Recv){ //Use for PC Uart1Msg(); sutMsg.Uart1Recv=0; memset(IapRxBuf,0,sizeof(IapRxBuf)); } if(sutMsg.TaskStart){ sutMsg.TaskStart=0; StartMsg(); } if(sutMsg.Tick10ms){ sutMsg.Tick10ms=0; TickMsg(); } if(sutMsg.Tick500ms){ sutMsg.Tick500ms=0; Tick500Msg(); } } return (0); } //void assert_failed(uint8_t* file, uint32_t line) //{ // printf("[AF]f:%s,l:%d\r\n",file,line); // while (1) // {} //} /********************************************************************************************************* END FILE *********************************************************************************************************/