aboutsummaryrefslogtreecommitdiff
path: root/homogeneous/examples/x-spawn.rs
blob: a76ac61c399a17c1a661aad8dfe0c12e02c6e183 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#![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();
    }
};