aboutsummaryrefslogtreecommitdiff
path: root/homogeneous/examples
diff options
context:
space:
mode:
authorHenrik Tjäder <henrik@tjaders.com>2020-09-01 17:09:25 +0000
committerHenrik Tjäder <henrik@tjaders.com>2020-09-01 17:48:53 +0000
commitd2151ccbf935da23d44c183f1ddb185c7ad83bfa (patch)
tree8136a672825057484e201aa8d2a609cf3773672a /homogeneous/examples
parentd06cf91acc1126e66002f8884b1e7b7a65a9b24a (diff)
Remove all of heterogeneous and homogeneous modules
Diffstat (limited to 'homogeneous/examples')
-rw-r--r--homogeneous/examples/smallest.rs7
-rw-r--r--homogeneous/examples/x-init-2.rs39
-rw-r--r--homogeneous/examples/x-init.rs26
-rw-r--r--homogeneous/examples/x-schedule.rs36
-rw-r--r--homogeneous/examples/x-spawn.rs20
5 files changed, 0 insertions, 128 deletions
diff --git a/homogeneous/examples/smallest.rs b/homogeneous/examples/smallest.rs
deleted file mode 100644
index 913e489..0000000
--- a/homogeneous/examples/smallest.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-#![no_main]
-#![no_std]
-
-use panic_halt as _;
-
-#[rtic::app(cores = 2, device = homogeneous)]
-const APP: () = {};
diff --git a/homogeneous/examples/x-init-2.rs b/homogeneous/examples/x-init-2.rs
deleted file mode 100644
index 11caacd..0000000
--- a/homogeneous/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 = homogeneous)]
-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/homogeneous/examples/x-init.rs b/homogeneous/examples/x-init.rs
deleted file mode 100644
index 0574279..0000000
--- a/homogeneous/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 = homogeneous)]
-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/homogeneous/examples/x-schedule.rs b/homogeneous/examples/x-schedule.rs
deleted file mode 100644
index 7c0b384..0000000
--- a/homogeneous/examples/x-schedule.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-#![no_main]
-#![no_std]
-
-use panic_halt as _;
-
-#[rtic::app(cores = 2, device = homogeneous, monotonic = homogeneous::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/homogeneous/examples/x-spawn.rs b/homogeneous/examples/x-spawn.rs
deleted file mode 100644
index 45bc900..0000000
--- a/homogeneous/examples/x-spawn.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-#![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();
- }
-};