platform_timer.h 739 B

123456789101112131415161718192021222324
  1. /*
  2. * @Author: jiejie
  3. * @Github: https://github.com/jiejieTop
  4. * @Date: 2019-12-10 22:18:32
  5. * @LastEditTime: 2020-04-27 17:15:58
  6. * @Description: the code belongs to jiejie, please keep the author information and source code according to the license.
  7. */
  8. #ifndef _PLATFORM_TIMER_H_
  9. #define _PLATFORM_TIMER_H_
  10. #include "FreeRTOS.h"
  11. typedef struct platform_timer {
  12. uint32_t time;
  13. } platform_timer_t;
  14. void platform_timer_init(platform_timer_t* timer);
  15. void platform_timer_cutdown(platform_timer_t* timer, unsigned int timeout);
  16. char platform_timer_is_expired(platform_timer_t* timer);
  17. int platform_timer_remain(platform_timer_t* timer);
  18. unsigned long platform_timer_now(void);
  19. void platform_timer_usleep(unsigned long usec);
  20. #endif