#ifndef __APP_MOTOR_H__ #define __APP_MOTOR_H__ typedef enum { motor_state_stop = 0, // 停下 motor_state_goAhead, // 前进 motor_state_goBack, // 后退 motor_state_turnLeft, // 左转 motor_state_turnRight, // 右转 motor_state_selfLeft, // 自转 左 逆时针 motor_state_selfRight, // 自转 右 顺时针 motor_state_NUM, // 状态总数 }motor_state_ENUM; /************************************************************************************* * @brief app_motor 初始化 * * @warning 【不可重入,阻塞等警告】 * @note 【重大修改】 *************************************************************************************/ void app_motor_init(void); /************************************************************************************* * @brief 电机驱动器根据当前电机状态,进行相应的动作 * * @warning 【不可重入,阻塞等警告】 * @note 【重大修改】 *************************************************************************************/ void app_motor_mainProcess(void); /************************************************************************************* * @brief 外部修改电机状态 * @param[in/out] e_val【参数注释】 * * @warning 【不可重入,阻塞等警告】 * @note 【重大修改】 *************************************************************************************/ void app_motor_changeState(motor_state_ENUM e_val); #endif