rtic/tests/cfail/priority-too-high.rs

31 lines
525 B
Rust
Raw Normal View History

#![deny(unsafe_code)]
2017-07-18 22:14:39 +02:00
#![deny(warnings)]
#![feature(proc_macro)]
2017-07-24 03:51:58 +02:00
#![no_std]
2017-07-18 22:14:39 +02:00
extern crate cortex_m_rtfm as rtfm;
extern crate stm32f103xx;
use rtfm::app;
2017-07-18 22:14:39 +02:00
app! { //~ error attempt to subtract with overflow
//~^ error constant evaluation error
2017-07-18 22:14:39 +02:00
device: stm32f103xx,
tasks: {
SYS_TICK: {
path: sys_tick,
2017-07-18 22:14:39 +02:00
// ERROR priority must be in the range [1, 16]
priority: 17,
},
},
}
fn init(_p: init::Peripherals) {}
fn idle() -> ! {
loop {}
}
fn sys_tick() {}