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-traits | |
| parent | 59ccc45f280e05a9d2a0ece2bb1e01debadb2f7e (diff) | |
Remove Pin from GPIO traits
Diffstat (limited to 'embassy-traits')
| -rw-r--r-- | embassy-traits/src/gpio.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/embassy-traits/src/gpio.rs b/embassy-traits/src/gpio.rs index 4c3feac21..c4ae206cd 100644 --- a/embassy-traits/src/gpio.rs +++ b/embassy-traits/src/gpio.rs | |||
| @@ -9,7 +9,7 @@ pub trait WaitForHigh { | |||
| 9 | /// | 9 | /// |
| 10 | /// If the pin is already high, the future completes immediately. | 10 | /// If the pin is already high, the future completes immediately. |
| 11 | /// Otherwise, it completes when it becomes high. | 11 | /// Otherwise, it completes when it becomes high. |
| 12 | fn wait_for_high<'a>(self: Pin<&'a mut Self>) -> Self::Future<'a>; | 12 | fn wait_for_high<'a>(&'a mut self) -> Self::Future<'a>; |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | /// Wait for a pin to become low. | 15 | /// Wait for a pin to become low. |
| @@ -20,7 +20,7 @@ pub trait WaitForLow { | |||
| 20 | /// | 20 | /// |
| 21 | /// If the pin is already low, the future completes immediately. | 21 | /// If the pin is already low, the future completes immediately. |
| 22 | /// Otherwise, it completes when it becomes low. | 22 | /// Otherwise, it completes when it becomes low. |
| 23 | fn wait_for_low<'a>(self: Pin<&'a mut Self>) -> Self::Future<'a>; | 23 | fn wait_for_low<'a>(&'a mut self) -> Self::Future<'a>; |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | /// Wait for a rising edge (transition from low to high) | 26 | /// Wait for a rising edge (transition from low to high) |
| @@ -28,7 +28,7 @@ pub trait WaitForRisingEdge { | |||
| 28 | type Future<'a>: Future<Output = ()> + 'a; | 28 | type Future<'a>: Future<Output = ()> + 'a; |
| 29 | 29 | ||
| 30 | /// Wait for a rising edge (transition from low to high) | 30 | /// Wait for a rising edge (transition from low to high) |
| 31 | fn wait_for_rising_edge<'a>(self: Pin<&'a mut Self>) -> Self::Future<'a>; | 31 | fn wait_for_rising_edge<'a>(&'a mut self) -> Self::Future<'a>; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | /// Wait for a falling edge (transition from high to low) | 34 | /// Wait for a falling edge (transition from high to low) |
| @@ -36,7 +36,7 @@ pub trait WaitForFallingEdge { | |||
| 36 | type Future<'a>: Future<Output = ()> + 'a; | 36 | type Future<'a>: Future<Output = ()> + 'a; |
| 37 | 37 | ||
| 38 | /// Wait for a falling edge (transition from high to low) | 38 | /// Wait for a falling edge (transition from high to low) |
| 39 | fn wait_for_falling_edge<'a>(self: Pin<&'a mut Self>) -> Self::Future<'a>; | 39 | fn wait_for_falling_edge<'a>(&'a mut self) -> Self::Future<'a>; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | /// Wait for any edge (any transition, high to low or low to high) | 42 | /// Wait for any edge (any transition, high to low or low to high) |
| @@ -44,5 +44,5 @@ pub trait WaitForAnyEdge { | |||
| 44 | type Future<'a>: Future<Output = ()> + 'a; | 44 | type Future<'a>: Future<Output = ()> + 'a; |
| 45 | 45 | ||
| 46 | /// Wait for any edge (any transition, high to low or low to high) | 46 | /// Wait for any edge (any transition, high to low or low to high) |
| 47 | fn wait_for_any_edge<'a>(self: Pin<&'a mut Self>) -> Self::Future<'a>; | 47 | fn wait_for_any_edge<'a>(&'a mut self) -> Self::Future<'a>; |
| 48 | } | 48 | } |
