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(); } }