本帖最后由 肥油玉帝 于 2018-7-17 10:50 编辑
我知道了,是应为在调用过OSStart()函数之后,CPU就转去运行μCOS-II操作系统了
OSStart()的官方英文注释是(前半部分):This function is used to start the multitasking process which lets uC/OS-II manages the task that you have created. OSStart()具体内容是:
[C] 纯文本查看 复制代码 void OSStart (void)
{
if (OSRunning == OS_FALSE) {
OS_SchedNew(); /* Find highest priority's task priority number */
OSPrioCur = OSPrioHighRdy;
OSTCBHighRdy = OSTCBPrioTbl[OSPrioHighRdy]; /* Point to highest priority task ready to run */
OSTCBCur = OSTCBHighRdy;
OSStartHighRdy(); /* Execute target specific code to start task */
}
}
|