From 6d003e20a83edc064b532d67853f27ec13f4fa4f Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Wed, 7 Oct 2020 15:17:00 +0200 Subject: Now core contains the same `Peripherals` type based on monotonic --- examples/t-schedule-core-stable.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 examples/t-schedule-core-stable.rs (limited to 'examples') 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(); + } +} -- cgit v1.2.3