aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/ospi
diff options
context:
space:
mode:
authorJan Špaček <[email protected]>2024-05-24 22:04:04 +0200
committerJan Špaček <[email protected]>2024-05-25 18:44:55 +0200
commit081afca3f065dfd91e157d7c9a9477e2d914c99d (patch)
tree574b29636674d3e5a9e3763d00f709635856403e /embassy-stm32/src/ospi
parent01c1cb2764300625f80b24e70052f250de27d814 (diff)
stm32/rcc: replace generated enable/disable code with runtime info
Diffstat (limited to 'embassy-stm32/src/ospi')
-rw-r--r--embassy-stm32/src/ospi/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-stm32/src/ospi/mod.rs b/embassy-stm32/src/ospi/mod.rs
index 536da4ca0..882781cce 100644
--- a/embassy-stm32/src/ospi/mod.rs
+++ b/embassy-stm32/src/ospi/mod.rs
@@ -16,7 +16,7 @@ use crate::dma::{word, ChannelAndRequest};
16use crate::gpio::{AFType, AnyPin, Pull, SealedPin as _, Speed}; 16use crate::gpio::{AFType, AnyPin, Pull, SealedPin as _, Speed};
17use crate::mode::{Async, Blocking, Mode as PeriMode}; 17use crate::mode::{Async, Blocking, Mode as PeriMode};
18use crate::pac::octospi::{vals, Octospi as Regs}; 18use crate::pac::octospi::{vals, Octospi as Regs};
19use crate::rcc::RccPeripheral; 19use crate::rcc::{self, RccPeripheral};
20use crate::{peripherals, Peripheral}; 20use crate::{peripherals, Peripheral};
21 21
22/// OPSI driver config. 22/// OPSI driver config.
@@ -198,7 +198,7 @@ impl<'d, T: Instance, M: PeriMode> Ospi<'d, T, M> {
198 into_ref!(peri); 198 into_ref!(peri);
199 199
200 // System configuration 200 // System configuration
201 T::enable_and_reset(); 201 rcc::enable_and_reset::<T>();
202 while T::REGS.sr().read().busy() {} 202 while T::REGS.sr().read().busy() {}
203 203
204 // Device configuration 204 // Device configuration
@@ -1013,7 +1013,7 @@ impl<'d, T: Instance, M: PeriMode> Drop for Ospi<'d, T, M> {
1013 self.nss.as_ref().map(|x| x.set_as_disconnected()); 1013 self.nss.as_ref().map(|x| x.set_as_disconnected());
1014 self.dqs.as_ref().map(|x| x.set_as_disconnected()); 1014 self.dqs.as_ref().map(|x| x.set_as_disconnected());
1015 1015
1016 T::disable(); 1016 rcc::disable::<T>();
1017 } 1017 }
1018} 1018}
1019 1019