mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 12:12:50 +01:00
Regression in master on double schedule
This commit is contained in:
parent
7ebdc37683
commit
72ba18b0e8
1 changed files with 37 additions and 0 deletions
37
examples/double_schedule.rs
Normal file
37
examples/double_schedule.rs
Normal file
|
@ -0,0 +1,37 @@
|
|||
//! examples/double_schedule.rs
|
||||
|
||||
#![deny(unsafe_code)]
|
||||
#![deny(warnings)]
|
||||
#![no_main]
|
||||
#![no_std]
|
||||
|
||||
use panic_semihosting as _;
|
||||
use rtic::cyccnt::U32Ext;
|
||||
|
||||
#[rtic::app(device = lm3s6965, monotonic = rtic::cyccnt::CYCCNT)]
|
||||
const APP: () = {
|
||||
struct Resources {
|
||||
nothing: (),
|
||||
}
|
||||
|
||||
#[init(spawn = [task1])]
|
||||
fn init(cx: init::Context) -> init::LateResources {
|
||||
// cx.spawn.task1().ok();
|
||||
|
||||
init::LateResources { nothing: () }
|
||||
}
|
||||
|
||||
#[task(schedule = [task2])]
|
||||
fn task1(_cx: task1::Context) {
|
||||
_cx.schedule.task2(_cx.scheduled + 100.cycles()).ok();
|
||||
}
|
||||
|
||||
#[task(schedule = [task1])]
|
||||
fn task2(_cx: task2::Context) {
|
||||
_cx.schedule.task1(_cx.scheduled + 100.cycles()).ok();
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
fn SSI0();
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue