Commit c6f3415e authored by 时昊's avatar 时昊

feat:增加1ms任务

parent acb1d22f
......@@ -4,6 +4,7 @@
typedef struct
{
uint32_t u32msRocBak;
uint32_t u32Task1msCnt;
uint32_t u32Task2msCnt;
uint32_t u32Task5msCnt;
uint32_t u32Task10msCnt;
......@@ -266,6 +267,14 @@ void Sys_Scheduling_Service(void)
}
g_stSysScheduler.u32msRocBak = u32msROC;
g_stSysScheduler.u32Task1msCnt += u32msDelta;
if (g_stSysScheduler.u32Task1msCnt >= 1UL)
{
g_stSysScheduler.u32Task1msCnt %= 1UL;
Sys_1ms_Tasks();
}
g_stSysScheduler.u32Task2msCnt += u32msDelta;
if (g_stSysScheduler.u32Task2msCnt >= 2UL)
{
......
......@@ -36,6 +36,7 @@ extern void Sys_Scheduling_Service(void);
extern void Sys_Scheduler_ISR(void);
extern void Sys_Pseudo_Real_Time_Tasks(void);
extern void Sys_1ms_Tasks(void);
extern void Sys_2ms_Tasks(void);
extern void Sys_5ms_Tasks(void);
extern void Sys_10ms_Tasks(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment