[−][src]Enum embedded_spi::mock::MockTransaction
Mock transaction type for setting and checking expectations
Variants
None
SpiWrite(Id, Vec<u8>, Vec<u8>)
SpiRead(Id, Vec<u8>, Vec<u8>)
SpiExec(Id, Vec<MockExec>)
Busy(Id, PinState)
Ready(Id, PinState)
Reset(Id, PinState)
Write(Id, Vec<u8>)
Transfer(Id, Vec<u8>, Vec<u8>)
IsHigh(Id, bool)
IsLow(Id, bool)
SetHigh(Id)
SetLow(Id)
DelayMs(u32)
Methods
impl MockTransaction
[src]
pub fn spi_write<A, B>(spi: &Spi, prefix: A, outgoing: B) -> Self where
A: AsRef<[u8]>,
B: AsRef<[u8]>,
[src]
A: AsRef<[u8]>,
B: AsRef<[u8]>,
pub fn spi_read<A, B>(spi: &Spi, prefix: A, incoming: B) -> Self where
A: AsRef<[u8]>,
B: AsRef<[u8]>,
[src]
A: AsRef<[u8]>,
B: AsRef<[u8]>,
pub fn busy(spi: &Spi, value: PinState) -> Self
[src]
pub fn ready(spi: &Spi, value: PinState) -> Self
[src]
pub fn reset(spi: &Spi, value: PinState) -> Self
[src]
pub fn delay_ms(v: u32) -> Self
[src]
pub fn write<B>(spi: &Spi, outgoing: B) -> Self where
B: AsRef<[u8]>,
[src]
B: AsRef<[u8]>,
pub fn transfer<B>(spi: &Spi, outgoing: B, incoming: B) -> Self where
B: AsRef<[u8]>,
[src]
B: AsRef<[u8]>,
pub fn is_high(pin: &Pin, value: bool) -> Self
[src]
pub fn is_low(pin: &Pin, value: bool) -> Self
[src]
pub fn set_high(pin: &Pin) -> Self
[src]
pub fn set_low(pin: &Pin) -> Self
[src]
Trait Implementations
impl PartialEq<MockTransaction> for MockTransaction
[src]
fn eq(&self, other: &MockTransaction) -> bool
[src]
fn ne(&self, other: &MockTransaction) -> bool
[src]
impl Debug for MockTransaction
[src]
impl Clone for MockTransaction
[src]
fn clone(&self) -> MockTransaction
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for MockTransaction
impl Sync for MockTransaction
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,