diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-04-14 16:25:54 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-04-14 17:04:40 +0200 |
| commit | 8b1ffb2cb7bd2e0c0f50eefb2391c15ae3050e73 (patch) | |
| tree | 7c76e7e3e6f2729b4cef85b99abaa6a4040db231 /embassy-nrf/src | |
| parent | 59ccc45f280e05a9d2a0ece2bb1e01debadb2f7e (diff) | |
Remove Pin from GPIO traits
Diffstat (limited to 'embassy-nrf/src')
| -rw-r--r-- | embassy-nrf/src/gpiote.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs index 412eef1b5..ead3c47d3 100644 --- a/embassy-nrf/src/gpiote.rs +++ b/embassy-nrf/src/gpiote.rs | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | use core::convert::Infallible; | 1 | use core::convert::Infallible; |
| 2 | use core::future::Future; | 2 | use core::future::Future; |
| 3 | use core::marker::PhantomData; | 3 | use core::marker::PhantomData; |
| 4 | use core::pin::Pin; | ||
| 5 | use core::task::{Context, Poll}; | 4 | use core::task::{Context, Poll}; |
| 6 | use embassy::interrupt::InterruptExt; | 5 | use embassy::interrupt::InterruptExt; |
| 7 | use embassy::traits::gpio::{WaitForHigh, WaitForLow}; | 6 | use embassy::traits::gpio::{WaitForHigh, WaitForLow}; |
| @@ -318,7 +317,7 @@ impl<'d, T: GpioPin> InputPin for PortInput<'d, T> { | |||
| 318 | impl<'d, T: GpioPin> WaitForHigh for PortInput<'d, T> { | 317 | impl<'d, T: GpioPin> WaitForHigh for PortInput<'d, T> { |
| 319 | type Future<'a> = PortInputFuture<'a>; | 318 | type Future<'a> = PortInputFuture<'a>; |
| 320 | 319 | ||
| 321 | fn wait_for_high<'a>(self: Pin<&'a mut Self>) -> Self::Future<'a> { | 320 | fn wait_for_high<'a>(&'a mut self) -> Self::Future<'a> { |
| 322 | self.pin.pin.conf().modify(|_, w| w.sense().high()); | 321 | self.pin.pin.conf().modify(|_, w| w.sense().high()); |
| 323 | 322 | ||
| 324 | PortInputFuture { | 323 | PortInputFuture { |
| @@ -331,7 +330,7 @@ impl<'d, T: GpioPin> WaitForHigh for PortInput<'d, T> { | |||
| 331 | impl<'d, T: GpioPin> WaitForLow for PortInput<'d, T> { | 330 | impl<'d, T: GpioPin> WaitForLow for PortInput<'d, T> { |
| 332 | type Future<'a> = PortInputFuture<'a>; | 331 | type Future<'a> = PortInputFuture<'a>; |
| 333 | 332 | ||
| 334 | fn wait_for_low<'a>(self: Pin<&'a mut Self>) -> Self::Future<'a> { | 333 | fn wait_for_low<'a>(&'a mut self) -> Self::Future<'a> { |
| 335 | self.pin.pin.conf().modify(|_, w| w.sense().low()); | 334 | self.pin.pin.conf().modify(|_, w| w.sense().low()); |
| 336 | 335 | ||
| 337 | PortInputFuture { | 336 | PortInputFuture { |
