Skip to content

Commit

Permalink
Modify apb2 instead of destroing it for syscfg
Browse files Browse the repository at this point in the history
  • Loading branch information
bofh committed Jun 8, 2019
1 parent 1485f0f commit 5f828bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/syscfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ pub trait SyscfgExt {

impl SyscfgExt for SYSCFG {
fn constrain(self, apb2: &mut rcc::APB2) -> Syscfg {
apb2.enr().write(|w| w.syscfgen().enabled());
apb2.enr().modify(|_, w| w.syscfgen().enabled());

Syscfg { _0: () }
}
}
Expand Down

0 comments on commit 5f828bc

Please sign in to comment.