Skip to content

Commit

Permalink
stm32/led: Support PWM output without TIM3.
Browse files Browse the repository at this point in the history
For example, the STM32WB55 doesn't have TIM3 but can still drive LEDs using
PWM on other timers.
  • Loading branch information
Tweako authored and pfalcon committed Oct 19, 2020
1 parent 3901fa7 commit 5324ea5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ports/stm32/led.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,11 @@ STATIC void led_pwm_init(int led) {
case 2:
__TIM2_CLK_ENABLE();
break;
#if defined(TIM3)
case 3:
__TIM3_CLK_ENABLE();
break;
#endif
default:
assert(0);
}
Expand Down

0 comments on commit 5324ea5

Please sign in to comment.