mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-17 21:35:20 +01:00
Now core contains the same Peripherals type based on monotonic
This commit is contained in:
parent
36781cdd89
commit
6d003e20a8
2 changed files with 30 additions and 2 deletions
28
examples/t-schedule-core-stable.rs
Normal file
28
examples/t-schedule-core-stable.rs
Normal file
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue