mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-16 12:55:23 +01:00
Make xtask pass, clean up rtic Cargo.toml
This commit is contained in:
parent
0f5178a48f
commit
82f2f08349
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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue