医美代码重构
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.

23 lines
532 B

3 years ago
3 years ago
  1. #pragma once
  2. #include <stdint.h>
  3. #include <string.h>
  4. #include <stdbool.h>
  5. typedef struct {
  6. int uartNum;
  7. } motor_t;
  8. typedef enum {
  9. kRunToPosition,
  10. } motor_event_t;
  11. typedef void (*motor_on_event_t)(motor_event_t event);
  12. bool motor_turning;
  13. void motor_init(motor_t* motor);
  14. void motor_set_zero_point();
  15. double motor_get_position_degree();
  16. uint8_t motor_run_to_postion(int rotation_direction, double position, int speed_level);
  17. void motor_reg_event_cb(motor_on_event_t onevent);
  18. void motor_module_schedule();
  19. bool motor_stop();