mirror of
https://gitee.com/cosyos/cosyos.git
synced 2026-02-06 03:41:41 +08:00
37 lines
891 B
C
37 lines
891 B
C
/**************************************************************************//**
|
||
* @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;
|
||
}
|