From 230250ac9da06ecea575f852cc548f81130d14d7 Mon Sep 17 00:00:00 2001 From: Tangent 128 Date: Sun, 27 Oct 2019 01:56:14 -0400 Subject: [PATCH] quiet compiler warnings in some of the messier code --- hello_gradient/src/bin/july4.rs | 6 ------ hello_gradient/src/bin/sanity_test.rs | 14 ++++++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/hello_gradient/src/bin/july4.rs b/hello_gradient/src/bin/july4.rs index 35bfd88..f7af1f9 100644 --- a/hello_gradient/src/bin/july4.rs +++ b/hello_gradient/src/bin/july4.rs @@ -2,10 +2,6 @@ #![no_main] use core::iter::repeat; -use core::sync::atomic::{ - compiler_fence, - Ordering::SeqCst -}; use lights::{ gamma::correct, HardwareRgb, @@ -54,11 +50,9 @@ fn main() -> ! { } buffer.iter().render_to(&mut lights); - // compiler_fence(SeqCst); // buffer.iter().render_to(&mut lights); // lights.out.set_high(); // lights.high_out.set_low(); - // compiler_fence(SeqCst); // lights.byte(0); // lights.byte(0); // lights.byte(255); diff --git a/hello_gradient/src/bin/sanity_test.rs b/hello_gradient/src/bin/sanity_test.rs index 6ebb330..e4c5eee 100644 --- a/hello_gradient/src/bin/sanity_test.rs +++ b/hello_gradient/src/bin/sanity_test.rs @@ -4,24 +4,26 @@ extern crate itsybitsy_m0 as hal; extern crate panic_halt; -use hal::clock::GenericClockController; +// use hal::clock::GenericClockController; //use hal::delay::Delay; use hal::prelude::*; use hal::entry; -use hal::pac::{CorePeripherals, Peripherals}; +// use hal::pac::{CorePeripherals, Peripherals}; +use hal::pac::{Peripherals}; use lights_hal::delay; #[entry] fn main() -> ! { - let mut peripherals = Peripherals::take().unwrap(); - let core = CorePeripherals::take().unwrap(); - let mut clocks = GenericClockController::with_internal_32kosc( + // let mut peripherals = Peripherals::take().unwrap(); + let peripherals = Peripherals::take().unwrap(); + // let core = CorePeripherals::take().unwrap(); + /* let mut clocks = GenericClockController::with_internal_32kosc( peripherals.GCLK, &mut peripherals.PM, &mut peripherals.SYSCTRL, &mut peripherals.NVMCTRL, - ); + ); */ 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);