[][src]Trait kernel::hil::gpio::Configure

pub trait Configure {
    fn configuration(&self) -> Configuration;
fn make_output(&self) -> Configuration;
fn disable_output(&self) -> Configuration;
fn make_input(&self) -> Configuration;
fn disable_input(&self) -> Configuration;
fn deactivate_to_low_power(&self);
fn set_floating_state(&self, state: FloatingState);
fn floating_state(&self) -> FloatingState; fn is_input(&self) -> bool { ... }
fn is_output(&self) -> bool { ... } }

Control and configure a GPIO pin.

Required methods

fn configuration(&self) -> Configuration

Return the current pin configuration.

fn make_output(&self) -> Configuration

Make the pin an output, returning the current configuration, which should be either Configuration::Output or Configuration::InputOutput.

fn disable_output(&self) -> Configuration

Disable the pin as an output, returning the current configuration.

fn make_input(&self) -> Configuration

Make the pin an input, returning the current configuration, which should be ither Configuration::Input or Configuration::InputOutput.

fn disable_input(&self) -> Configuration

Disable the pin as an input, returning the current configuration.

fn deactivate_to_low_power(&self)

Put a pin into its lowest power state, with no guarantees on if it is enabled or not. Implementations are free to use any state (e.g. input, output, disable, etc.) the hardware pin supports to ensure the pin is as low power as possible. Re-enabling the pin requires reconfiguring it (i.e. the state of its enabled configuration is not stored).

fn set_floating_state(&self, state: FloatingState)

Set the floating state of the pin.

fn floating_state(&self) -> FloatingState

Return the current floating state of the pin.

Loading content...

Provided methods

fn is_input(&self) -> bool

Return whether the pin is an input (reading from the Input trait will return valid results). Returns true if the pin is in Configuration::Input or Configuration::InputOutput.

fn is_output(&self) -> bool

Return whether the pin is an output (writing to the Output trait will change the output of the pin). Returns true if the pin is in Configuration::Output or Configuration::InputOutput.

Loading content...

Implementors

impl<'a, IP: InterruptPin<'a>> Configure for InterruptValueWrapper<'a, IP>[src]

Loading content...