timer.h 430 B

12345678910111213141516171819
  1. #ifndef __SYSTEM_TIMER_H__
  2. #define __SYSTEM_TIMER_H__
  3. #include <stdint.h>
  4. typedef void (*TimerCallbackFunc)(void);
  5. struct timer_param_s {
  6. uint8_t timer_no;
  7. uint16_t interval; // 定时时间(s)
  8. uint32_t timerTick;
  9. TimerCallbackFunc timerCbFunc;
  10. } ;
  11. void yx_timer_init(struct timer_param_s * params);
  12. void yx_timer_start(struct timer_param_s * params);
  13. void yx_timer_stop(struct timer_param_s * params);
  14. #endif