stm32: fix exti to require SysCfg.constrain()

This commit is contained in:
xoviat
2021-03-22 13:04:28 -05:00
parent 712204edb8
commit b79e9c2927
2 changed files with 33 additions and 10 deletions

View File

@ -24,8 +24,9 @@ async fn run(dp: stm32::Peripherals, _cp: cortex_m::Peripherals) {
let gpioa = dp.GPIOA.split();
let button = gpioa.pa0.into_pull_up_input();
let mut syscfg = dp.SYSCFG.constrain();
let pin = ExtiPin::new(button, interrupt::take!(EXTI0));
let pin = ExtiPin::new(button, interrupt::take!(EXTI0), &mut syscfg);
pin_mut!(pin);
info!("Starting loop");