timer.h 374 B

123456789101112131415161718192021
  1. #ifndef __SYS_TIMER_H__
  2. #define __SYS_TIMER_H__
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include "stdint.h"
  7. typedef void (*HAL_TimerCB_fp) (void);
  8. void timer_tick_check(void);
  9. int timer_unregister(uint8_t *handle);
  10. uint8_t timer_register(HAL_TimerCB_fp callback, int timerReload);
  11. uint32_t timer_get_os_tick(void);
  12. #ifdef __cplusplus
  13. }
  14. #endif
  15. #endif //__SYS_TIMER_H__