pub type Mock = Generic<Transaction>;Available on crate feature
eh1 only.Expand description
Mock I2C implementation
This supports the specification and evaluation of expectations to allow automated testing of I2C based drivers. Mismatches between expectations will cause runtime assertions to assist in locating the source of the fault.
Aliased Type§
pub struct Mock { /* private fields */ }Trait Implementations§
Source§impl I2c for Mock
impl I2c for Mock
Source§fn write(&mut self, address: u8, bytes: &[u8]) -> Result<(), Self::Error>
fn write(&mut self, address: u8, bytes: &[u8]) -> Result<(), Self::Error>
Writes bytes to slave with address
address. Read moreSource§impl I2c for Mock
Available on crate feature embedded-hal-async only.
impl I2c for Mock
Available on crate feature
embedded-hal-async only.Source§async fn write(&mut self, address: u8, bytes: &[u8]) -> Result<(), Self::Error>
async fn write(&mut self, address: u8, bytes: &[u8]) -> Result<(), Self::Error>
Writes bytes to slave with address
address. Read more