aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/timer/complementary_pwm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-stm32/src/timer/complementary_pwm.rs')
-rw-r--r--embassy-stm32/src/timer/complementary_pwm.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/embassy-stm32/src/timer/complementary_pwm.rs b/embassy-stm32/src/timer/complementary_pwm.rs
index b291fc155..7d6c2273e 100644
--- a/embassy-stm32/src/timer/complementary_pwm.rs
+++ b/embassy-stm32/src/timer/complementary_pwm.rs
@@ -185,6 +185,16 @@ impl<'d, T: AdvancedInstance4Channel> ComplementaryPwm<'d, T> {
185 self.inner.set_complementary_output_polarity(channel, polarity); 185 self.inner.set_complementary_output_polarity(channel, polarity);
186 } 186 }
187 187
188 /// Set the main output polarity for a given channel.
189 pub fn set_main_polarity(&mut self, channel: Channel, polarity: OutputPolarity) {
190 self.inner.set_output_polarity(channel, polarity);
191 }
192
193 /// Set the complementary output polarity for a given channel.
194 pub fn set_complementary_polarity(&mut self, channel: Channel, polarity: OutputPolarity) {
195 self.inner.set_complementary_output_polarity(channel, polarity);
196 }
197
188 /// Set the dead time as a proportion of max_duty 198 /// Set the dead time as a proportion of max_duty
189 pub fn set_dead_time(&mut self, value: u16) { 199 pub fn set_dead_time(&mut self, value: u16) {
190 let (ckd, value) = compute_dead_time_value(value); 200 let (ckd, value) = compute_dead_time_value(value);