pub trait GpioBackend: Send {
// Required methods
fn read(&mut self) -> Result<bool, BackendError>;
fn write(&mut self, value: bool) -> Result<(), BackendError>;
}Expand description
Hardware access abstraction for a GPIO pin.
Required Methods§
Sourcefn read(&mut self) -> Result<bool, BackendError>
fn read(&mut self) -> Result<bool, BackendError>
Reads the current voltage level (high = true, low = false).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".