2020-12-03 21:04:06 +01:00
|
|
|
//! examples/test_new_monotonic.rs
|
|
|
|
|
|
|
|
#![no_main]
|
|
|
|
#![no_std]
|
|
|
|
|
|
|
|
use panic_semihosting as _; // panic handler
|
|
|
|
use rtic::app;
|
|
|
|
|
2020-12-08 20:49:13 +01:00
|
|
|
#[app(device = lm3s6965, dispatchers = [UART])]
|
2020-12-03 21:04:06 +01:00
|
|
|
mod app {
|
2020-12-13 14:52:16 +01:00
|
|
|
#[monotonic(binds = SysTick)]
|
2020-12-10 20:33:13 +01:00
|
|
|
type MyMono1 = hal::Mono1;
|
2020-12-03 21:04:06 +01:00
|
|
|
|
2020-12-10 20:33:13 +01:00
|
|
|
#[monotonic(binds = SomeISR2, default = true)]
|
|
|
|
type MyMono2 = hal::Mono2;
|
2020-12-03 21:04:06 +01:00
|
|
|
|
|
|
|
#[init]
|
2020-12-12 23:31:05 +01:00
|
|
|
fn init(cx: init::Context) -> (init::LateResources, init::Monotonics) {}
|
2020-12-08 20:49:13 +01:00
|
|
|
|
|
|
|
#[task]
|
|
|
|
fn task1(_: task1::Context) {}
|
|
|
|
|
|
|
|
#[task]
|
|
|
|
fn task2(_: task2::Context) {}
|
2020-12-03 21:04:06 +01:00
|
|
|
}
|