aboutsummaryrefslogtreecommitdiff
path: root/heterogeneous/examples
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-09-04 07:50:13 +0000
committerGitHub <noreply@github.com>2020-09-04 07:50:13 +0000
commit7506bd8ae0ba335fc058c2138438fab5f20f6dab (patch)
treefe65b335b19171370bd6be0bd5cd6b776a1d6110 /heterogeneous/examples
parentc5e6d1fa49e3596227a8ee8fe89e2e4f66db3169 (diff)
parentad2b80907899cc335edcebfc77ae4b4b51272b87 (diff)
Merge #355
355: Multi-core removal r=korken89 a=AfoHT Dependent on https://github.com/rtic-rs/rtic-syntax/pull/27 With the same reasoning as ^^ For now the testing is done against my rtic-syntax/multiremove-branch, but before we merge it should corrected. Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
Diffstat (limited to 'heterogeneous/examples')
-rw-r--r--heterogeneous/examples/smallest.rs7
-rw-r--r--heterogeneous/examples/x-init-2.rs39
-rw-r--r--heterogeneous/examples/x-init.rs26
-rw-r--r--heterogeneous/examples/x-schedule.rs36
-rw-r--r--heterogeneous/examples/x-spawn.rs20
5 files changed, 0 insertions, 128 deletions
diff --git a/heterogeneous/examples/smallest.rs b/heterogeneous/examples/smallest.rs
deleted file mode 100644
index 2074e7d..0000000
--- a/heterogeneous/examples/smallest.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-#![no_main]
-#![no_std]
-
-use panic_halt as _;
-
-#[rtic::app(cores = 2, device = heterogeneous)]
-const APP: () = {};
diff --git a/heterogeneous/examples/x-init-2.rs b/heterogeneous/examples/x-init-2.rs
deleted file mode 100644
index e6ec7fc..0000000
--- a/heterogeneous/examples/x-init-2.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-//! [compile-pass] Cross initialization of late resources
-
-#![deny(unsafe_code)]
-#![deny(warnings)]
-#![no_main]
-#![no_std]
-
-use panic_halt as _;
-
-#[rtic::app(cores = 2, device = heterogeneous)]
-const APP: () = {
- struct Resources {
- // owned by core #1 but initialized by core #0
- x: u32,
-
- // owned by core #0 but initialized by core #1
- y: u32,
- }
-
- #[init(core = 0, late = [x])]
- fn a(_: a::Context) -> a::LateResources {
- a::LateResources { x: 0 }
- }
-
- #[idle(core = 0, resources = [y])]
- fn b(_: b::Context) -> ! {
- loop {}
- }
-
- #[init(core = 1)]
- fn c(_: c::Context) -> c::LateResources {
- c::LateResources { y: 0 }
- }
-
- #[idle(core = 1, resources = [x])]
- fn d(_: d::Context) -> ! {
- loop {}
- }
-};
diff --git a/heterogeneous/examples/x-init.rs b/heterogeneous/examples/x-init.rs
deleted file mode 100644
index 20601b1..0000000
--- a/heterogeneous/examples/x-init.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-//! [compile-pass] Split initialization of late resources
-
-#![deny(unsafe_code)]
-#![deny(warnings)]
-#![no_main]
-#![no_std]
-
-use panic_halt as _;
-
-#[rtic::app(cores = 2, device = heterogeneous)]
-const APP: () = {
- struct Resources {
- x: u32,
- y: u32,
- }
-
- #[init(core = 0, late = [x])]
- fn a(_: a::Context) -> a::LateResources {
- a::LateResources { x: 0 }
- }
-
- #[init(core = 1)]
- fn b(_: b::Context) -> b::LateResources {
- b::LateResources { y: 0 }
- }
-};
diff --git a/heterogeneous/examples/x-schedule.rs b/heterogeneous/examples/x-schedule.rs
deleted file mode 100644
index 98a5f74..0000000
--- a/heterogeneous/examples/x-schedule.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-#![no_main]
-#![no_std]
-
-use panic_halt as _;
-
-#[rtic::app(cores = 2, device = heterogeneous, monotonic = heterogeneous::MT)]
-const APP: () = {
- #[init(core = 0, spawn = [ping])]
- fn init(c: init::Context) {
- c.spawn.ping().ok();
- }
-
- #[task(core = 0, schedule = [ping])]
- fn pong(c: pong::Context) {
- c.schedule.ping(c.scheduled + 1_000_000).ok();
- }
-
- #[task(core = 1, schedule = [pong])]
- fn ping(c: ping::Context) {
- c.schedule.pong(c.scheduled + 1_000_000).ok();
- }
-
- extern "C" {
- #[core = 0]
- fn I0();
-
- #[core = 0]
- fn I1();
-
- #[core = 1]
- fn I0();
-
- #[core = 1]
- fn I1();
- }
-};
diff --git a/heterogeneous/examples/x-spawn.rs b/heterogeneous/examples/x-spawn.rs
deleted file mode 100644
index e258621..0000000
--- a/heterogeneous/examples/x-spawn.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-#![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();
- }
-};