GpioTrait

Trait GpioTrait 

Source
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§

Source

fn input(self) -> Input<'static>

Create GPIO input driver, default Pull is Pull::Up
more see Self::input_with_pull or Input::new

Source

fn input_with_pull(self, pull: Pull) -> Input<'static>

Create GPIO input driver, more see Input::new

Source

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

Source

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.

Implementors§

Source§

impl<T: Pin> GpioTrait for T

any pin support gpio trait