Browse Source

竖直电机使能可控

master
Lizongdi 3 weeks ago
parent
commit
95f0a40a68
  1. 4
      diaoerqiege/BHBF_Robot_Lifting_Lug/Core/BASE/Src/BSP/bsp_GPIO.c
  2. 4
      diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/FSM.c

4
diaoerqiege/BHBF_Robot_Lifting_Lug/Core/BASE/Src/BSP/bsp_GPIO.c

@ -32,10 +32,10 @@ void GF_BSP_GPIO_SetIO(uint8_t IO_Index,uint8_t Level)
HAL_GPIO_WritePin(OUT_2_GPIO_Port, OUT_2_Pin, PinState); HAL_GPIO_WritePin(OUT_2_GPIO_Port, OUT_2_Pin, PinState);
break; break;
case 3: case 3:
//HAL_GPIO_WritePin(OUT_3_GPIO_Port, OUT_3_Pin, PinState); HAL_GPIO_WritePin(OUT_3_GPIO_Port, OUT_3_Pin, PinState);
break; break;
case 4: case 4:
//HAL_GPIO_WritePin(OUT_4_GPIO_Port, OUT_4_Pin, PinState); HAL_GPIO_WritePin(OUT_4_GPIO_Port, OUT_4_Pin, PinState);
break; break;
case 5: case 5:
HAL_GPIO_WritePin(OUT_5_GPIO_Port, OUT_5_Pin, PinState); HAL_GPIO_WritePin(OUT_5_GPIO_Port, OUT_5_Pin, PinState);

4
diaoerqiege/BHBF_Robot_Lifting_Lug/Core/Src/FSM.c

@ -167,11 +167,11 @@ void IO_Control()
Test1 = GF_BSP_GPIO_ReadIO(3); Test1 = GF_BSP_GPIO_ReadIO(3);
if (!Test1) if (!Test1)
{ {
GF_BSP_GPIO_SetIO(5, 0); GF_BSP_GPIO_SetIO(3, 0);
} }
else else
{ {
GF_BSP_GPIO_SetIO(5, 1); GF_BSP_GPIO_SetIO(3, 1);
} }
} }

Loading…
Cancel
Save