From 1908141c867e72c19bddad13388e455bfb2f03bd Mon Sep 17 00:00:00 2001 From: xoviat Date: Wed, 17 Mar 2021 21:11:34 -0500 Subject: fix extipin --- embassy-stm32f4-examples/src/bin/exti.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'embassy-stm32f4-examples/src/bin') diff --git a/embassy-stm32f4-examples/src/bin/exti.rs b/embassy-stm32f4-examples/src/bin/exti.rs index 0c6561cda..2201189eb 100644 --- a/embassy-stm32f4-examples/src/bin/exti.rs +++ b/embassy-stm32f4-examples/src/bin/exti.rs @@ -13,22 +13,19 @@ use cortex_m_rt::entry; use embassy::executor::{task, Executor}; use embassy::traits::gpio::*; use embassy::util::Forever; -use embassy_stm32f4::exti; +use embassy_stm32f4::exti::ExtiPin; use embassy_stm32f4::interrupt; use futures::pin_mut; use stm32f4xx_hal::prelude::*; use stm32f4xx_hal::stm32; -static EXTI: Forever = Forever::new(); - #[task] async fn run(dp: stm32::Peripherals, _cp: cortex_m::Peripherals) { let gpioa = dp.GPIOA.split(); let button = gpioa.pa0.into_pull_up_input(); - let exti = EXTI.put(exti::ExtiManager::new(dp.EXTI, dp.SYSCFG.constrain())); - let pin = exti.new_pin(button, interrupt::take!(EXTI0)); + let pin = ExtiPin::new(button, interrupt::take!(EXTI0)); pin_mut!(pin); info!("Starting loop"); -- cgit