2018-10 version bumps and compatibility updates

This commit is contained in:
Michael Droogleever
2018-10-13 21:52:24 +02:00
parent cac16f3494
commit da3e868599
21 changed files with 106 additions and 335 deletions

View File

@@ -3,7 +3,7 @@ name = "display"
version = "0.1.0"
[dependencies]
cortex-m-rt="~0.5"
cortex-m-rt="~0.6"
cortex-m-semihosting="~0.3"
panic-semihosting = "~0.3"
microbit="~0.5"
panic-semihosting = "~0.5"
microbit="~0.6"

View File

@@ -4,12 +4,10 @@
extern crate panic_semihosting;
extern crate cortex_m_rt as rt;
extern crate cortex_m_semihosting as sh;
#[macro_use(entry, exception)]
extern crate microbit;
use core::fmt::Write;
use rt::ExceptionFrame;
use rt::entry;
use sh::hio;
use microbit::hal::delay::Delay;
@@ -20,18 +18,6 @@ use microbit::hal::serial;
use microbit::hal::serial::BAUD115200;
use microbit::hal::prelude::*;
exception!(HardFault, hard_fault);
fn hard_fault(ef: &ExceptionFrame) -> ! {
panic!("{:#?}", ef);
}
exception!(*, default_handler);
fn default_handler(irqn: i16) {
panic!("Unhandled exception (IRQn = {})", irqn);
}
type LED = PIN<Output<PushPull>>;
const DEFAULT_DELAY_MS: u32 = 2;
@@ -128,7 +114,7 @@ impl Display {
}
}
entry!(main);
#[entry]
fn main() -> ! {
let mut stdout = hio::hstdout().unwrap();
writeln!(stdout, "Start").unwrap();