diff options
| -rw-r--r-- | embassy-nrf/src/gpiote.rs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs index ee638aeac..2e9a73564 100644 --- a/embassy-nrf/src/gpiote.rs +++ b/embassy-nrf/src/gpiote.rs | |||
| @@ -338,7 +338,10 @@ impl<'d, T: GpioPin> InputPin for PortInput<'d, T> { | |||
| 338 | } | 338 | } |
| 339 | 339 | ||
| 340 | impl<'d, T: GpioPin> WaitForHigh for PortInput<'d, T> { | 340 | impl<'d, T: GpioPin> WaitForHigh for PortInput<'d, T> { |
| 341 | type Future<'a> = PortInputFuture<'a>; | 341 | type Future<'a> |
| 342 | where | ||
| 343 | Self: 'a, | ||
| 344 | = PortInputFuture<'a>; | ||
| 342 | 345 | ||
| 343 | fn wait_for_high<'a>(&'a mut self) -> Self::Future<'a> { | 346 | fn wait_for_high<'a>(&'a mut self) -> Self::Future<'a> { |
| 344 | self.pin.pin.conf().modify(|_, w| w.sense().high()); | 347 | self.pin.pin.conf().modify(|_, w| w.sense().high()); |
| @@ -351,7 +354,10 @@ impl<'d, T: GpioPin> WaitForHigh for PortInput<'d, T> { | |||
| 351 | } | 354 | } |
| 352 | 355 | ||
| 353 | impl<'d, T: GpioPin> WaitForLow for PortInput<'d, T> { | 356 | impl<'d, T: GpioPin> WaitForLow for PortInput<'d, T> { |
| 354 | type Future<'a> = PortInputFuture<'a>; | 357 | type Future<'a> |
| 358 | where | ||
| 359 | Self: 'a, | ||
| 360 | = PortInputFuture<'a>; | ||
| 355 | 361 | ||
| 356 | fn wait_for_low<'a>(&'a mut self) -> Self::Future<'a> { | 362 | fn wait_for_low<'a>(&'a mut self) -> Self::Future<'a> { |
| 357 | self.pin.pin.conf().modify(|_, w| w.sense().low()); | 363 | self.pin.pin.conf().modify(|_, w| w.sense().low()); |
| @@ -364,7 +370,11 @@ impl<'d, T: GpioPin> WaitForLow for PortInput<'d, T> { | |||
| 364 | } | 370 | } |
| 365 | 371 | ||
| 366 | impl<'d, T: GpioPin> WaitForAnyEdge for PortInput<'d, T> { | 372 | impl<'d, T: GpioPin> WaitForAnyEdge for PortInput<'d, T> { |
| 367 | type Future<'a> = PortInputFuture<'a>; | 373 | type Future<'a> |
| 374 | where | ||
| 375 | Self: 'a, | ||
| 376 | = PortInputFuture<'a>; | ||
| 377 | |||
| 368 | fn wait_for_any_edge<'a>(&'a mut self) -> Self::Future<'a> { | 378 | fn wait_for_any_edge<'a>(&'a mut self) -> Self::Future<'a> { |
| 369 | if self.is_high().ok().unwrap() { | 379 | if self.is_high().ok().unwrap() { |
| 370 | self.pin.pin.conf().modify(|_, w| w.sense().low()); | 380 | self.pin.pin.conf().modify(|_, w| w.sense().low()); |
