Updated dwt-systick-monotonic

This commit is contained in:
Emil Fresk 2021-04-07 11:09:21 +02:00
parent 3adda3c766
commit ae691952c3
5 changed files with 10 additions and 25 deletions

View file

@ -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<U8, U0, U0>; // 8 MHz
type MyMono = DwtSystick<8_000_000>; // 8 MHz
#[init]
fn init(cx: init::Context) -> (init::LateResources, init::Monotonics) {

View file

@ -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<U8, U0, U0>; // 8 MHz
type MyMono = DwtSystick<8_000_000>; // 8 MHz
#[init]
fn init(cx: init::Context) -> (init::LateResources, init::Monotonics) {

View file

@ -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<U8, U0, U0>; // 8 MHz
type MyMono = DwtSystick<8_000_000>; // 8 MHz
#[init()]
fn init(cx: init::Context) -> (init::LateResources, init::Monotonics) {

View file

@ -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<U8, U0, U0>; // 8 MHz
type MyMono = DwtSystick<8_000_000>; // 8 MHz
#[init]
fn init(cx: init::Context) -> (init::LateResources, init::Monotonics) {

View file

@ -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<U8, U0, U0>; // 8 MHz
type MyMono = DwtSystick<8_000_000>; // 8 MHz
#[resources]
struct Resources {