diff options
| -rw-r--r-- | embassy-stm32/src/lib.rs | 3 | ||||
| -rw-r--r-- | embassy-stm32/src/pwm/mod.rs | 8 |
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)] |
| 43 | pub mod crc; | 43 | pub mod crc; |
| 44 | pub mod pwm; | ||
| 44 | #[cfg(pwr)] | 45 | #[cfg(pwr)] |
| 45 | pub mod pwr; | 46 | pub mod pwr; |
| 46 | #[cfg(rng)] | 47 | #[cfg(rng)] |
| @@ -51,8 +52,6 @@ pub mod sdmmc; | |||
| 51 | pub mod spi; | 52 | pub mod spi; |
| 52 | #[cfg(usart)] | 53 | #[cfg(usart)] |
| 53 | pub mod usart; | 54 | pub mod usart; |
| 54 | //#[cfg(pwm)] | ||
| 55 | pub mod pwm; | ||
| 56 | 55 | ||
| 57 | #[cfg(feature = "subghz")] | 56 | #[cfg(feature = "subghz")] |
| 58 | pub mod subghz; | 57 | pub 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) { |
