Remove Pin from GPIO traits

This commit is contained in:
Dario Nieuwenhuis
2021-04-14 16:25:54 +02:00
parent 59ccc45f28
commit 8b1ffb2cb7
5 changed files with 27 additions and 38 deletions

View File

@ -21,9 +21,9 @@ use example_common::*;
#[embassy::task(pool_size = 4)]
async fn button_task(n: usize, mut pin: PortInput<'static, AnyPin>) {
loop {
Pin::new(&mut pin).wait_for_low().await;
pin.wait_for_low().await;
info!("Button {:?} pressed!", n);
Pin::new(&mut pin).wait_for_high().await;
pin.wait_for_high().await;
info!("Button {:?} released!", n);
}
}