Type Definition embedded_hal_mock::spi::Mock

source ·
pub type Mock<'a> = Generic<'a, Transaction>;
Expand description

Mock SPI implementation

This supports the specification and checking of expectations to allow automated testing of SPI based drivers. Mismatches between expected and real SPI transactions will cause runtime assertions to assist with locating faults.

See the usage section in the module level docs for an example.

Trait Implementations§

spi::Transfer implementation for Mock

This writes the provided response to the buffer and will cause an assertion if the written data does not match the next expectation

Error type

spi::Write implementation for Mock

This will cause an assertion if the write call does not match the next expectation

Error type