diff options
| author | Ulf Lilleengen <[email protected]> | 2021-12-16 11:37:53 +0100 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2021-12-16 11:37:53 +0100 |
| commit | 2bbd1ddb8a0e36e91a2b328024f313b780b1b851 (patch) | |
| tree | 4e41c56f0032f811faac07bc98f93b522ea2e1f3 /embassy-nrf/src/gpio.rs | |
| parent | 985c11fad5d666485b809b846d294a1a2492b370 (diff) | |
Remove unneeded rustfmt::skip
Diffstat (limited to 'embassy-nrf/src/gpio.rs')
| -rw-r--r-- | embassy-nrf/src/gpio.rs | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/embassy-nrf/src/gpio.rs b/embassy-nrf/src/gpio.rs index 190d8470f..cb06f0971 100644 --- a/embassy-nrf/src/gpio.rs +++ b/embassy-nrf/src/gpio.rs | |||
| @@ -75,8 +75,10 @@ impl<'d, T: Pin> InputPin for Input<'d, T> { | |||
| 75 | 75 | ||
| 76 | #[cfg(feature = "gpiote")] | 76 | #[cfg(feature = "gpiote")] |
| 77 | impl<'d, T: Pin> embassy::traits::gpio::WaitForHigh for Input<'d, T> { | 77 | impl<'d, T: Pin> embassy::traits::gpio::WaitForHigh for Input<'d, T> { |
| 78 | #[rustfmt::skip] | 78 | type Future<'a> |
| 79 | type Future<'a> where Self: 'a = impl Future<Output=()> + Unpin + 'a; | 79 | where |
| 80 | Self: 'a, | ||
| 81 | = impl Future<Output = ()> + Unpin + 'a; | ||
| 80 | 82 | ||
| 81 | fn wait_for_high<'a>(&'a mut self) -> Self::Future<'a> { | 83 | fn wait_for_high<'a>(&'a mut self) -> Self::Future<'a> { |
| 82 | self.pin.conf().modify(|_, w| w.sense().high()); | 84 | self.pin.conf().modify(|_, w| w.sense().high()); |
| @@ -90,8 +92,10 @@ impl<'d, T: Pin> embassy::traits::gpio::WaitForHigh for Input<'d, T> { | |||
| 90 | 92 | ||
| 91 | #[cfg(feature = "gpiote")] | 93 | #[cfg(feature = "gpiote")] |
| 92 | impl<'d, T: Pin> embassy::traits::gpio::WaitForLow for Input<'d, T> { | 94 | impl<'d, T: Pin> embassy::traits::gpio::WaitForLow for Input<'d, T> { |
| 93 | #[rustfmt::skip] | 95 | type Future<'a> |
| 94 | type Future<'a> where Self: 'a = impl Future<Output=()> + Unpin + 'a; | 96 | where |
| 97 | Self: 'a, | ||
| 98 | = impl Future<Output = ()> + Unpin + 'a; | ||
| 95 | 99 | ||
| 96 | fn wait_for_low<'a>(&'a mut self) -> Self::Future<'a> { | 100 | fn wait_for_low<'a>(&'a mut self) -> Self::Future<'a> { |
| 97 | self.pin.conf().modify(|_, w| w.sense().low()); | 101 | self.pin.conf().modify(|_, w| w.sense().low()); |
| @@ -105,8 +109,10 @@ impl<'d, T: Pin> embassy::traits::gpio::WaitForLow for Input<'d, T> { | |||
| 105 | 109 | ||
| 106 | #[cfg(feature = "gpiote")] | 110 | #[cfg(feature = "gpiote")] |
| 107 | impl<'d, T: Pin> embassy::traits::gpio::WaitForAnyEdge for Input<'d, T> { | 111 | impl<'d, T: Pin> embassy::traits::gpio::WaitForAnyEdge for Input<'d, T> { |
| 108 | #[rustfmt::skip] | 112 | type Future<'a> |
| 109 | type Future<'a> where Self: 'a = impl Future<Output=()> + Unpin + 'a; | 113 | where |
| 114 | Self: 'a, | ||
| 115 | = impl Future<Output = ()> + Unpin + 'a; | ||
| 110 | 116 | ||
| 111 | fn wait_for_any_edge<'a>(&'a mut self) -> Self::Future<'a> { | 117 | fn wait_for_any_edge<'a>(&'a mut self) -> Self::Future<'a> { |
| 112 | if self.is_high().ok().unwrap() { | 118 | if self.is_high().ok().unwrap() { |
| @@ -328,8 +334,10 @@ impl<'d, T: Pin> StatefulOutputPin for FlexPin<'d, T> { | |||
| 328 | 334 | ||
| 329 | #[cfg(feature = "gpiote")] | 335 | #[cfg(feature = "gpiote")] |
| 330 | impl<'d, T: Pin> embassy::traits::gpio::WaitForHigh for FlexPin<'d, T> { | 336 | impl<'d, T: Pin> embassy::traits::gpio::WaitForHigh for FlexPin<'d, T> { |
| 331 | #[rustfmt::skip] | 337 | type Future<'a> |
| 332 | type Future<'a> where Self: 'a = impl Future<Output=()> + Unpin + 'a; | 338 | where |
| 339 | Self: 'a, | ||
| 340 | = impl Future<Output = ()> + Unpin + 'a; | ||
| 333 | 341 | ||
| 334 | fn wait_for_high<'a>(&'a mut self) -> Self::Future<'a> { | 342 | fn wait_for_high<'a>(&'a mut self) -> Self::Future<'a> { |
| 335 | self.pin.conf().modify(|_, w| w.sense().high()); | 343 | self.pin.conf().modify(|_, w| w.sense().high()); |
| @@ -343,8 +351,10 @@ impl<'d, T: Pin> embassy::traits::gpio::WaitForHigh for FlexPin<'d, T> { | |||
| 343 | 351 | ||
| 344 | #[cfg(feature = "gpiote")] | 352 | #[cfg(feature = "gpiote")] |
| 345 | impl<'d, T: Pin> embassy::traits::gpio::WaitForLow for FlexPin<'d, T> { | 353 | impl<'d, T: Pin> embassy::traits::gpio::WaitForLow for FlexPin<'d, T> { |
| 346 | #[rustfmt::skip] | 354 | type Future<'a> |
| 347 | type Future<'a> where Self: 'a = impl Future<Output=()> + Unpin + 'a; | 355 | where |
| 356 | Self: 'a, | ||
| 357 | = impl Future<Output = ()> + Unpin + 'a; | ||
| 348 | 358 | ||
| 349 | fn wait_for_low<'a>(&'a mut self) -> Self::Future<'a> { | 359 | fn wait_for_low<'a>(&'a mut self) -> Self::Future<'a> { |
| 350 | self.pin.conf().modify(|_, w| w.sense().low()); | 360 | self.pin.conf().modify(|_, w| w.sense().low()); |
| @@ -358,8 +368,10 @@ impl<'d, T: Pin> embassy::traits::gpio::WaitForLow for FlexPin<'d, T> { | |||
| 358 | 368 | ||
| 359 | #[cfg(feature = "gpiote")] | 369 | #[cfg(feature = "gpiote")] |
| 360 | impl<'d, T: Pin> embassy::traits::gpio::WaitForAnyEdge for FlexPin<'d, T> { | 370 | impl<'d, T: Pin> embassy::traits::gpio::WaitForAnyEdge for FlexPin<'d, T> { |
| 361 | #[rustfmt::skip] | 371 | type Future<'a> |
| 362 | type Future<'a> where Self: 'a = impl Future<Output=()> + Unpin + 'a; | 372 | where |
| 373 | Self: 'a, | ||
| 374 | = impl Future<Output = ()> + Unpin + 'a; | ||
| 363 | 375 | ||
| 364 | fn wait_for_any_edge<'a>(&'a mut self) -> Self::Future<'a> { | 376 | fn wait_for_any_edge<'a>(&'a mut self) -> Self::Future<'a> { |
| 365 | if self.is_high().ok().unwrap() { | 377 | if self.is_high().ok().unwrap() { |
