aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/cryp/mod.rs
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/cryp/mod.rs
parent01c1cb2764300625f80b24e70052f250de27d814 (diff)
stm32/rcc: replace generated enable/disable code with runtime info
Diffstat (limited to 'embassy-stm32/src/cryp/mod.rs')
-rw-r--r--embassy-stm32/src/cryp/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-stm32/src/cryp/mod.rs b/embassy-stm32/src/cryp/mod.rs
index f19c94fda..01ea57d8e 100644
--- a/embassy-stm32/src/cryp/mod.rs
+++ b/embassy-stm32/src/cryp/mod.rs
@@ -9,7 +9,7 @@ use embassy_sync::waitqueue::AtomicWaker;
9 9
10use crate::dma::{NoDma, Transfer, TransferOptions}; 10use crate::dma::{NoDma, Transfer, TransferOptions};
11use crate::interrupt::typelevel::Interrupt; 11use crate::interrupt::typelevel::Interrupt;
12use crate::{interrupt, pac, peripherals, Peripheral}; 12use crate::{interrupt, pac, peripherals, rcc, Peripheral};
13 13
14const DES_BLOCK_SIZE: usize = 8; // 64 bits 14const DES_BLOCK_SIZE: usize = 8; // 64 bits
15const AES_BLOCK_SIZE: usize = 16; // 128 bits 15const AES_BLOCK_SIZE: usize = 16; // 128 bits
@@ -1029,7 +1029,7 @@ impl<'d, T: Instance, DmaIn, DmaOut> Cryp<'d, T, DmaIn, DmaOut> {
1029 outdma: impl Peripheral<P = DmaOut> + 'd, 1029 outdma: impl Peripheral<P = DmaOut> + 'd,
1030 _irq: impl interrupt::typelevel::Binding<T::Interrupt, InterruptHandler<T>> + 'd, 1030 _irq: impl interrupt::typelevel::Binding<T::Interrupt, InterruptHandler<T>> + 'd,
1031 ) -> Self { 1031 ) -> Self {
1032 T::enable_and_reset(); 1032 rcc::enable_and_reset::<T>();
1033 into_ref!(peri, indma, outdma); 1033 into_ref!(peri, indma, outdma);
1034 let instance = Self { 1034 let instance = Self {
1035 _peripheral: peri, 1035 _peripheral: peri,