#![feature(const_fn)]
#![feature(used)]
#![no_std]
#[macro_use]
extern crate cortex_m;
extern crate cortex_m_rt;
#[macro_use]
extern crate cortex_m_rtfm as rtfm;
extern crate f3;
use f3::stm32f30x;
use rtfm::{P0, T0, TMax};
peripherals!(stm32f30x, {
ITM: Peripheral {
register_block: Itm,
ceiling: C0,
},
});
fn init(ref priority: P0, threshold: &TMax) {
let itm = ITM.access(priority, threshold);
iprintln!(&itm.stim[0], "Hello");
}
fn idle(ref priority: P0, ref threshold: T0) -> ! {
let itm = ITM.access(priority, threshold);
iprintln!(&itm.stim[0], "World");
loop {
rtfm::wfi();
}
}
tasks!(stm32f30x, {});