# Dummy Input/Output Pin Implementations [![crates.io](https://img.shields.io/crates/v/dummy-pin.svg)](https://crates.io/crates/dummy-pin) [![Docs](https://docs.rs/dummy-pin/badge.svg)](https://docs.rs/dummy-pin) ![MSRV](https://img.shields.io/badge/rustc-1.62+-blue.svg) [![Build Status](https://github.com/eldruin/dummy-pin-rs/workflows/Build/badge.svg)](https://github.com/eldruin/dummy-pin-rs/actions?query=workflow%3ABuild) [![Coverage Status](https://coveralls.io/repos/github/eldruin/dummy-pin-rs/badge.svg?branch=master)](https://coveralls.io/github/eldruin/dummy-pin-rs?branch=master) 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. ```rust use dummy_pin::DummyPin; use embedded_hal::digital::OutputPin; use linux_embedded_hal::SysfsPin; struct Driver
{ output: P, } impl
Driver
where
P: OutputPin