From 724a621bc16e4166b29d721f14b3c4883cd61a86 Mon Sep 17 00:00:00 2001 From: Tangent 128 Date: Sun, 27 Oct 2019 00:56:48 -0400 Subject: [PATCH] use delay loop in sanity test to check that works right --- hello_gradient/src/bin/sanity_test.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hello_gradient/src/bin/sanity_test.rs b/hello_gradient/src/bin/sanity_test.rs index b47580e..6ebb330 100644 --- a/hello_gradient/src/bin/sanity_test.rs +++ b/hello_gradient/src/bin/sanity_test.rs @@ -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(); } }