pub trait Led {
// Required methods
fn init(&self);
fn on(&self);
fn off(&self);
fn toggle(&self);
fn read(&self) -> bool;
}Expand description
Simple on/off interface for LED pins.
Since GPIO pins are synchronous in Tock the LED interface is synchronous as well.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".