hal_soft_time.h 628 B

123456789101112131415161718192021222324252627
  1. #ifndef __hal_soft_time_h__
  2. #define __hal_soft_time_h__
  3. #include <stdbool.h>
  4. #include <stdint.h>
  5. #include <string.h>
  6. #include "sdk_common.h"
  7. #include "SEGGER_RTT.h"
  8. #include "usr_config.h"
  9. typedef void (*softtime_callback)(void);
  10. typedef struct bsp_soft_time_t
  11. {
  12. uint16_t peroid;
  13. uint8_t state;
  14. uint8_t mode;
  15. uint32_t tim;
  16. softtime_callback cb;
  17. struct bsp_soft_time_t *next;
  18. }bsp_soft_time_t;
  19. void hal_soft_time_stop(bsp_soft_time_t *soft_time_p);
  20. void hal_soft_time_restart(bsp_soft_time_t *soft_time_p);
  21. void hal_soft_time_create(bsp_soft_time_t *soft_time_p);
  22. void hal_soft_time_init(void);
  23. #endif