aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Lilleengen <[email protected]>2021-06-14 10:49:47 +0200
committerUlf Lilleengen <[email protected]>2021-06-14 11:33:11 +0200
commita2da2a6db2e2bbef6d1031dd7a8461e5643ba711 (patch)
tree55fd80764899e6f75a43f7128700e6602f3c28dc
parent95532726b2fe38c3510b8ba3e56c3cb8f4e3a914 (diff)
Remove unused l0 code
-rw-r--r--embassy-stm32/src/rcc/l0/mod.rs48
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
244impl 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
268pub trait RccExt { 232pub trait RccExt {
@@ -424,18 +388,6 @@ impl RccExt for RCC {
424#[derive(Clone, Copy)] 388#[derive(Clone, Copy)]
425pub struct HSI48(()); 389pub 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)]
431pub 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)]
437pub struct LSE(());
438
439pub unsafe fn init(config: Config) { 391pub 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| {