nrf/gpio: fix unused warning on chips without ports
This commit is contained in:
		@@ -10,7 +10,7 @@ use embedded_hal::digital::v2::{InputPin, StatefulOutputPin};
 | 
				
			|||||||
use futures::future::poll_fn;
 | 
					use futures::future::poll_fn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use crate::gpio::sealed::Pin as _;
 | 
					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::pac;
 | 
				
			||||||
use crate::ppi::{Event, Task};
 | 
					use crate::ppi::{Event, Task};
 | 
				
			||||||
use crate::{interrupt, peripherals};
 | 
					use crate::{interrupt, peripherals};
 | 
				
			||||||
@@ -140,8 +140,8 @@ impl<'d, C: Channel, T: GpioPin> InputChannel<'d, C, T> {
 | 
				
			|||||||
            };
 | 
					            };
 | 
				
			||||||
            #[cfg(any(feature = "nrf52833", feature = "nrf52840"))]
 | 
					            #[cfg(any(feature = "nrf52833", feature = "nrf52840"))]
 | 
				
			||||||
            w.port().bit(match pin.pin.port() {
 | 
					            w.port().bit(match pin.pin.port() {
 | 
				
			||||||
                Port::Port0 => false,
 | 
					                crate::gpio::Port::Port0 => false,
 | 
				
			||||||
                Port::Port1 => true,
 | 
					                crate::gpio::Port::Port1 => true,
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
            unsafe { w.psel().bits(pin.pin.pin()) }
 | 
					            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"))]
 | 
					            #[cfg(any(feature = "nrf52833", feature = "nrf52840"))]
 | 
				
			||||||
            w.port().bit(match pin.pin.port() {
 | 
					            w.port().bit(match pin.pin.port() {
 | 
				
			||||||
                Port::Port0 => false,
 | 
					                crate::gpio::Port::Port0 => false,
 | 
				
			||||||
                Port::Port1 => true,
 | 
					                crate::gpio::Port::Port1 => true,
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
            unsafe { w.psel().bits(pin.pin.pin()) }
 | 
					            unsafe { w.psel().bits(pin.pin.pin()) }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user