From 7ebd4e3aa946a4b5aeea086959a38c94487470a3 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 5 Jul 2021 02:43:34 +0200 Subject: [PATCH] nrf/gpio: fix unused warning on chips without ports --- embassy-nrf/src/gpiote.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs index 2ef26e36..54d3dd01 100644 --- a/embassy-nrf/src/gpiote.rs +++ b/embassy-nrf/src/gpiote.rs @@ -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()) } });