mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-26 20:09:33 +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();
|
|
}
|
|
};
|