aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2024-05-29 14:22:44 +0000
committerGitHub <[email protected]>2024-05-29 14:22:44 +0000
commit50210e8cdc95c3c8bea150541cd8f15482450b1e (patch)
treee0815debd51e1baa5b019049e0ea1b1a286f7742
parent56235c97bc00cb0fb8246a9bb2ea531d508438f9 (diff)
parentb282edcc6e98b6d86e4faa5bf5e7274571684e49 (diff)
Merge pull request #3017 from lucasgranberg/main
add set_as_analog to stm32 gpio Flex
-rw-r--r--embassy-stm32/src/gpio.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/embassy-stm32/src/gpio.rs b/embassy-stm32/src/gpio.rs
index 808a5bc82..d60a857ef 100644
--- a/embassy-stm32/src/gpio.rs
+++ b/embassy-stm32/src/gpio.rs
@@ -128,6 +128,15 @@ impl<'d> Flex<'d> {
128 }); 128 });
129 } 129 }
130 130
131 /// Put the pin into analog mode
132 ///
133 /// This mode is used by ADC and COMP but usually there is no need to set this manually
134 /// as the mode change is handled by the driver.
135 #[inline]
136 pub fn set_as_analog(&mut self) {
137 self.pin.set_as_analog();
138 }
139
131 /// Put the pin into AF mode, unchecked. 140 /// Put the pin into AF mode, unchecked.
132 /// 141 ///
133 /// This puts the pin into the AF mode, with the requested number, pull and speed. This is 142 /// This puts the pin into the AF mode, with the requested number, pull and speed. This is