mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
20 lines
331 B
Rust
20 lines
331 B
Rust
#![no_main]
|
|
#![no_std]
|
|
|
|
use panic_halt as _;
|
|
|
|
#[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();
|
|
}
|
|
};
|