Type Alias embedded_hal_mock::eh0::adc::Mock

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

Mock ADC implementation

Mock ADC implements OneShot trait reading operation. Returned type can be either derived from definition of expectations or specified explicitly. Explicit ADC read return type can be used to mock specific ADC accuracy.

Aliased Type§

struct Mock<T> { /* private fields */ }

Trait Implementations§

source§

impl<Pin, T> OneShot<MockAdc, T, Pin> for Mock<T>
where Pin: Channel<MockAdc, ID = u8>, T: Clone + Debug + PartialEq,

§

type Error = MockError

Error type returned by ADC methods
source§

fn read(&mut self, _pin: &mut Pin) -> Result<T, Self::Error>

Request that the ADC begin a conversion on the specified pin Read more