pub trait GpioTrait: Pin {
// Provided methods
fn input(self) -> Input<'static> { ... }
fn input_with_pull(self, pull: Pull) -> Input<'static> { ... }
fn output(self) -> Output<'static> { ... }
fn output_with_level_speed(
self,
level: Level,
speed: Speed,
) -> Output<'static> { ... }
}Expand description
gpio trait
Provided Methods§
Sourcefn input(self) -> Input<'static>
fn input(self) -> Input<'static>
Create GPIO input driver, default Pull is Pull::Up
more see Self::input_with_pull or Input::new
Sourcefn input_with_pull(self, pull: Pull) -> Input<'static>
fn input_with_pull(self, pull: Pull) -> Input<'static>
Create GPIO input driver, more see Input::new
Sourcefn output(self) -> Output<'static>
fn output(self) -> Output<'static>
Create GPIO output driver, default level is Level::High and default speed is Speed::Low
more see Self::output_with_level_speed or Output::new
Sourcefn output_with_level_speed(self, level: Level, speed: Speed) -> Output<'static>
fn output_with_level_speed(self, level: Level, speed: Speed) -> Output<'static>
Create GPIO output driver, more see Output::new
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.