stm32: allow setting the PWM output polarity

This commit is contained in:
Aurelien Jacobs
2023-08-18 16:37:44 +02:00
parent 8754a1d378
commit 2ea17d2783
3 changed files with 58 additions and 0 deletions

View File

@ -104,4 +104,8 @@ impl<'d, T: CaptureCompare16bitInstance> SimplePwm<'d, T> {
assert!(duty <= self.get_max_duty());
self.inner.set_compare_value(channel, duty)
}
pub fn set_polarity(&mut self, channel: Channel, polarity: OutputPolarity) {
self.inner.set_output_polarity(channel, polarity);
}
}