2026-05-23 22:46:32 +08:00
|
|
|
/**
|
|
|
|
|
* @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
|
|
|
// 定义电机驱动使能引脚
|
2026-05-23 22:46:32 +08:00
|
|
|
/** @brief MOTOR_EN_GPIO_PORT 宏定义 */
|
2026-01-24 01:50:39 +08:00
|
|
|
#define MOTOR_EN_GPIO_PORT GPIOC
|
2026-05-23 22:46:32 +08:00
|
|
|
/** @brief MOTOR_EN_GPIO_PIN 宏定义 */
|
2026-01-24 01:50:39 +08:00
|
|
|
#define MOTOR_EN_GPIO_PIN GPIO_PIN_13
|
2026-05-23 22:46:32 +08:00
|
|
|
/** @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
|
|
|
|
2026-05-23 22:46:32 +08:00
|
|
|
/**
|
|
|
|
|
* @brief 初始化电机驱动输出
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
2025-12-08 02:48:59 +08:00
|
|
|
void motor_init(void);
|
2026-05-23 22:46:32 +08:00
|
|
|
/**
|
|
|
|
|
* @brief 复位电机驱动
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
2025-12-08 02:48:59 +08:00
|
|
|
void motor_reset(void);
|
2026-05-23 22:46:32 +08:00
|
|
|
/**
|
|
|
|
|
* @brief 唤醒电机驱动
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
2025-12-08 02:48:59 +08:00
|
|
|
void motor_resume(void);
|
2026-05-23 22:46:32 +08:00
|
|
|
/**
|
|
|
|
|
* @brief 使电机驱动进入休眠
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
2025-12-08 02:48:59 +08:00
|
|
|
void motor_sleep(void);
|
|
|
|
|
|
|
|
|
|
#endif
|