mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-27 22:15:07 +01:00
21 lines
322 B
Rust
21 lines
322 B
Rust
|
#![no_main]
|
||
|
#![no_std]
|
||
|
|
||
|
use panic_halt as _;
|
||
|
|
||
|
#[rtfm::app(cores = 2, device = mc)]
|
||
|
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();
|
||
|
}
|
||
|
};
|