From 56d76aeb7bccfebf07f0ad5ad9da8d9d36b0865d Mon Sep 17 00:00:00 2001 From: Jakob Date: Wed, 11 Jun 2025 09:08:55 +0200 Subject: Remove incorrect addition of 1 to get_max_duty --- embassy-stm32/src/timer/complementary_pwm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embassy-stm32/src/timer/complementary_pwm.rs b/embassy-stm32/src/timer/complementary_pwm.rs index 8eec6c0c7..d51b5a8fc 100644 --- a/embassy-stm32/src/timer/complementary_pwm.rs +++ b/embassy-stm32/src/timer/complementary_pwm.rs @@ -121,7 +121,7 @@ impl<'d, T: AdvancedInstance4Channel> ComplementaryPwm<'d, T> { /// /// This value depends on the configured frequency and the timer's clock rate from RCC. pub fn get_max_duty(&self) -> u16 { - self.inner.get_max_compare_value() as u16 + 1 + self.inner.get_max_compare_value() as u16 } /// Set the duty for a given channel. -- cgit