Files
cosyos/System/os_main.c
零中断延迟的RTOS ddbec84cbc update 内核文件.
Signed-off-by: 零中断延迟的RTOS <cosyos@139.com>
2026-02-01 18:58:41 +00:00

34 lines
1.0 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**************************************************************************//**
* @item CosyOS-III Kernel
* @file os_main.c
* @brief 启动-CosyOS
* @author 迟凯峰
* @version V2.3.0
* @date 2026.02.01
******************************************************************************/
#include "os_var.h"
#include "os_api.h"
#include "sv_create.h"
#include "sv_task.h"
#include "ur_api.h"
/**
\brief 启动-CosyOS
\param 无
\return 错误码
\note 用户应自主创建main函数并在其末尾处调用该函数来启动-CosyOS
在正常情况下,该函数并不会返回,而是直接调度至 Starter 运行;
只有当 Starter 启动失败时,才会返回错误码提示用户。
*/
s_ecode_t uStartCosyOS(void)
{
sCat2Str(SYSCFG_STARTERCREATE, ExtTask(Starter));
#if (OS_TIMINTTOTAL > 0 || OS_TIMQRYTOTAL > 0)
void os_init_timing(void);
os_init_timing();
#endif
mCosyOS_INIT();
return uStartTask_Ready(Starter);
}