define TIMER_NUM 10
static timer_t TimerPool [TIMER_NUM];
typedef void* timerParam_t; //空指针类型 定义了 timerParam_t 指针
typedef void (*timerCallback_t)(void *param); // 函数指针类型
//定义了带形参数 param
//返回值为timerCallback_t类型函数指针
typedef struct
{
timerCallback_t callback ; // 定义了放回调函数的(timerCallback)的地址变量名
timerParam_t param; //定义了存放定时器的参数( timerParam)的地址变量名
uint32_t tick;
uint32_t value;
} timer_t;
这样做主要是为了可以造多个定时器出来