STimer.h 870 B

123456789101112131415161718192021222324252627
  1. /*******************************************************************************
  2. * File Name: STimer.h
  3. * Function Describe: Header file for STimer.c
  4. * Relate Module:
  5. * Explain:
  6. * Writer:ShiLiangWen
  7. * Date: 2015.11.6
  8. *******************************************************************************/
  9. #ifndef __STIMER_H
  10. #define __STIMER_H
  11. /************************Begin************************************************/
  12. #include "stdint.h"
  13. typedef void (*timer_cb_t)(void *param); //¶¨Ê±Æ÷»Øµ÷º¯ÊýÖ¸Õë
  14. typedef struct timer_t
  15. {
  16. struct timer_t *next;
  17. uint32_t tcnt;
  18. timer_cb_t handler;
  19. void *param;
  20. }timer_t,*p_timer_t;
  21. void STimerCreate(timer_t *Timer,timer_cb_t CallBack,void *Param);
  22. void STimerStart(timer_t *Timer,uint32_t Interval);
  23. void STimerStop(timer_t *Timer);
  24. /*************************End*************************************************/
  25. #endif