[bsp][stm32] Add support with pwm6 to pwm13 (#5620)
This commit is contained in:
parent
c1ab995371
commit
542195559b
@ -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
|
||||
|
@ -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);\
|
||||
|
Loading…
x
Reference in New Issue
Block a user