Skip to content

Commit

Permalink
Merge pull request #14461 from hugueslarrive/iss14361
Browse files Browse the repository at this point in the history
Fix bad assertion in cpu/stm32/periph/pwm.c
  • Loading branch information
benpicco committed Jul 8, 2020
2 parents cc6c5a8 + 11e847c commit 99553e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpu/stm32/periph/pwm.c
Expand Up @@ -45,7 +45,7 @@ uint32_t pwm_init(pwm_t pwm, pwm_mode_t mode, uint32_t freq, uint16_t res)
uint32_t timer_clk = periph_timer_clk(pwm_config[pwm].bus);

/* verify parameters */
assert((pwm < PWM_NUMOF) && ((freq * res) < timer_clk));
assert((pwm < PWM_NUMOF) && ((freq * res) <= timer_clk));

/* power on the used timer */
periph_clk_en(pwm_config[pwm].bus, pwm_config[pwm].rcc_mask);
Expand Down

0 comments on commit 99553e8

Please sign in to comment.