23 lines
858 B
C
Raw Permalink Normal View History

2026-05-10 21:35:40 +08:00
#include "mw_motor.h"
// #include "bsp_motor.h"
#include "tb6612.h"
#include <stdint.h>
/*************************************************************************************
* @brief motor drv注册
* @param[in/out] str_motor_drv
*
* @warning ,
* @note
*************************************************************************************/
void mw_motor_launch(mw_motor_drv_str *str_motor_drv)
{
str_motor_drv->init = tb6612_init;
str_motor_drv->go_ahead = tb6612_go_ahead;
str_motor_drv->go_back = tb6612_go_back;
str_motor_drv->go_left = tb6612_go_left;
str_motor_drv->go_right = tb6612_go_right;
str_motor_drv->go_self_rotate = tb6612_go_self_rotate;
str_motor_drv->stop = tb6612_stop;
str_motor_drv->set_speed = tb6612_change_speed;
}