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;