本帖最后由 380091044 于 2024-4-15 17:07 编辑
typedef struct
{
u8 Run;//任务状态:Run/Stop
u16 TIMCount;//定时计数器
u16 TRITime;//重载计数器
void (*TaskHook) (void);//任务函数
} TASK_COMPONENTS;
static TASK_COMPONENTS Task_Comps=
{
//状态 计数 周期 任务函数名
{0, 1, 1, Sample_Display},/* 任务1:task 1 Period:1ms */
{0, 10, 10, Sample_MatrixKey},/*任务2: task 2 Period:10ms */
{0, 10, 10, Sample_adcKey},/* 任务3:task 3 Period:10ms */
{0, 300, 300, Sample_NTC},/* 任务4:task 4 Peri