diff options
| -rw-r--r-- | embassy-stm32/src/rcc/l0/mod.rs | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/embassy-stm32/src/rcc/l0/mod.rs b/embassy-stm32/src/rcc/l0/mod.rs index 8f056d51c..ce9c58657 100644 --- a/embassy-stm32/src/rcc/l0/mod.rs +++ b/embassy-stm32/src/rcc/l0/mod.rs | |||
| @@ -168,18 +168,6 @@ impl<'d> Rcc<'d> { | |||
| 168 | unsafe { get_freqs() } | 168 | unsafe { get_freqs() } |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | /* | ||
| 172 | pub fn enable_lse(&mut self, _: &PWR) -> LSE { | ||
| 173 | self.rb.csr.modify(|_, w| { | ||
| 174 | // Enable LSE clock | ||
| 175 | w.lseon().set_bit() | ||
| 176 | }); | ||
| 177 | while self.rb.csr.read().lserdy().bit_is_clear() {} | ||
| 178 | LSE(()) | ||
| 179 | } | ||
| 180 | } | ||
| 181 | */ | ||
| 182 | |||
| 183 | pub fn enable_debug_wfe(&mut self, _dbg: &mut peripherals::DBGMCU, enable_dma: bool) { | 171 | pub fn enable_debug_wfe(&mut self, _dbg: &mut peripherals::DBGMCU, enable_dma: bool) { |
| 184 | // NOTE(unsafe) We have exclusive access to the RCC and DBGMCU | 172 | // NOTE(unsafe) We have exclusive access to the RCC and DBGMCU |
| 185 | unsafe { | 173 | unsafe { |
| @@ -239,30 +227,6 @@ impl<'d> Rcc<'d> { | |||
| 239 | HSI48(()) | 227 | HSI48(()) |
| 240 | } | 228 | } |
| 241 | } | 229 | } |
| 242 | /* | ||
| 243 | |||
| 244 | impl Rcc { | ||
| 245 | /// Configure MCO (Microcontroller Clock Output). | ||
| 246 | pub fn configure_mco<P>( | ||
| 247 | &mut self, | ||
| 248 | source: MCOSEL_A, | ||
| 249 | prescaler: MCOPRE_A, | ||
| 250 | output_pin: P, | ||
| 251 | ) -> MCOEnabled | ||
| 252 | where | ||
| 253 | P: mco::Pin, | ||
| 254 | { | ||
| 255 | output_pin.into_mco(); | ||
| 256 | |||
| 257 | self.rb.cfgr.modify(|_, w| { | ||
| 258 | w.mcosel().variant(source); | ||
| 259 | w.mcopre().variant(prescaler) | ||
| 260 | }); | ||
| 261 | |||
| 262 | MCOEnabled(()) | ||
| 263 | } | ||
| 264 | } | ||
| 265 | */ | ||
| 266 | 230 | ||
| 267 | /// Extension trait that freezes the `RCC` peripheral with provided clocks configuration | 231 | /// Extension trait that freezes the `RCC` peripheral with provided clocks configuration |
| 268 | pub trait RccExt { | 232 | pub trait RccExt { |
| @@ -424,18 +388,6 @@ impl RccExt for RCC { | |||
| 424 | #[derive(Clone, Copy)] | 388 | #[derive(Clone, Copy)] |
| 425 | pub struct HSI48(()); | 389 | pub struct HSI48(()); |
| 426 | 390 | ||
| 427 | /// Token that exists only if MCO (Microcontroller Clock Out) has been enabled. | ||
| 428 | /// | ||
| 429 | /// You can get an instance of this struct by calling [`Rcc::configure_mco`]. | ||
| 430 | #[derive(Clone, Copy)] | ||
| 431 | pub struct MCOEnabled(()); | ||
| 432 | |||
| 433 | /// Token that exists only, if the LSE clock has been enabled | ||
| 434 | /// | ||
| 435 | /// You can get an instance of this struct by calling [`Rcc::enable_lse`]. | ||
| 436 | #[derive(Clone, Copy)] | ||
| 437 | pub struct LSE(()); | ||
| 438 | |||
| 439 | pub unsafe fn init(config: Config) { | 391 | pub unsafe fn init(config: Config) { |
| 440 | let rcc = pac::RCC; | 392 | let rcc = pac::RCC; |
| 441 | rcc.iopenr().write(|w| { | 393 | rcc.iopenr().write(|w| { |
