aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/crc
diff options
context:
space:
mode:
authorpbert <[email protected]>2023-10-11 21:38:41 +0200
committerpbert <[email protected]>2023-10-12 11:04:44 +0200
commitecdd7c0e2f9dcc07e53e136557140d3ccc6a5ee1 (patch)
tree6db9bf875d3e83d94f6bf8e8a2e7ff03a83c5bb4 /embassy-stm32/src/crc
parentd7d79f3068a4a2d883b078b8900ad194f7c98203 (diff)
enable clock first
Diffstat (limited to 'embassy-stm32/src/crc')
-rw-r--r--embassy-stm32/src/crc/v1.rs2
-rw-r--r--embassy-stm32/src/crc/v2v3.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/embassy-stm32/src/crc/v1.rs b/embassy-stm32/src/crc/v1.rs
index 282e1ad88..c0f580830 100644
--- a/embassy-stm32/src/crc/v1.rs
+++ b/embassy-stm32/src/crc/v1.rs
@@ -16,7 +16,7 @@ impl<'d> Crc<'d> {
16 16
17 // Note: enable and reset come from RccPeripheral. 17 // Note: enable and reset come from RccPeripheral.
18 // enable CRC clock in RCC. 18 // enable CRC clock in RCC.
19 CRC::reset_and_enable(); 19 CRC::enable_and_reset();
20 // Peripheral the peripheral 20 // Peripheral the peripheral
21 let mut instance = Self { _peri: peripheral }; 21 let mut instance = Self { _peri: peripheral };
22 instance.reset(); 22 instance.reset();
diff --git a/embassy-stm32/src/crc/v2v3.rs b/embassy-stm32/src/crc/v2v3.rs
index 2ab25e6fb..b36f6018c 100644
--- a/embassy-stm32/src/crc/v2v3.rs
+++ b/embassy-stm32/src/crc/v2v3.rs
@@ -70,7 +70,7 @@ impl<'d> Crc<'d> {
70 pub fn new(peripheral: impl Peripheral<P = CRC> + 'd, config: Config) -> Self { 70 pub fn new(peripheral: impl Peripheral<P = CRC> + 'd, config: Config) -> Self {
71 // Note: enable and reset come from RccPeripheral. 71 // Note: enable and reset come from RccPeripheral.
72 // reset to default values and enable CRC clock in RCC. 72 // reset to default values and enable CRC clock in RCC.
73 CRC::reset_and_enable(); 73 CRC::enable_and_reset();
74 into_ref!(peripheral); 74 into_ref!(peripheral);
75 let mut instance = Self { 75 let mut instance = Self {
76 _peripheral: peripheral, 76 _peripheral: peripheral,