Type Alias Mock

Source
pub type Mock = Generic<Transaction>;
Available on crate feature eh1 only.
Expand description

Mock Pin implementation

Aliased Type§

pub struct Mock { /* private fields */ }

Trait Implementations§

Source§

impl ErrorType for Mock

Source§

type Error = MockError

Error type
Source§

impl InputPin for Mock

Source§

fn is_high(&mut self) -> Result<bool, Self::Error>

Is the input pin high?

Source§

fn is_low(&mut self) -> Result<bool, Self::Error>

Is the input pin low?

Source§

impl OutputPin for Mock

Single digital push-pull output pin

Source§

fn set_low(&mut self) -> Result<(), Self::Error>

Drives the pin low

Source§

fn set_high(&mut self) -> Result<(), Self::Error>

Drives the pin high

Source§

fn set_state(&mut self, state: PinState) -> Result<(), Self::Error>

Drives the pin high or low depending on the provided value. Read more
Source§

impl StatefulOutputPin for Mock

Single digital output pin that remembers its state and can be toggled between high and low states

Source§

fn toggle(&mut self) -> Result<(), Self::Error>

Toggle the pin low to high or high to low

Source§

fn is_set_high(&mut self) -> Result<bool, Self::Error>

Is the output pin set high?

Source§

fn is_set_low(&mut self) -> Result<bool, Self::Error>

Is the output pin set low?

Source§

impl Wait for Mock

Available on crate feature embedded-hal-async only.
Source§

async fn wait_for_high(&mut self) -> Result<(), Self::Error>

Wait for the pin to go high

Source§

async fn wait_for_low(&mut self) -> Result<(), Self::Error>

Wait for the pin to go low

Source§

async fn wait_for_rising_edge(&mut self) -> Result<(), Self::Error>

Wait for the pin to have a rising edge

Source§

async fn wait_for_falling_edge(&mut self) -> Result<(), Self::Error>

Wait for the pin to have a falling edge

Source§

async fn wait_for_any_edge(&mut self) -> Result<(), Self::Error>

Wait for the pin to have either a rising or falling edge