diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-01-20 01:33:49 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-01-20 01:33:49 +0000 |
| commit | 67159d80bb861633a952f40c20c60db42f5ebb18 (patch) | |
| tree | 87e01af16583b11733457126e2b354f84e1a9f0d | |
| parent | 326bff322e95903065b35e075ffa27986a6acfc0 (diff) | |
| parent | db776c9623428b539cf49bcca13361e11bc1129b (diff) | |
Merge pull request #2429 from jr-oss/stm32_simple_pwm_add_set_output_compare_mode
stm32/simple_pwm: add set_output_compare_mode
| -rw-r--r-- | embassy-stm32/src/timer/simple_pwm.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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> { | |||
| 151 | self.inner.set_output_polarity(channel, polarity); | 151 | self.inner.set_output_polarity(channel, polarity); |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | /// Set the output compare mode for a given channel. | ||
| 155 | pub fn set_output_compare_mode(&mut self, channel: Channel, mode: OutputCompareMode) { | ||
| 156 | self.inner.set_output_compare_mode(channel, mode); | ||
| 157 | } | ||
| 158 | |||
| 154 | /// Generate a sequence of PWM waveform | 159 | /// Generate a sequence of PWM waveform |
| 155 | /// | 160 | /// |
| 156 | /// Note: | 161 | /// Note: |
