2026-05-10 21:35:40 +08:00

30 lines
530 B
C

#ifndef __MW_MOTOR_H__
#define __MW_MOTOR_H__
#include <stdint.h>
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