Crate embedded_hal_mock
source ·Expand description
This is a collection of types that implement the embedded-hal traits.
The implementations never access real hardware. Instead, the hardware is mocked or no-op implementations are used.
The goal of the crate is to be able to test drivers in CI without having access to hardware.
Usage
See module-level docs for more information.
Cargo Features
There are currently the following cargo features:
embedded-time
: Enable thetimer
module (enabled by default)
no_std
Currently this crate is not no_std
. If you think this is important, let
me know.
Modules
ADC mock implementation.
Common functionality used by the mock implementations.
Delay mock implementations.
I²C mock implementations.
Serial mock implementations.
SPI mock implementations.
Provides a mocked embedded_time::Clock that can be used for host-side testing
crates that use embedded_hal::timer.
Enums
Errors that may occur during mocking.