改一下,向左是CW - 0, 向右是CCW - 1

This commit is contained in:
yankun
2026-02-06 17:56:40 +08:00
parent 58053fdd29
commit fcc90cc4b0
2 changed files with 13 additions and 12 deletions

View File

@@ -30,8 +30,8 @@ extern "C" {
*/
typedef enum
{
MOTOR_DIR_CWW = 0, /* 向左移动 (Counter Clockwise) */
MOTOR_DIR_CW = 1 /* 向右移动 (Clockwise) */
MOTOR_DIR_CW = 0, /* 向左移动 (Clockwise) */
MOTOR_DIR_CCW = 1 /* 向右移动 (Counter Clockwise) */
} Motor_DirectionTypeDef;
/* Exported constants --------------------------------------------------------*/
@@ -73,7 +73,7 @@ uint8_t Machine_IsAtLimit(void);
/**
* @brief 设置步进电机方向
* @param dir: 方向 (MOTOR_DIR_CWW: 向左, MOTOR_DIR_CW: 向右)
* @param dir: 方向 (MOTOR_DIR_CW: 向左, MOTOR_DIR_CCW: 向右)
* @retval None
*/
void Machine_SetDirection(Motor_DirectionTypeDef dir);