26 lines
343 B
C
26 lines
343 B
C
#ifndef _SOFT_TIMER_H
|
|
#define _SOFT_TIMER_H
|
|
|
|
#include "stm32g0xx_hal.h"
|
|
|
|
|
|
#define MAX_SOFT_TIMER_COUNT 32
|
|
|
|
|
|
typedef struct c_timer_t{
|
|
uint32_t Timer;// 定时时长 ms
|
|
void (*callback)(void); // 回调函数
|
|
uint32_t Message; // 传递的消息
|
|
uint32_t Param; // 传递进去的参数
|
|
uint32_t Busy; // 1正在使用 0空闲的
|
|
}c_timer_t;
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|