Merge pull request #3017 from lucasgranberg/main

add set_as_analog to stm32 gpio Flex
This commit is contained in:
Dario Nieuwenhuis 2024-05-29 14:22:44 +00:00 committed by GitHub
commit 50210e8cdc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -128,6 +128,15 @@ impl<'d> Flex<'d> {
});
}
/// Put the pin into analog mode
///
/// This mode is used by ADC and COMP but usually there is no need to set this manually
/// as the mode change is handled by the driver.
#[inline]
pub fn set_as_analog(&mut self) {
self.pin.set_as_analog();
}
/// Put the pin into AF mode, unchecked.
///
/// This puts the pin into the AF mode, with the requested number, pull and speed. This is