mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-10-03 23:24:36 +00:00
Added timer set polarity functions for main and complementary outputs individually
This commit is contained in:
parent
2ef9dfb512
commit
089b6722c6
@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- fix: Fixed STM32H5 builds requiring time feature
|
- fix: Fixed STM32H5 builds requiring time feature
|
||||||
- feat: Derive Clone, Copy for QSPI Config
|
- feat: Derive Clone, Copy for QSPI Config
|
||||||
- fix: stm32/i2c in master mode (blocking): subsequent transmissions failed after a NACK was received
|
- fix: stm32/i2c in master mode (blocking): subsequent transmissions failed after a NACK was received
|
||||||
|
- feat: stm32/timer: add set_polarity functions for main and complementary outputs in complementary_pwm
|
||||||
|
|
||||||
## 0.4.0 - 2025-08-26
|
## 0.4.0 - 2025-08-26
|
||||||
|
|
||||||
|
@ -185,6 +185,16 @@ impl<'d, T: AdvancedInstance4Channel> ComplementaryPwm<'d, T> {
|
|||||||
self.inner.set_complementary_output_polarity(channel, polarity);
|
self.inner.set_complementary_output_polarity(channel, polarity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Set the main output polarity for a given channel.
|
||||||
|
pub fn set_main_polarity(&mut self, channel: Channel, polarity: OutputPolarity) {
|
||||||
|
self.inner.set_output_polarity(channel, polarity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Set the complementary output polarity for a given channel.
|
||||||
|
pub fn set_complementary_polarity(&mut self, channel: Channel, polarity: OutputPolarity) {
|
||||||
|
self.inner.set_complementary_output_polarity(channel, polarity);
|
||||||
|
}
|
||||||
|
|
||||||
/// Set the dead time as a proportion of max_duty
|
/// Set the dead time as a proportion of max_duty
|
||||||
pub fn set_dead_time(&mut self, value: u16) {
|
pub fn set_dead_time(&mut self, value: u16) {
|
||||||
let (ckd, value) = compute_dead_time_value(value);
|
let (ckd, value) = compute_dead_time_value(value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user