quiet compiler warnings in some of the messier code
This commit is contained in:
parent
0687f2086a
commit
230250ac9d
2 changed files with 8 additions and 12 deletions
|
@ -2,10 +2,6 @@
|
||||||
#![no_main]
|
#![no_main]
|
||||||
|
|
||||||
use core::iter::repeat;
|
use core::iter::repeat;
|
||||||
use core::sync::atomic::{
|
|
||||||
compiler_fence,
|
|
||||||
Ordering::SeqCst
|
|
||||||
};
|
|
||||||
use lights::{
|
use lights::{
|
||||||
gamma::correct,
|
gamma::correct,
|
||||||
HardwareRgb,
|
HardwareRgb,
|
||||||
|
@ -54,11 +50,9 @@ fn main() -> ! {
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer.iter().render_to(&mut lights);
|
buffer.iter().render_to(&mut lights);
|
||||||
// compiler_fence(SeqCst);
|
|
||||||
// buffer.iter().render_to(&mut lights);
|
// buffer.iter().render_to(&mut lights);
|
||||||
// lights.out.set_high();
|
// lights.out.set_high();
|
||||||
// lights.high_out.set_low();
|
// lights.high_out.set_low();
|
||||||
// compiler_fence(SeqCst);
|
|
||||||
// lights.byte(0);
|
// lights.byte(0);
|
||||||
// lights.byte(0);
|
// lights.byte(0);
|
||||||
// lights.byte(255);
|
// lights.byte(255);
|
||||||
|
|
|
@ -4,24 +4,26 @@
|
||||||
extern crate itsybitsy_m0 as hal;
|
extern crate itsybitsy_m0 as hal;
|
||||||
extern crate panic_halt;
|
extern crate panic_halt;
|
||||||
|
|
||||||
use hal::clock::GenericClockController;
|
// use hal::clock::GenericClockController;
|
||||||
//use hal::delay::Delay;
|
//use hal::delay::Delay;
|
||||||
use hal::prelude::*;
|
use hal::prelude::*;
|
||||||
use hal::entry;
|
use hal::entry;
|
||||||
use hal::pac::{CorePeripherals, Peripherals};
|
// use hal::pac::{CorePeripherals, Peripherals};
|
||||||
|
use hal::pac::{Peripherals};
|
||||||
|
|
||||||
use lights_hal::delay;
|
use lights_hal::delay;
|
||||||
|
|
||||||
#[entry]
|
#[entry]
|
||||||
fn main() -> ! {
|
fn main() -> ! {
|
||||||
let mut peripherals = Peripherals::take().unwrap();
|
// let mut peripherals = Peripherals::take().unwrap();
|
||||||
let core = CorePeripherals::take().unwrap();
|
let peripherals = Peripherals::take().unwrap();
|
||||||
let mut clocks = GenericClockController::with_internal_32kosc(
|
// let core = CorePeripherals::take().unwrap();
|
||||||
|
/* let mut clocks = GenericClockController::with_internal_32kosc(
|
||||||
peripherals.GCLK,
|
peripherals.GCLK,
|
||||||
&mut peripherals.PM,
|
&mut peripherals.PM,
|
||||||
&mut peripherals.SYSCTRL,
|
&mut peripherals.SYSCTRL,
|
||||||
&mut peripherals.NVMCTRL,
|
&mut peripherals.NVMCTRL,
|
||||||
);
|
); */
|
||||||
let mut pins = hal::Pins::new(peripherals.PORT);
|
let mut pins = hal::Pins::new(peripherals.PORT);
|
||||||
let mut red_led = pins.d13.into_open_drain_output(&mut pins.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);
|
||||||
|
|
Loading…
Reference in a new issue