rtic/homogeneous/examples/x-spawn.rs

21 lines
331 B
Rust
Raw Permalink Normal View History

#![no_main]
#![no_std]
use panic_halt as _;
2020-06-11 19:18:29 +02:00
#[rtic::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();
}
};