nrf/gpio: allow borrowed pins.

This commit is contained in:
Richard Dodd
2021-03-24 18:31:11 +01:00
committed by Dario Nieuwenhuis
parent 806ee120ba
commit a08d781442
3 changed files with 42 additions and 23 deletions

View File

@ -19,7 +19,7 @@ use embassy_nrf::interrupt;
use embassy_nrf::Peripherals;
use example_common::*;
async fn button(n: usize, mut pin: PortInput<AnyPin>) {
async fn button(n: usize, mut pin: PortInput<'static, AnyPin>) {
loop {
Pin::new(&mut pin).wait_for_low().await;
info!("Button {:?} pressed!", n);