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

21 lines
508 B

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. void motor_init(motor_t* motor);
  13. void motor_set_zero_point();
  14. double motor_get_position_degree();
  15. void motor_run_to_postion(int rotation_direction, double position, int speed_level);
  16. void motor_reg_event_cb(motor_on_event_t onevent);
  17. void motor_module_schedule();
  18. bool motor_stop();