Trait serpente::gpio::IntoFunction
source · pub trait IntoFunction<T> {
// Required method
fn into_function(self, port: &mut Port) -> T;
}
👎Deprecated since 0.13.0: The gpio::v1 module is deprecated, and will be removed in a subsequent release.
Please use the gpio::v2 module instead.
Expand description
A trait that makes it easier to generically manage
converting a pin from its current state into some
other functional mode. The configuration change
requires exclusive access to the Port hardware,
which is why this isn’t simply the standard Into
trait.
Required Methods§
sourcefn into_function(self, port: &mut Port) -> T
fn into_function(self, port: &mut Port) -> T
👎Deprecated since 0.13.0: The gpio::v1 module is deprecated, and will be removed in a subsequent release.
Please use the gpio::v2 module instead.
Consume the pin and configure it to operate in the mode T.