stm32/pwm: small cleanups
This commit is contained in:
parent
22fad1e7bc
commit
d7d1258411
2 changed files with 3 additions and 8 deletions
|
@ -41,6 +41,7 @@ pub mod i2c;
|
|||
|
||||
#[cfg(crc)]
|
||||
pub mod crc;
|
||||
pub mod pwm;
|
||||
#[cfg(pwr)]
|
||||
pub mod pwr;
|
||||
#[cfg(rng)]
|
||||
|
@ -51,8 +52,6 @@ pub mod sdmmc;
|
|||
pub mod spi;
|
||||
#[cfg(usart)]
|
||||
pub mod usart;
|
||||
//#[cfg(pwm)]
|
||||
pub mod pwm;
|
||||
|
||||
#[cfg(feature = "subghz")]
|
||||
pub mod subghz;
|
||||
|
|
|
@ -87,15 +87,11 @@ impl<'d, T: Instance> Pwm<'d, T> {
|
|||
}
|
||||
|
||||
pub fn enable(&mut self, channel: Channel) {
|
||||
unsafe {
|
||||
self.set_enable(channel, true);
|
||||
}
|
||||
unsafe { self.set_enable(channel, true) }
|
||||
}
|
||||
|
||||
pub fn disable(&mut self, channel: Channel) {
|
||||
unsafe {
|
||||
self.set_enable(channel, false);
|
||||
}
|
||||
unsafe { self.set_enable(channel, false) }
|
||||
}
|
||||
|
||||
pub fn set_freq<F: Into<Hertz>>(&mut self, freq: F) {
|
||||
|
|
Loading…
Reference in a new issue