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

#pragma once
#include <stdint.h>
typedef struct {
int mark;
// int uartNum;
} motor_t;
typedef enum {
kRunToPosition,
} motor_event_t;
typedef void (*motor_on_event_t)(motor_event_t event);
void motor_init(motor_t* motor);
void motor_set_zero_point();
/**
* @brief 返回当前电机所在位置0->360
*
* @return uint32_t
*/
uint32_t motor_get_position_degree();
/**
* @brief 电机转到多少度
*/
void motor_run_to_postion(int potion);
void motor_reg_event_cb(motor_on_event_t onevent);