Type Alias Mock

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

Mock Pin implementation

Aliased Type§

pub struct Mock { /* private fields */ }

Trait Implementations§

Source§

impl InputPin for Mock

Source§

type Error = MockError

Error type

Source§

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

Is the input pin high?

Source§

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

Is the input pin low?

Source§

impl OutputPin for Mock

Single digital push-pull output pin

Source§

type Error = MockError

Error type

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 PwmPin for Mock

Source§

type Duty = u16

Type for the duty methods Read more
Source§

fn disable(&mut self)

Disables a PWM channel
Source§

fn enable(&mut self)

Enables a PWM channel
Source§

fn get_duty(&self) -> Self::Duty

Returns the current duty cycle
Source§

fn get_max_duty(&self) -> Self::Duty

Returns the maximum duty cycle value
Source§

fn set_duty(&mut self, duty: Self::Duty)

Sets a new duty cycle
Source§

impl ToggleableOutputPin for Mock

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

Source§

type Error = MockError

Error type

Source§

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

Toggle the pin low to high or high to low