From ae691952c328757113047bf696e934316789b844 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Wed, 7 Apr 2021 11:09:21 +0200 Subject: [PATCH] Updated dwt-systick-monotonic --- examples/double_schedule.rs | 7 ++----- examples/periodic.rs | 7 ++----- examples/schedule.rs | 7 ++----- examples/t-schedule.rs | 7 ++----- examples/types.rs | 7 ++----- 5 files changed, 10 insertions(+), 25 deletions(-) diff --git a/examples/double_schedule.rs b/examples/double_schedule.rs index 403f35830f..9da57ae5f1 100644 --- a/examples/double_schedule.rs +++ b/examples/double_schedule.rs @@ -9,14 +9,11 @@ use panic_semihosting as _; #[rtic::app(device = lm3s6965, dispatchers = [SSI0])] mod app { - use dwt_systick_monotonic::{ - consts::{U0, U8}, - DwtSystick, - }; + use dwt_systick_monotonic::DwtSystick; use rtic::time::duration::Seconds; #[monotonic(binds = SysTick, default = true)] - type MyMono = DwtSystick; // 8 MHz + type MyMono = DwtSystick<8_000_000>; // 8 MHz #[init] fn init(cx: init::Context) -> (init::LateResources, init::Monotonics) { diff --git a/examples/periodic.rs b/examples/periodic.rs index 82c21280e1..01061c9fbc 100644 --- a/examples/periodic.rs +++ b/examples/periodic.rs @@ -10,14 +10,11 @@ use panic_semihosting as _; // NOTE: does NOT work on QEMU! #[rtic::app(device = lm3s6965, dispatchers = [SSI0])] mod app { - use dwt_systick_monotonic::{ - consts::{U0, U8}, - DwtSystick, - }; + use dwt_systick_monotonic::DwtSystick; use rtic::time::duration::Seconds; #[monotonic(binds = SysTick, default = true)] - type MyMono = DwtSystick; // 8 MHz + type MyMono = DwtSystick<8_000_000>; // 8 MHz #[init] fn init(cx: init::Context) -> (init::LateResources, init::Monotonics) { diff --git a/examples/schedule.rs b/examples/schedule.rs index d6d4499877..b89e51918d 100644 --- a/examples/schedule.rs +++ b/examples/schedule.rs @@ -11,14 +11,11 @@ use panic_semihosting as _; #[rtic::app(device = lm3s6965, dispatchers = [SSI0])] mod app { use cortex_m_semihosting::hprintln; - use dwt_systick_monotonic::{ - consts::{U0, U8}, - DwtSystick, - }; + use dwt_systick_monotonic::DwtSystick; use rtic::time::duration::Seconds; #[monotonic(binds = SysTick, default = true)] - type MyMono = DwtSystick; // 8 MHz + type MyMono = DwtSystick<8_000_000>; // 8 MHz #[init()] fn init(cx: init::Context) -> (init::LateResources, init::Monotonics) { diff --git a/examples/t-schedule.rs b/examples/t-schedule.rs index 890b3163b2..ef04c45180 100644 --- a/examples/t-schedule.rs +++ b/examples/t-schedule.rs @@ -9,14 +9,11 @@ use panic_semihosting as _; #[rtic::app(device = lm3s6965, dispatchers = [SSI0])] mod app { - use dwt_systick_monotonic::{ - consts::{U0, U8}, - DwtSystick, - }; + use dwt_systick_monotonic::DwtSystick; use rtic::time::duration::Seconds; #[monotonic(binds = SysTick, default = true)] - type MyMono = DwtSystick; // 8 MHz + type MyMono = DwtSystick<8_000_000>; // 8 MHz #[init] fn init(cx: init::Context) -> (init::LateResources, init::Monotonics) { diff --git a/examples/types.rs b/examples/types.rs index ff7deb844d..cdcf80c2e2 100644 --- a/examples/types.rs +++ b/examples/types.rs @@ -10,13 +10,10 @@ use panic_semihosting as _; #[rtic::app(device = lm3s6965, peripherals = true, dispatchers = [SSI0])] mod app { use cortex_m_semihosting::debug; - use dwt_systick_monotonic::{ - consts::{U0, U8}, - DwtSystick, - }; + use dwt_systick_monotonic::DwtSystick; #[monotonic(binds = SysTick, default = true)] - type MyMono = DwtSystick; // 8 MHz + type MyMono = DwtSystick<8_000_000>; // 8 MHz #[resources] struct Resources {