Browse Source

[bsp/stm32] fix the bug of uart that not define pwm10 and pwm11

zuozuojia 3 years ago
parent
commit
04971a96fe
1 changed files with 6 additions and 0 deletions
  1. 6 0
      bsp/stm32/libraries/HAL_Drivers/drv_pwm.c

+ 6 - 0
bsp/stm32/libraries/HAL_Drivers/drv_pwm.c

@@ -581,6 +581,12 @@ static void pwm_get_channel(void)
 #ifdef BSP_USING_PWM9_CH4
 #ifdef BSP_USING_PWM9_CH4
     stm32_pwm_obj[PWM9_INDEX].channel |= 1 << 3;
     stm32_pwm_obj[PWM9_INDEX].channel |= 1 << 3;
 #endif
 #endif
+#ifdef BSP_USING_PWM10_CH1
+    stm32_pwm_obj[PWM10_INDEX].channel |= 1 << 0;
+#endif
+#ifdef BSP_USING_PWM11_CH1
+    stm32_pwm_obj[PWM11_INDEX].channel |= 1 << 0;
+#endif
 #ifdef BSP_USING_PWM12_CH1
 #ifdef BSP_USING_PWM12_CH1
     stm32_pwm_obj[PWM12_INDEX].channel |= 1 << 0;
     stm32_pwm_obj[PWM12_INDEX].channel |= 1 << 0;
 #endif
 #endif