Files
cosyos/System/os_sysidle.c
零中断延迟的RTOS f83b72b7f0 update CosyOS-II 内核文件.
Signed-off-by: 零中断延迟的RTOS <cosyos@139.com>
2023-11-25 15:57:45 +00:00

37 lines
891 B
C
Raw 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-II Kernel
* @file os_sysidle.c
* @brief 系统空闲任务Sysidle
* @author 迟凯峰
* @version V1.2.0
* @date 2023.11.25
******************************************************************************/
#include "os_link.h"
uCreateTask(Sysidle, 0, MCUCFG_STACKSIZE_SYSIDLE, 0, 0)
{
#if SYSCFG_SAFERUNTIME == __ENABLED__
if(true){
s_tid_t i;
for(i = 1; i < OS_TASKTOTAL + 1; i++){
s_sign_timeout[i] = 0;
}
}
#endif
#if SYSCFG_SOFTRTC == __ENABLED__
if(true){
static s_u8_t year = 0xFF;
if(year != s_rtc[0]){
year = s_rtc[0];
s_month2day = year ? ((year & 3) ? 28 : 29) : ((sDefCentury & 3) ? 28 : 29);
}
}
#endif
#if SYSCFG_IDLEHOOK == __ENABLED__
idle_hook();
#endif
mSys_Idle;
uEndTasking;
}