#![feature(const_fn)]
#![feature(used)]
#![no_std]
extern crate cortex_m_rt;
#[macro_use]
extern crate cortex_m_rtfm as rtfm;
extern crate f3;
use f3::led::{self, LEDS};
use f3::stm32f30x;
use rtfm::{P0, T0, TMax};
peripherals!(stm32f30x, {
GPIOE: Peripheral {
register_block: Gpioe,
ceiling: C0,
},
RCC: Peripheral {
register_block: Rcc,
ceiling: C0,
},
});
fn init(ref priority: P0, threshold: &TMax) {
let gpioe = GPIOE.access(priority, threshold);
let rcc = RCC.access(priority, threshold);
led::init(&gpioe, &rcc);
}
fn idle(_priority: P0, _threshold: T0) -> ! {
for led in &LEDS {
led.on();
}
loop {
rtfm::wfi();
}
}
tasks!(stm32f30x, {});