diff --git a/targets/TARGET_STM/TARGET_STM32H7/pwmout_device.c b/targets/TARGET_STM/TARGET_STM32H7/pwmout_device.c index 058d4c88d70..2bc49831687 100644 --- a/targets/TARGET_STM/TARGET_STM32H7/pwmout_device.c +++ b/targets/TARGET_STM/TARGET_STM32H7/pwmout_device.c @@ -34,42 +34,18 @@ #if DEVICE_PWMOUT const pwm_apb_map_t pwm_apb_map_table[] = { -#if defined(TIM2_BASE) + {PWM_1, PWMOUT_ON_APB2}, {PWM_2, PWMOUT_ON_APB1}, -#endif -#if defined(TIM3_BASE) {PWM_3, PWMOUT_ON_APB1}, -#endif -#if defined(TIM4_BASE) {PWM_4, PWMOUT_ON_APB1}, -#endif -#if defined(TIM5_BASE) {PWM_5, PWMOUT_ON_APB1}, -#endif -#if defined(TIM12_BASE) + {PWM_8, PWMOUT_ON_APB2}, {PWM_12, PWMOUT_ON_APB1}, -#endif -#if defined(TIM13_BASE) {PWM_13, PWMOUT_ON_APB1}, -#endif -#if defined(TIM14_BASE) {PWM_14, PWMOUT_ON_APB1}, -#endif -#if defined(TIM1_BASE) - {PWM_1, PWMOUT_ON_APB2}, -#endif -#if defined(TIM8_BASE) - {PWM_8, PWMOUT_ON_APB2}, -#endif -#if defined(TIM9_BASE) - {PWM_9, PWMOUT_ON_APB2}, -#endif -#if defined(TIM10_BASE) - {PWM_10, PWMOUT_ON_APB2}, -#endif -#if defined(TIM11_BASE) - {PWM_11, PWMOUT_ON_APB2}, -#endif + {PWM_15, PWMOUT_ON_APB2}, + {PWM_16, PWMOUT_ON_APB2}, + {PWM_17, PWMOUT_ON_APB2}, {(PWMName) 0, PWMOUT_UNKNOWN} };