mirror of
https://gitee.com/cosyos/cosyos.git
synced 2026-08-22 22:58:11 +08:00
45 lines
994 B
C
45 lines
994 B
C
/**************************************************************************//**
|
||
* @item CosyOS-III Kernel
|
||
* @file os_starter.c
|
||
* @brief 启动任务(Starter)
|
||
* @author 迟凯峰
|
||
* @version V1.0.0
|
||
* @date 2025.02.08
|
||
******************************************************************************/
|
||
|
||
#include "os_var.h"
|
||
#include "os_api.h"
|
||
#include "sv_create.h"
|
||
#include "sv_task.h"
|
||
#include "ur_api.h"
|
||
|
||
sCat2Str
|
||
(
|
||
SYSCFG_STARTERCREATE,
|
||
CreateTask(Starter, SYSCFG_TASKPRIORITY - (SYSCFG_DEBUGGING ? 4 : 2), MCUCFG_STACKSIZE_STARTER, 0, 0)
|
||
)
|
||
{
|
||
void start_hook(void);
|
||
#if OS_TIMINTTOTAL || OS_TIMQRYTOTAL
|
||
s_u8_t i;
|
||
#if OS_TIMINTTOTAL
|
||
i = OS_TIMINTTOTAL;
|
||
while(i--){
|
||
if(s_timint_handle[i]->hookortask){
|
||
sStartTask_TimInt(i);
|
||
}
|
||
}
|
||
#endif
|
||
#if OS_TIMQRYTOTAL
|
||
i = OS_TIMQRYTOTAL;
|
||
while(i--){
|
||
if(s_timqry_handle[i]->hookortask){
|
||
sStartTask_TimQry(i);
|
||
}
|
||
}
|
||
#endif
|
||
#endif
|
||
start_hook();
|
||
uDeleteTasking;
|
||
}
|