使用2378模板创建的main.c 文件,,为何没有
OSInit (); . . . . OSStart ();
??????????????????????????????????????????????????????????????????
/********************************************************************************************************* ** Function name: main ** Descriptions: 用户程序主函数 ** input parameters: none ** output parameters: none ** Returned value: 没有使用 ** Created by: ** Created Date: **-------------------------------------------------------------------------------------------------------- ** Modified by: ** Modified date: **-------------------------------------------------------------------------------------------------------- *********************************************************************************************************/ int main (void) { TargetInit(); PinInit(); #if __USE_SD FileInit(); AddFileDriver(GetSDCommand(), GetSDInfo()); /* 安装文件系统驱动 */ #endif
#if __USE_USB /* 初始化USB设备控制器 */ if (0 != USB_Initialize()) { /* 若初始化失败 */ while(1) { /* 程序进入死循环 */ OSTimeDly(10); } } #endif
#if __USE_TCP /* 获得网络设置 */ //GetIpSet(GucMCU_Ip); /* 获得固化 IP 设置 */ //GetMarkSet(GucMCU_Mark); //GetGateWaySet(GucMCU_Gateway); //GetDNSSet(GucMCU_Dns); //GusMCU_Port = GetPortSet(); //GetServerIpSet(GucPeer_IP); /* 获得固化 Server IP 设置 */ //GusPeer_Port = GetServerPortSet(); /* 获得固化 Server 端口 设置 */ ZlgipInitial(GucMCU_Ip, GucMCU_Gateway, GucMCU_Mark, GucMCU_Dns); /* ZLG/IP协议栈初始化 */ #endif
OSTaskCreateExt(TASK0, (void *)0, &TASK0_STACK[TASK0_STACK_SIZE-1], TASK0_PRIO, TASK0_ID, &TASK0_STACK[0], TASK0_STACK_SIZE, (void *)0, OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR); OSTaskCreateExt(TASK1, (void *)0, &TASK1_STACK[TASK1_STACK_SIZE-1], TASK1_PRIO, TASK1_ID, &TASK1_STACK[0], TASK1_STACK_SIZE, (void *)0, OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);
OSTaskCreateExt(TASK2, (void *)0, &TASK2_STACK[TASK2_STACK_SIZE-1], TASK2_PRIO, TASK2_ID, &TASK2_STACK[0], TASK2_STACK_SIZE, (void *)0, OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR); OSTaskCreateExt(TASK3, (void *)0, &TASK3_STACK[TASK3_STACK_SIZE-1], TASK3_PRIO, TASK3_ID, &TASK3_STACK[0], TASK3_STACK_SIZE, (void *)0, OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR); while (1) { OSTimeDly(OS_TICKS_PER_SEC * 10); } return 0; } |