您的位置:首页 > 其它

uCOS-II 学习笔记--------OSInit函数

2014-01-06 20:46 489 查看
系统初始化

void  OSInit (void)
{
OSInitHookBegin();                                           /* Call port specific initialization code   */

OS_InitMisc();                                               /* Initialize miscellaneous variables       */

OS_InitRdyList();                                            /* Initialize the Ready List                */

OS_InitTCBList();                                            /* Initialize the free list of OS_TCBs      */

OS_InitEventList();                                          /* Initialize the free list of OS_EVENTs    */

#if (OS_FLAG_EN > 0u) && (OS_MAX_FLAGS > 0u)
OS_FlagInit();                                               /* Initialize the event flag structures     */
#endif

#if (OS_MEM_EN > 0u) && (OS_MAX_MEM_PART > 0u)
OS_MemInit();                                                /* Initialize the memory manager            */
#endif

#if (OS_Q_EN > 0u) && (OS_MAX_QS > 0u)
OS_QInit();                                                  /* Initialize the message queue structures  */
#endif

OS_InitTaskIdle();                                           /* Create the Idle Task                     */
#if OS_TASK_STAT_EN > 0u
OS_InitTaskStat();                                           /* Create the Statistic Task                */
#endif

#if OS_TMR_EN > 0u
OSTmr_Init();                                                /* Initialize the Timer Manager             */
#endif

OSInitHookEnd();                                             /* Call port specific init. code            */

#if OS_DEBUG_EN > 0u
OSDebugInit();
#endif
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: