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.
79 lines
2.1 KiB
79 lines
2.1 KiB
|
3 weeks ago
|
/******************************************************************************
|
||
|
|
|
||
|
|
版权所有 (C), 2018-2099, Radkil
|
||
|
|
|
||
|
|
******************************************************************************
|
||
|
|
文 件 名 : motor.c
|
||
|
|
版 本 号 : 初稿
|
||
|
|
作 者 : radkil
|
||
|
|
生成日期 : 2026年4月14日
|
||
|
|
最近修改 :
|
||
|
|
功能描述 : 轮电机具体实现
|
||
|
|
|
||
|
|
修改历史 :
|
||
|
|
1.日 期 : 2026年4月14日
|
||
|
|
作 者 : radkil
|
||
|
|
修改内容 : 创建文件
|
||
|
|
|
||
|
|
******************************************************************************/
|
||
|
|
#include "robot.h"
|
||
|
|
|
||
|
|
/*----------------------------------------------*
|
||
|
|
* 外部变量说明 *
|
||
|
|
*----------------------------------------------*/
|
||
|
|
|
||
|
|
/*----------------------------------------------*
|
||
|
|
* 外部函数原型说明 *
|
||
|
|
*----------------------------------------------*/
|
||
|
|
|
||
|
|
/*----------------------------------------------*
|
||
|
|
* 内部函数原型说明 *
|
||
|
|
*----------------------------------------------*/
|
||
|
|
|
||
|
|
/*----------------------------------------------*
|
||
|
|
* 全局变量 *
|
||
|
|
*----------------------------------------------*/
|
||
|
|
|
||
|
|
/*----------------------------------------------*
|
||
|
|
* 模块级变量 *
|
||
|
|
*----------------------------------------------*/
|
||
|
|
|
||
|
|
/*----------------------------------------------*
|
||
|
|
* 常量定义 *
|
||
|
|
*----------------------------------------------*/
|
||
|
|
|
||
|
|
/*----------------------------------------------*
|
||
|
|
* 宏定义 *
|
||
|
|
*----------------------------------------------*/
|
||
|
|
void WheelMotorStrong(void)
|
||
|
|
{
|
||
|
|
// 用于强符号覆盖的锚点
|
||
|
|
}
|
||
|
|
|
||
|
|
int WheelMotorInit(void)
|
||
|
|
{
|
||
|
|
printf("This is motor.\n");
|
||
|
|
return RB_SUCCESS;
|
||
|
|
}
|
||
|
|
|
||
|
|
void WheelMotorDirForward(void)
|
||
|
|
{
|
||
|
|
printf("This is motor. forward!\n");
|
||
|
|
}
|
||
|
|
|
||
|
|
void WheelMotorDirBackward(void)
|
||
|
|
{
|
||
|
|
printf("This is motor. backward!\n");
|
||
|
|
}
|
||
|
|
|
||
|
|
void WheelMotorStop(void)
|
||
|
|
{
|
||
|
|
printf("This is motor. stop!\n");
|
||
|
|
}
|
||
|
|
|
||
|
|
void WheelMotorSetSpeed(int _iValue)
|
||
|
|
{
|
||
|
|
printf("This is motor. set speed[%d]!\n", _iValue);
|
||
|
|
}
|
||
|
|
|