rtic/homogeneous/examples/x-spawn.rs
2019-06-18 10:31:31 +02:00

20 lines
331 B
Rust

#![no_main]
#![no_std]
use panic_halt as _;
#[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();
}
};