mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-25 19:39:32 +01:00
20 lines
333 B
Rust
20 lines
333 B
Rust
#![no_main]
|
|
#![no_std]
|
|
|
|
use panic_halt as _;
|
|
|
|
#[rtic::app(cores = 2, device = heterogeneous)]
|
|
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();
|
|
}
|
|
};
|