aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-07-23 14:04:43 +0200
committerDario Nieuwenhuis <[email protected]>2022-07-23 14:04:43 +0200
commita158295782b75bce5f83f5d1c2c476b841493979 (patch)
tree58831fba9ca0325a953cb202455da21d2b348ed5
parent4901c34d9c4cd326ab9bca02dd099a663da2567f (diff)
Add docs to PeripheralRef::map_into.
-rw-r--r--embassy-hal-common/src/peripheral.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/embassy-hal-common/src/peripheral.rs b/embassy-hal-common/src/peripheral.rs
index 620047382..cd0cb8dcb 100644
--- a/embassy-hal-common/src/peripheral.rs
+++ b/embassy-hal-common/src/peripheral.rs
@@ -27,6 +27,12 @@ impl<'a, T> PeripheralRef<'a, T> {
27 } 27 }
28 } 28 }
29 29
30 /// Map the inner peripheral using `Into`.
31 ///
32 /// This converts from `PeripheralRef<'a, T>` to `PeripheralRef<'a, U>`, using an
33 /// `Into` impl to convert from `T` to `U`.
34 ///
35 /// For example, this can be useful to degrade GPIO pins: converting from PeripheralRef<'a, PB11>` to `PeripheralRef<'a, AnyPin>`.
30 #[inline] 36 #[inline]
31 pub fn map_into<U>(self) -> PeripheralRef<'a, U> 37 pub fn map_into<U>(self) -> PeripheralRef<'a, U>
32 where 38 where