From db776c9623428b539cf49bcca13361e11bc1129b Mon Sep 17 00:00:00 2001 From: Ralf Date: Fri, 20 Oct 2023 19:31:55 +0200 Subject: [PATCH] stm32/simple_pwm: add set_output_compare_mode --- embassy-stm32/src/timer/simple_pwm.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/embassy-stm32/src/timer/simple_pwm.rs b/embassy-stm32/src/timer/simple_pwm.rs index 80f10424c..83a3e9291 100644 --- a/embassy-stm32/src/timer/simple_pwm.rs +++ b/embassy-stm32/src/timer/simple_pwm.rs @@ -151,6 +151,11 @@ impl<'d, T: CaptureCompare16bitInstance> SimplePwm<'d, T> { self.inner.set_output_polarity(channel, polarity); } + /// Set the output compare mode for a given channel. + pub fn set_output_compare_mode(&mut self, channel: Channel, mode: OutputCompareMode) { + self.inner.set_output_compare_mode(channel, mode); + } + /// Generate a sequence of PWM waveform /// /// Note: