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

18 lines
543 B

  1. #pragma once
  2. #include <stdint.h>
  3. #include <string.h>
  4. typedef struct {
  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. uint32_t motor_get_position_degree();
  14. void motor_run_to_postion(int rotation_direction, double position, int speed_level);
  15. void motor_reg_event_cb(motor_on_event_t onevent);
  16. double motor_drive_read_encoder();
  17. uint8_t motor_drive_set_packages_ctr(double position, int direction);