mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-26 13:39:41 +01:00
40 lines
718 B
Rust
40 lines
718 B
Rust
#![deny(unsafe_code)]
|
|
#![deny(warnings)]
|
|
#![feature(const_fn)]
|
|
#![feature(proc_macro)]
|
|
#![no_std]
|
|
|
|
extern crate cortex_m_rtfm as rtfm;
|
|
extern crate panic_itm;
|
|
extern crate stm32f103xx;
|
|
extern crate typenum;
|
|
|
|
use rtfm::{app, Threshold};
|
|
use typenum::consts::U1;
|
|
|
|
app! { //~ error bound `*const (): core::marker::Send` is not satisfied
|
|
device: stm32f103xx,
|
|
|
|
resources: {
|
|
static TOKEN: Option<Threshold<U1>> = None;
|
|
},
|
|
|
|
idle: {
|
|
resources: [TOKEN],
|
|
},
|
|
|
|
tasks: {
|
|
exti0: {
|
|
interrupt: EXTI0,
|
|
resources: [TOKEN],
|
|
},
|
|
}
|
|
}
|
|
|
|
fn init(_ctxt: init::Context) {}
|
|
|
|
fn idle(_ctxt: idle::Context) -> ! {
|
|
loop {}
|
|
}
|
|
|
|
fn exti0(_ctxt: exti0::Context) {}
|