Dummy Input/Output Pin Implementations
This provides dummy implementations of the input/output pin embedded-hal
traits.
This is useful when dealing with setups where a certain pin is handled by hardware in a way
that the software does not need to know about, for example.
In addition to the no-op, zero-cost DummyPin
, this crate provides an implementation of LastStateDummyPin
,
which stores the last state set at runtime and returns it when read.
Usage
This example demonstrates how the same driver can operate with either a real or a dummy output pin.
use DummyPin;
use OutputPin;
use SysfsPin;
Support
For questions, issues, feature requests, and other changes, please file an issue in the github project.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contributing
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.