We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c8253a commit 15f7fabCopy full SHA for 15f7fab
src/syscfg.rs
@@ -1,4 +1,4 @@
1
-use crate::rcc::Rcc;
+use crate::rcc::{Enable, Rcc, Reset};
2
use crate::stm32::SYSCFG;
3
use core::ops::Deref;
4
@@ -10,8 +10,8 @@ pub trait SysCfgExt {
10
11
impl SysCfgExt for SYSCFG {
12
fn constrain(self, rcc: &mut Rcc) -> SysCfg {
13
- // Enable SYSCFG peripheral clock in APB2ENR register
14
- rcc.apb2enr().modify(|_, w| w.syscfgen().set_bit());
+ SYSCFG::enable(rcc);
+ SYSCFG::reset(rcc);
15
16
SysCfg(self)
17
}
0 commit comments