#ifndef _TASK_TYPE_H_ #define _TASK_TYPE_H_ #include "stdint.h" #include "cfg/al_helper.h" #include "pt_thread/pt_header.h" #include "task_cfg.h" typedef struct mytask { int8_t cActive; // int8_t cMode; int8_t cTaskID; // int8_t reserve; // #if(TASK_WITH_NAME) int8_t cTaskName[TASK_NAME_LEN]; #endif int32_t lLastTime; int32_t lPeriod; // #if(TASK_WITH_PT) int8_t (*TaskProc)(struct pt* pt1); // #else int8_t (*TaskProc)(void); // #endif struct pt pt1; }TASK_DATA,*PTASK_DATA; #if(TASK_WITH_PT) typedef int8_t (*taskProc)(struct pt* pt1); #else typedef int8_t (*taskProc)(void); #endif // define timer data struct typedef struct mytimer { int8_t cUse; int8_t* TimerID; int8_t cMode; // timer work mode int8_t reserve1; int32_t lPeriod; // timer period, unit=10ms. int32_t lLastTime; // timer count for reload void (*routine)(void * Param1); // user's timer routine void *Param1; }TIMER_DATA,*PTIMER_DATA; #endif