aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/hash
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/hash
parent01c1cb2764300625f80b24e70052f250de27d814 (diff)
stm32/rcc: replace generated enable/disable code with runtime info
Diffstat (limited to 'embassy-stm32/src/hash')
-rw-r--r--embassy-stm32/src/hash/mod.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/embassy-stm32/src/hash/mod.rs b/embassy-stm32/src/hash/mod.rs
index 787d5b1c9..4d4a8ec5b 100644
--- a/embassy-stm32/src/hash/mod.rs
+++ b/embassy-stm32/src/hash/mod.rs
@@ -17,8 +17,7 @@ use crate::dma::NoDma;
17use crate::dma::Transfer; 17use crate::dma::Transfer;
18use crate::interrupt::typelevel::Interrupt; 18use crate::interrupt::typelevel::Interrupt;
19use crate::peripherals::HASH; 19use crate::peripherals::HASH;
20use crate::rcc::SealedRccPeripheral; 20use crate::{interrupt, pac, peripherals, rcc, Peripheral};
21use crate::{interrupt, pac, peripherals, Peripheral};
22 21
23#[cfg(hash_v1)] 22#[cfg(hash_v1)]
24const NUM_CONTEXT_REGS: usize = 51; 23const NUM_CONTEXT_REGS: usize = 51;
@@ -130,7 +129,7 @@ impl<'d, T: Instance, D> Hash<'d, T, D> {
130 dma: impl Peripheral<P = D> + 'd, 129 dma: impl Peripheral<P = D> + 'd,
131 _irq: impl interrupt::typelevel::Binding<T::Interrupt, InterruptHandler<T>> + 'd, 130 _irq: impl interrupt::typelevel::Binding<T::Interrupt, InterruptHandler<T>> + 'd,
132 ) -> Self { 131 ) -> Self {
133 HASH::enable_and_reset(); 132 rcc::enable_and_reset::<HASH>();
134 into_ref!(peripheral, dma); 133 into_ref!(peripheral, dma);
135 let instance = Self { 134 let instance = Self {
136 _peripheral: peripheral, 135 _peripheral: peripheral,