diff options
| author | Yang sheng <[email protected]> | 2022-03-07 01:20:05 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-03-07 01:20:05 +0800 |
| commit | 542195559bf011b5b52fa2e57490adad26e8b7b6 (patch) | |
| tree | a996625a4ea47af0cb1b6d1c2b6ee893cd5f2fb1 | |
| parent | c1ab9953718d90009a392b360ba7955a5ee305a1 (diff) | |
[bsp][stm32] Add support with pwm6 to pwm13 (#5620)
| -rw-r--r-- | bsp/stm32/libraries/HAL_Drivers/config/f1/pwm_config.h | 88 | ||||
| -rw-r--r-- | bsp/stm32/libraries/STM32F1xx_HAL/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h | 2 |
2 files changed, 89 insertions, 1 deletions
diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f1/pwm_config.h b/bsp/stm32/libraries/HAL_Drivers/config/f1/pwm_config.h index c4d4bcf202..f5b32eef73 100644 --- a/bsp/stm32/libraries/HAL_Drivers/config/f1/pwm_config.h +++ b/bsp/stm32/libraries/HAL_Drivers/config/f1/pwm_config.h @@ -72,6 +72,94 @@ extern "C" { #endif /* PWM5_CONFIG */ #endif /* BSP_USING_PWM5 */ +#ifdef BSP_USING_PWM6 +#ifndef PWM6_CONFIG +#define PWM6_CONFIG \ + { \ + .tim_handle.Instance = TIM6, \ + .name = "pwm6", \ + .channel = 0 \ + } +#endif /* PWM6_CONFIG */ +#endif /* BSP_USING_PWM6 */ + +#ifdef BSP_USING_PWM7 +#ifndef PWM7_CONFIG +#define PWM7_CONFIG \ + { \ + .tim_handle.Instance = TIM7, \ + .name = "pwm7", \ + .channel = 0 \ + } +#endif /* PWM7_CONFIG */ +#endif /* BSP_USING_PWM7 */ + +#ifdef BSP_USING_PWM8 +#ifndef PWM8_CONFIG +#define PWM8_CONFIG \ + { \ + .tim_handle.Instance = TIM8, \ + .name = "pwm8", \ + .channel = 12 \ + } +#endif /* PWM8_CONFIG */ +#endif /* BSP_USING_PWM8 */ + +#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_PWM10 +#ifndef PWM10_CONFIG +#define PWM10_CONFIG \ + { \ + .tim_handle.Instance = TIM10, \ + .name = "pwm10", \ + .channel = 0 \ + } +#endif /* PWM10_CONFIG */ +#endif /* BSP_USING_PWM10 */ + +#ifdef BSP_USING_PWM11 +#ifndef PWM11_CONFIG +#define PWM11_CONFIG \ + { \ + .tim_handle.Instance = TIM11, \ + .name = "pwm11", \ + .channel = 0 \ + } +#endif /* PWM11_CONFIG */ +#endif /* BSP_USING_PWM11 */ + +#ifdef BSP_USING_PWM12 +#ifndef PWM12_CONFIG +#define PWM12_CONFIG \ + { \ + .tim_handle.Instance = TIM12, \ + .name = "pwm12", \ + .channel = 0 \ + } +#endif /* PWM12_CONFIG */ +#endif /* BSP_USING_PWM12 */ + +#ifdef BSP_USING_PWM13 +#ifndef PWM13_CONFIG +#define PWM13_CONFIG \ + { \ + .tim_handle.Instance = TIM13, \ + .name = "pwm13", \ + .channel = 0 \ + } +#endif /* PWM13_CONFIG */ +#endif /* BSP_USING_PWM13 */ + #ifdef __cplusplus } #endif diff --git a/bsp/stm32/libraries/STM32F1xx_HAL/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h b/bsp/stm32/libraries/STM32F1xx_HAL/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h index 822ca9b3b2..a9194d1933 100644 --- a/bsp/stm32/libraries/STM32F1xx_HAL/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h +++ b/bsp/stm32/libraries/STM32F1xx_HAL/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc_ex.h @@ -1242,7 +1242,7 @@ typedef struct #define __HAL_RCC_GPIOG_CLK_DISABLE() (RCC->APB2ENR &= ~(RCC_APB2ENR_IOPGEN)) #endif /* STM32F101xE || STM32F103xE || STM32F101xG || STM32F103xG*/ -#if defined(STM32F103xE) || defined(STM32F103xG) +#if defined(STM32F103xC) || defined(STM32F103xE) || defined(STM32F103xG) #define __HAL_RCC_TIM8_CLK_ENABLE() do { \ __IO uint32_t tmpreg; \ SET_BIT(RCC->APB2ENR, RCC_APB2ENR_TIM8EN);\ |
