luat_hwtimer.h 527 B

12345678910111213141516171819
  1. #ifndef LUAT_HWTIMER_H
  2. #define LUAT_HWTIMER_H
  3. #include "luat_base.h"
  4. typedef struct luat_hwtimer_conf {
  5. uint8_t unit; /**< timer accuracy */
  6. uint32_t timeout; /**< timeout period */
  7. uint8_t is_repeat; /**< cycle timer */
  8. }luat_hwtimer_conf_t;
  9. int luat_hwtimer_create(luat_hwtimer_conf_t *conf);
  10. int luat_hwtimer_start(int id);
  11. int luat_hwtimer_stop(int id);
  12. int luat_hwtimer_read(int id);
  13. int luat_hwtimer_change(int id, uint32_t newtimeout);
  14. int luat_hwtimer_destroy(int id);
  15. #endif