Kaynağa Gözat

添加了 PWM9_CONFIG 默认配置 和 TIM3_CONFIG 默认配置

Ihavedone 5 yıl önce
ebeveyn
işleme
04831062bd

+ 11 - 0
bsp/stm32/libraries/HAL_Drivers/config/f4/pwm_config.h

@@ -61,6 +61,17 @@ extern "C" {
 #endif /* PWM5_CONFIG */
 #endif /* BSP_USING_PWM5 */
 
+#ifdef BSP_USING_PWM9
+#ifndef PWM9_CONFIG
+#define PWM9_CONFIG                             \
+    {                                           \
+       .tim_handle.Instance     = TIM9,         \
+       .name                    = "pwm9",       \
+       .channel                 = 0             \
+    }
+#endif /* PWM9_CONFIG */
+#endif /* BSP_USING_PWM9 */
+
 #ifdef BSP_USING_PWM12
 #ifndef PWM12_CONFIG
 #define PWM12_CONFIG                            \

+ 11 - 0
bsp/stm32/libraries/HAL_Drivers/config/f4/tim_config.h

@@ -27,6 +27,17 @@ extern "C" {
     }
 #endif /* TIM_DEV_INFO_CONFIG */
 
+#ifdef BSP_USING_TIM3
+#ifndef TIM3_CONFIG
+#define TIM3_CONFIG                                         \
+    {                                                       \
+       .tim_handle.Instance     = TIM3,                     \
+       .tim_irqn                = TIM3_IRQn,                \
+       .name                    = "timer3",                 \
+    }
+#endif /* TIM3_CONFIG */
+#endif /* BSP_USING_TIM3 */
+
 #ifdef BSP_USING_TIM11
 #ifndef TIM11_CONFIG
 #define TIM11_CONFIG                                        \