aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-10-12 08:31:18 +0000
committerGitHub <noreply@github.com>2020-10-12 08:31:18 +0000
commitb8665a2f312d325a9963075614a6c406e9fe3882 (patch)
tree49c91f92ba4a9985815ee72afcb9e09b37a11049 /examples
parent36781cdd890752d6876623d8802b860e950b24eb (diff)
parent1fb42536cfa33e43ec2933f58e03fab23a393435 (diff)
Merge #388
388: Now core contains the same `Peripherals` type based on monotonic r=AfoHT a=korken89 Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/t-schedule-core-stable.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/examples/t-schedule-core-stable.rs b/examples/t-schedule-core-stable.rs
new file mode 100644
index 0000000..c2a8fdb
--- /dev/null
+++ b/examples/t-schedule-core-stable.rs
@@ -0,0 +1,28 @@
+//! [compile-pass] Check `schedule` code generation
+
+#![deny(unsafe_code)]
+#![deny(warnings)]
+#![no_main]
+#![no_std]
+
+use panic_halt as _;
+
+#[rtic::app(device = lm3s6965, monotonic = rtic::cyccnt::CYCCNT)]
+mod app {
+ #[init]
+ fn init(c: init::Context) -> init::LateResources {
+ let _c: rtic::Peripherals = c.core;
+
+ init::LateResources {}
+ }
+
+ #[task]
+ fn some_task(_: some_task::Context) {}
+
+ // RTIC requires that unused interrupts are declared in an extern block when
+ // using software tasks; these free interrupts will be used to dispatch the
+ // software tasks.
+ extern "C" {
+ fn SSI0();
+ }
+}