医美代码重构
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
506 B

  1. #pragma once
  2. #include <stdint.h>
  3. typedef struct {
  4. int mark;
  5. // int uartNum;
  6. } motor_t;
  7. typedef enum {
  8. kRunToPosition,
  9. } motor_event_t;
  10. typedef void (*motor_on_event_t)(motor_event_t event);
  11. void motor_init(motor_t* motor);
  12. void motor_set_zero_point();
  13. /**
  14. * @brief 0->360
  15. *
  16. * @return uint32_t
  17. */
  18. uint32_t motor_get_position_degree();
  19. /**
  20. * @brief
  21. */
  22. void motor_run_to_postion(int potion);
  23. void motor_reg_event_cb(motor_on_event_t onevent);