pub trait Led {
    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

Initialize the LED. Must be called before the LED is used.

Turn the LED on.

Turn the LED off.

Toggle the LED.

Return the on/off state of the LED. true if the LED is on, false if it is off.