rtic/homogeneous/examples/x-spawn.rs

21 lines
331 B
Rust
Raw Permalink Normal View History

#![no_main]
#![no_std]
use panic_halt as _;
2019-06-18 10:31:31 +02:00
#[rtfm::app(cores = 2, device = homogeneous)]
const APP: () = {
#[init(core = 0, spawn = [foo])]
fn init(c: init::Context) {
c.spawn.foo().ok();
}
#[task(core = 1)]
fn foo(_: foo::Context) {}
extern "C" {
#[core = 1]
fn I0();
}
};