Files
cosyos/System/os_sysidle.c
T
零中断延迟的RTOS 54bde9b733 update CosyOS-内核文件.
Signed-off-by: 零中断延迟的RTOS <cosyos@139.com>
2024-11-11 16:47:31 +00:00

40 lines
959 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 V3.1.0
* @date 2024.11.11
******************************************************************************/
#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][0]){
year = s_rtc[0][0];
s_month2day = year ? ((year & 3) ? 28 : 29) : ((sDefCentury & 3) ? 28 : 29);
}
}
#endif
#if SYSCFG_IDLEHOOK == __ENABLED__
idle_hook();
#endif
#if SYSCFG_LOWPOWERMODE == __ENABLED__
mSys_Idle;
#endif
OS_NOPx2;
uEndTasking;
}