blob: e9933f55002343f5ba84a863f1c2b844ffbf808f [file] [log] [blame]
#![no_std]
extern crate tock;
use tock::gpio::GpioPinUnitialized;
use tock::timer;
use tock::timer::Duration;
// Example works on P0.03
fn main() {
let pin = GpioPinUnitialized::new(0);
let pin = pin.open_for_write().unwrap();
loop {
pin.set_high();
timer::sleep(Duration::from_ms(500));
pin.set_low();;
timer::sleep(Duration::from_ms(500));
}
}