2017-07-18 22:14:39 +02:00
|
|
|
// error-pattern: the name `EXTI0` is defined multiple times
|
|
|
|
|
|
|
|
#![deny(warnings)]
|
|
|
|
#![feature(proc_macro)]
|
|
|
|
|
|
|
|
#[macro_use(task)]
|
|
|
|
extern crate cortex_m_rtfm as rtfm;
|
|
|
|
extern crate stm32f103xx;
|
|
|
|
|
|
|
|
use rtfm::{app, Threshold};
|
|
|
|
|
|
|
|
app! {
|
|
|
|
device: stm32f103xx,
|
|
|
|
|
|
|
|
tasks: {
|
|
|
|
EXTI0: {
|
|
|
|
enabled: true,
|
|
|
|
priority: 1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
fn init(_p: init::Peripherals) {}
|
|
|
|
|
|
|
|
fn idle() -> ! {
|
|
|
|
loop {}
|
|
|
|
}
|
|
|
|
|
|
|
|
task!(EXTI0, exti0);
|
|
|
|
|
2017-07-19 03:03:22 +02:00
|
|
|
fn exti0(_t: &mut Threshold, _r: EXTI0::Resources) {}
|
2017-07-18 22:14:39 +02:00
|
|
|
|
|
|
|
task!(EXTI0, exti1);
|
|
|
|
|
2017-07-19 03:03:22 +02:00
|
|
|
fn exti1(_t: &mut Threshold, _r: EXTI0::Resources) {}
|