aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/timer/complementary_pwm.rs
diff options
context:
space:
mode:
authorJakob <[email protected]>2025-06-11 09:08:55 +0200
committerJakob <[email protected]>2025-06-11 09:08:55 +0200
commit56d76aeb7bccfebf07f0ad5ad9da8d9d36b0865d (patch)
tree55e387825ec6240c323f74e451cd5e25583bef94 /embassy-stm32/src/timer/complementary_pwm.rs
parent56572ef0adffd6258adc10fb424e37a8b4ddc19c (diff)
Remove incorrect addition of 1 to get_max_duty
Diffstat (limited to 'embassy-stm32/src/timer/complementary_pwm.rs')
-rw-r--r--embassy-stm32/src/timer/complementary_pwm.rs2
1 files changed, 1 insertions, 1 deletions
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> {
121 /// 121 ///
122 /// This value depends on the configured frequency and the timer's clock rate from RCC. 122 /// This value depends on the configured frequency and the timer's clock rate from RCC.
123 pub fn get_max_duty(&self) -> u16 { 123 pub fn get_max_duty(&self) -> u16 {
124 self.inner.get_max_compare_value() as u16 + 1 124 self.inner.get_max_compare_value() as u16
125 } 125 }
126 126
127 /// Set the duty for a given channel. 127 /// Set the duty for a given channel.