aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32
diff options
context:
space:
mode:
authorGrant Miller <[email protected]>2024-09-06 15:08:58 -0500
committerGrant Miller <[email protected]>2024-09-06 15:08:58 -0500
commitb8beaba6df08c4455f55780a6e13191d95ad9eec (patch)
tree0f7ddde7691c4d2141e307fbbd44f8ddcb77c107 /embassy-stm32
parentd24c47a3ff4a82786b67f06d876bafb1bdabc163 (diff)
last oops I promise
Diffstat (limited to 'embassy-stm32')
-rw-r--r--embassy-stm32/src/timer/simple_pwm.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-stm32/src/timer/simple_pwm.rs b/embassy-stm32/src/timer/simple_pwm.rs
index 47188053c..7e2e9c202 100644
--- a/embassy-stm32/src/timer/simple_pwm.rs
+++ b/embassy-stm32/src/timer/simple_pwm.rs
@@ -129,7 +129,7 @@ impl<'d, T: GeneralInstance4Channel> SimplePwmChannel<'d, T> {
129 /// Get the duty for a given channel. 129 /// Get the duty for a given channel.
130 /// 130 ///
131 /// The value ranges from 0 for 0% duty, to [`max_duty_cycle`](Self::max_duty_cycle) for 100% duty, both included. 131 /// The value ranges from 0 for 0% duty, to [`max_duty_cycle`](Self::max_duty_cycle) for 100% duty, both included.
132 pub fn get_duty(&self) -> u16 { 132 pub fn current_duty_cycle(&self) -> u16 {
133 unwrap!(self.timer.get_compare_value(self.channel).try_into()) 133 unwrap!(self.timer.get_compare_value(self.channel).try_into())
134 } 134 }
135 135
@@ -300,7 +300,7 @@ impl<'d, T: GeneralInstance4Channel> SimplePwm<'d, T> {
300 #[allow(clippy::let_unit_value)] // eg. stm32f334 300 #[allow(clippy::let_unit_value)] // eg. stm32f334
301 let req = dma.request(); 301 let req = dma.request();
302 302
303 let original_duty_state = self.channel(channel).get_duty(); 303 let original_duty_state = self.channel(channel).current_duty_cycle();
304 let original_enable_state = self.channel(channel).is_enabled(); 304 let original_enable_state = self.channel(channel).is_enabled();
305 let original_update_dma_state = self.inner.get_update_dma_state(); 305 let original_update_dma_state = self.inner.get_update_dma_state();
306 306
@@ -370,7 +370,7 @@ macro_rules! impl_waveform_chx {
370 370
371 let cc_channel = Channel::$cc_ch; 371 let cc_channel = Channel::$cc_ch;
372 372
373 let original_duty_state = self.channel(cc_channel).get_duty(); 373 let original_duty_state = self.channel(cc_channel).current_duty_cycle();
374 let original_enable_state = self.channel(cc_channel).is_enabled(); 374 let original_enable_state = self.channel(cc_channel).is_enabled();
375 let original_cc_dma_on_update = self.inner.get_cc_dma_selection() == Ccds::ONUPDATE; 375 let original_cc_dma_on_update = self.inner.get_cc_dma_selection() == Ccds::ONUPDATE;
376 let original_cc_dma_enabled = self.inner.get_cc_dma_enable_state(cc_channel); 376 let original_cc_dma_enabled = self.inner.get_cc_dma_enable_state(cc_channel);