use delay loop in sanity test to check that works right
This commit is contained in:
parent
7a7d5f1a48
commit
724a621bc1
1 changed files with 8 additions and 4 deletions
|
@ -5,11 +5,13 @@ extern crate itsybitsy_m0 as hal;
|
|||
extern crate panic_halt;
|
||||
|
||||
use hal::clock::GenericClockController;
|
||||
use hal::delay::Delay;
|
||||
//use hal::delay::Delay;
|
||||
use hal::prelude::*;
|
||||
use hal::entry;
|
||||
use hal::pac::{CorePeripherals, Peripherals};
|
||||
|
||||
use lights_hal::delay;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
let mut peripherals = Peripherals::take().unwrap();
|
||||
|
@ -22,11 +24,13 @@ fn main() -> ! {
|
|||
);
|
||||
let mut pins = hal::Pins::new(peripherals.PORT);
|
||||
let mut red_led = pins.d13.into_open_drain_output(&mut pins.port);
|
||||
let mut delay = Delay::new(core.SYST, &mut clocks);
|
||||
//let mut delay = Delay::new(core.SYST, &mut clocks);
|
||||
loop {
|
||||
delay.delay_ms(200u8);
|
||||
//delay.delay_ms(200u8);
|
||||
delay(48_000 * 100);
|
||||
red_led.set_high().unwrap();
|
||||
delay.delay_ms(200u8);
|
||||
//delay.delay_ms(200u8);
|
||||
delay(48_000 * 100);
|
||||
red_led.set_low().unwrap();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue