Make xtask pass, clean up rtic Cargo.toml

This commit is contained in:
Emil Fresk 2023-02-02 20:14:41 +01:00 committed by Henrik Tjäder
parent 0f5178a48f
commit 82f2f08349
5 changed files with 31 additions and 19 deletions

View file

@ -22,3 +22,10 @@ embedded-hal-async = "0.2.0-alpha.0"
fugit = { version = "0.3.6", features = ["defmt"] }
rtic-time = { version = "1.0.0-alpha.0", path = "../rtic-time" }
atomic-polyfill = "1"
[features]
default = ["systick_1khz"]
systick_100hz = []
systick_1khz = []
systick_10khz = []

View file

@ -8,8 +8,15 @@ use cortex_m::peripheral::SYST;
use embedded_hal_async::delay::DelayUs;
pub use fugit::ExtU32;
#[cfg(feature = "systick_100hz")]
const TIMER_HZ: u32 = 100;
#[cfg(feature = "systick_1khz")]
const TIMER_HZ: u32 = 1_000;
#[cfg(feature = "systick_10khz")]
const TIMER_HZ: u32 = 10_000;
/// Systick implementing `rtic_monotonic::Monotonic` which runs at 1 kHz.
pub struct Systick;

View file

@ -35,25 +35,23 @@ name = "rtic"
[dependencies]
cortex-m = "0.7.0"
rtic-macros = { path = "macros", version = "2.0.0-alpha.0" }
rtic-monotonic = "1.0.0"
rtic-core = "1.0.0"
heapless = "0.7.7"
bare-metal = "1.0.0"
#portable-atomic = { version = "0.3.19" }
atomic-polyfill = "1"
rtic-macros = { path = "./macros", version = "2.0.0-alpha.0" }
rtic-core = "1"
[build-dependencies]
version_check = "0.9"
[dev-dependencies]
heapless = "0.7.7"
lm3s6965 = "0.1.3"
cortex-m-semihosting = "0.5.0"
systick-monotonic = "1.0.0"
rtic-time = { path = "../rtic-time" }
rtic-channel = { path = "../rtic-channel" }
rtic-monotonics = { path = "../rtic-monotonics" }
rtic-monotonics = { path = "../rtic-monotonics", default-features = false }
[dev-dependencies.futures]
version = "0.3.26"
@ -94,7 +92,7 @@ overflow-checks = false
lm3s6965 = { git = "https://github.com/japaric/lm3s6965" }
[features]
test-critical-section = ["cortex-m/critical-section-single-core"]
test-critical-section = ["cortex-m/critical-section-single-core", "rtic-monotonics/systick_100hz"]
# [[example]]
# name = "pool"

View file

@ -1,16 +1,16 @@
init
the hal takes a duration of Duration { ticks: 450 }
the hal takes a duration of Duration { ticks: 45 }
timeout
the hal takes a duration of Duration { ticks: 450 }
the hal takes a duration of Duration { ticks: 45 }
hal returned 5
the hal takes a duration of Duration { ticks: 450 }
the hal takes a duration of Duration { ticks: 45 }
hal returned 5
now is Instant { ticks: 2102 }, timeout at Instant { ticks: 2602 }
the hal takes a duration of Duration { ticks: 350 }
hal returned 5 at time Instant { ticks: 2452 }
now is Instant { ticks: 3102 }, timeout at Instant { ticks: 3602 }
the hal takes a duration of Duration { ticks: 450 }
hal returned 5 at time Instant { ticks: 3552 }
now is Instant { ticks: 4102 }, timeout at Instant { ticks: 4602 }
the hal takes a duration of Duration { ticks: 550 }
now is Instant { ticks: 210 }, timeout at Instant { ticks: 260 }
the hal takes a duration of Duration { ticks: 35 }
hal returned 5 at time Instant { ticks: 245 }
now is Instant { ticks: 310 }, timeout at Instant { ticks: 360 }
the hal takes a duration of Duration { ticks: 45 }
hal returned 5 at time Instant { ticks: 355 }
now is Instant { ticks: 410 }, timeout at Instant { ticks: 460 }
the hal takes a duration of Duration { ticks: 55 }
timeout

View file

@ -36,7 +36,7 @@
use cortex_m::{interrupt::InterruptNumber, peripheral::NVIC};
pub use rtic_core::{prelude as mutex_prelude, Exclusive, Mutex};
pub use rtic_macros::app;
pub use rtic_monotonic::{self, Monotonic};
// pub use rtic_monotonic::{self, Monotonic};
/// module `mutex::prelude` provides `Mutex` and multi-lock variants. Recommended over `mutex_prelude`
pub mod mutex {