#ifndef __MW_MOTOR_H__ #define __MW_MOTOR_H__ #include typedef struct { // 初始化 void (*init)(void); // 前进 void (*go_ahead)(int16_t); // 后退 void (*go_back)(int16_t); // 左转 void (*go_left)(int16_t); // 右转 void (*go_right)(int16_t); // 自转 void (*go_self_rotate)(int16_t); // 停止 void (*stop)(void); // 设置速度 void (*set_speed)(uint16_t); }mw_motor_drv_str; void mw_motor_launch(mw_motor_drv_str *str_motor_drv); #endif