aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/src/lib.rs3
-rw-r--r--embassy-stm32/src/pwm/mod.rs8
2 files changed, 3 insertions, 8 deletions
diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs
index a7b8b3224..649b25f10 100644
--- a/embassy-stm32/src/lib.rs
+++ b/embassy-stm32/src/lib.rs
@@ -41,6 +41,7 @@ pub mod i2c;
41 41
42#[cfg(crc)] 42#[cfg(crc)]
43pub mod crc; 43pub mod crc;
44pub mod pwm;
44#[cfg(pwr)] 45#[cfg(pwr)]
45pub mod pwr; 46pub mod pwr;
46#[cfg(rng)] 47#[cfg(rng)]
@@ -51,8 +52,6 @@ pub mod sdmmc;
51pub mod spi; 52pub mod spi;
52#[cfg(usart)] 53#[cfg(usart)]
53pub mod usart; 54pub mod usart;
54//#[cfg(pwm)]
55pub mod pwm;
56 55
57#[cfg(feature = "subghz")] 56#[cfg(feature = "subghz")]
58pub mod subghz; 57pub mod subghz;
diff --git a/embassy-stm32/src/pwm/mod.rs b/embassy-stm32/src/pwm/mod.rs
index 398c5ce75..7176603e2 100644
--- a/embassy-stm32/src/pwm/mod.rs
+++ b/embassy-stm32/src/pwm/mod.rs
@@ -87,15 +87,11 @@ impl<'d, T: Instance> Pwm<'d, T> {
87 } 87 }
88 88
89 pub fn enable(&mut self, channel: Channel) { 89 pub fn enable(&mut self, channel: Channel) {
90 unsafe { 90 unsafe { self.set_enable(channel, true) }
91 self.set_enable(channel, true);
92 }
93 } 91 }
94 92
95 pub fn disable(&mut self, channel: Channel) { 93 pub fn disable(&mut self, channel: Channel) {
96 unsafe { 94 unsafe { self.set_enable(channel, false) }
97 self.set_enable(channel, false);
98 }
99 } 95 }
100 96
101 pub fn set_freq<F: Into<Hertz>>(&mut self, freq: F) { 97 pub fn set_freq<F: Into<Hertz>>(&mut self, freq: F) {