mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
Make xtask pass, clean up rtic Cargo.toml
This commit is contained in:
parent
bf7456fdb6
commit
1c2d9de9c0
5 changed files with 31 additions and 19 deletions
|
@ -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 = []
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue