nrf/gpio: fix unused warning on chips without ports
This commit is contained in:
parent
e4145bf08b
commit
7ebd4e3aa9
1 changed files with 5 additions and 5 deletions
|
@ -10,7 +10,7 @@ use embedded_hal::digital::v2::{InputPin, StatefulOutputPin};
|
|||
use futures::future::poll_fn;
|
||||
|
||||
use crate::gpio::sealed::Pin as _;
|
||||
use crate::gpio::{AnyPin, Input, Output, Pin as GpioPin, Port};
|
||||
use crate::gpio::{AnyPin, Input, Output, Pin as GpioPin};
|
||||
use crate::pac;
|
||||
use crate::ppi::{Event, Task};
|
||||
use crate::{interrupt, peripherals};
|
||||
|
@ -140,8 +140,8 @@ impl<'d, C: Channel, T: GpioPin> InputChannel<'d, C, T> {
|
|||
};
|
||||
#[cfg(any(feature = "nrf52833", feature = "nrf52840"))]
|
||||
w.port().bit(match pin.pin.port() {
|
||||
Port::Port0 => false,
|
||||
Port::Port1 => true,
|
||||
crate::gpio::Port::Port0 => false,
|
||||
crate::gpio::Port::Port1 => true,
|
||||
});
|
||||
unsafe { w.psel().bits(pin.pin.pin()) }
|
||||
});
|
||||
|
@ -223,8 +223,8 @@ impl<'d, C: Channel, T: GpioPin> OutputChannel<'d, C, T> {
|
|||
};
|
||||
#[cfg(any(feature = "nrf52833", feature = "nrf52840"))]
|
||||
w.port().bit(match pin.pin.port() {
|
||||
Port::Port0 => false,
|
||||
Port::Port1 => true,
|
||||
crate::gpio::Port::Port0 => false,
|
||||
crate::gpio::Port::Port1 => true,
|
||||
});
|
||||
unsafe { w.psel().bits(pin.pin.pin()) }
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue