aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob <[email protected]>2025-08-06 15:25:01 +0200
committerJakob <[email protected]>2025-08-10 08:57:15 +0200
commitc46cae734f3566a1e77d59b37d8bd714e542fd21 (patch)
tree92a774d6959cc0dbc92238621ff593417756110d
parent0941a76be60a3c95aed9a3e1835ec1de6f03ac12 (diff)
Change method arugments to be non-mutable
-rw-r--r--embassy-stm32/src/timer/complementary_pwm.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/embassy-stm32/src/timer/complementary_pwm.rs b/embassy-stm32/src/timer/complementary_pwm.rs
index bf76155dd..dcfe8f5dd 100644
--- a/embassy-stm32/src/timer/complementary_pwm.rs
+++ b/embassy-stm32/src/timer/complementary_pwm.rs
@@ -100,7 +100,7 @@ impl<'d, T: AdvancedInstance4Channel> ComplementaryPwm<'d, T> {
100 self.inner.set_ossi(val); 100 self.inner.set_ossi(val);
101 } 101 }
102 102
103 /// Get state of OSSR-bit in BDTR register 103 /// Get state of OSSI-bit in BDTR register
104 pub fn get_off_state_selection_idle(&self) -> Ossi { 104 pub fn get_off_state_selection_idle(&self) -> Ossi {
105 self.inner.get_ossi() 105 self.inner.get_ossi()
106 } 106 }
@@ -121,12 +121,12 @@ impl<'d, T: AdvancedInstance4Channel> ComplementaryPwm<'d, T> {
121 } 121 }
122 122
123 /// Set Master Output Enable 123 /// Set Master Output Enable
124 pub fn set_master_output_enable(&mut self, enable: bool) { 124 pub fn set_master_output_enable(&self, enable: bool) {
125 self.inner.set_moe(enable); 125 self.inner.set_moe(enable);
126 } 126 }
127 127
128 /// Get Master Output Enable 128 /// Get Master Output Enable
129 pub fn get_master_output_enable(&mut self) -> bool { 129 pub fn get_master_output_enable(&self) -> bool {
130 self.inner.get_moe() 130 self.inner.get_moe()
131 } 131 }
132 132
@@ -136,18 +136,18 @@ impl<'d, T: AdvancedInstance4Channel> ComplementaryPwm<'d, T> {
136 } 136 }
137 137
138 /// Set Repetition Counter 138 /// Set Repetition Counter
139 pub fn set_repetition_counter(&mut self, val: u16) { 139 pub fn set_repetition_counter(&self, val: u16) {
140 self.inner.set_repetition_counter(val); 140 self.inner.set_repetition_counter(val);
141 } 141 }
142 142
143 /// Enable the given channel. 143 /// Enable the given channel.
144 pub fn enable(&mut self, channel: Channel) { 144 pub fn enable(&self, channel: Channel) {
145 self.inner.enable_channel(channel, true); 145 self.inner.enable_channel(channel, true);
146 self.inner.enable_complementary_channel(channel, true); 146 self.inner.enable_complementary_channel(channel, true);
147 } 147 }
148 148
149 /// Disable the given channel. 149 /// Disable the given channel.
150 pub fn disable(&mut self, channel: Channel) { 150 pub fn disable(&self, channel: Channel) {
151 self.inner.enable_complementary_channel(channel, false); 151 self.inner.enable_complementary_channel(channel, false);
152 self.inner.enable_channel(channel, false); 152 self.inner.enable_channel(channel, false);
153 } 153 }