You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This crate supports both version 0.x and version 1.x of embedded-hal. By default only support
for version 0.x is enabled. To enable support for version 1.x, use the eh1 feature.
Cargo Features
There are currently the following cargo features:
eh0: Provide module eh0 that mocks embedded-hal version 0.x
eh1: Provide module eh1 that mocks embedded-hal version 1.x (enabled by default)
embedded-time: Enable the eh0::timer module (enabled by default)
embedded-hal-async: Provide mocks for embedded-hal-async in eh1
no_std
Currently this crate is not no_std. If you think this is important, let
me know.
Status
Feature
embedded-hal
embeded-hal-async
I²C
✅
✅
SPI
✅
✅
No-op delay
✅
✅
Actual delay
✅
✅
Serial
✅
-
RNG
-
-
I/O pins (including PWM)
✅
✅
ADC
✅
-
Timers (with embedded-time Cargo feature)
✅
-
Pull requests for more mock implementations are welcome! :)
Minimum Supported Rust Version (MSRV)
This crate is guaranteed to compile on the latest stable Rust release. It
might compile with older versions but that may change in any new patch
release.
Development Version of embedded-hal
If you would like to use the current development version of embedded-hal (or any other version),
so long as they are API compatible you can use a patch field in your Cargo.toml file to override
the dependency version.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall
be dual licensed as above, without any additional terms or conditions.
About
Mocks for testing embedded-hal based drivers without hardware access.