Files
Motor_v2/Robot_V2/device/motor.h
T

39 lines
813 B
C
Raw Normal View History

/**
* @file device/motor.h
* @brief 底层设备驱动与外设封装源文件
* @note 本文件仅补充 Doxygen 文档注释,不改变代码逻辑。
*/
2025-12-08 02:48:59 +08:00
#ifndef _MOTOR_H
#define _MOTOR_H
2026-01-24 01:50:39 +08:00
// 定义电机驱动使能引脚
/** @brief MOTOR_EN_GPIO_PORT 宏定义 */
2026-01-24 01:50:39 +08:00
#define MOTOR_EN_GPIO_PORT GPIOC
/** @brief MOTOR_EN_GPIO_PIN 宏定义 */
2026-01-24 01:50:39 +08:00
#define MOTOR_EN_GPIO_PIN GPIO_PIN_13
/** @brief RCU_MOTOR_EN_GPIO 宏定义 */
2026-01-24 01:50:39 +08:00
#define RCU_MOTOR_EN_GPIO RCU_GPIOC
2025-12-08 02:48:59 +08:00
/**
* @brief 初始化电机驱动输出
* @return void
*/
2025-12-08 02:48:59 +08:00
void motor_init(void);
/**
* @brief 复位电机驱动
* @return void
*/
2025-12-08 02:48:59 +08:00
void motor_reset(void);
/**
* @brief 唤醒电机驱动
* @return void
*/
2025-12-08 02:48:59 +08:00
void motor_resume(void);
/**
* @brief 使电机驱动进入休眠
* @return void
*/
2025-12-08 02:48:59 +08:00
void motor_sleep(void);
#endif