diff --git a/embassy-time/CHANGELOG.md b/embassy-time/CHANGELOG.md index 6e79addf6..1421d76a9 100644 --- a/embassy-time/CHANGELOG.md +++ b/embassy-time/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 0.1.6 - ??? + +- Added tick rates in multiples of 10 kHz + ## 0.1.5 - 2023-10-16 - Added `links` key to Cargo.toml, to prevent multiple copies of this crate in the same binary. diff --git a/embassy-time/Cargo.toml b/embassy-time/Cargo.toml index 87b57d1e1..62404863d 100644 --- a/embassy-time/Cargo.toml +++ b/embassy-time/Cargo.toml @@ -126,6 +126,25 @@ tick-hz-65_536_000 = [] tick-hz-131_072_000 = [] tick-hz-262_144_000 = [] tick-hz-524_288_000 = [] +tick-hz-20_000 = [] +tick-hz-40_000 = [] +tick-hz-80_000 = [] +tick-hz-160_000 = [] +tick-hz-320_000 = [] +tick-hz-640_000 = [] +tick-hz-1_280_000 = [] +tick-hz-2_560_000 = [] +tick-hz-5_120_000 = [] +tick-hz-10_240_000 = [] +tick-hz-20_480_000 = [] +tick-hz-40_960_000 = [] +tick-hz-81_920_000 = [] +tick-hz-163_840_000 = [] +tick-hz-327_680_000 = [] +tick-hz-655_360_000 = [] +tick-hz-1_310_720_000 = [] +tick-hz-2_621_440_000 = [] +tick-hz-5_242_880_000 = [] tick-hz-2_000_000 = [] tick-hz-3_000_000 = [] tick-hz-4_000_000 = [] diff --git a/embassy-time/gen_tick.py b/embassy-time/gen_tick.py index 67a4c79c8..d4a175914 100644 --- a/embassy-time/gen_tick.py +++ b/embassy-time/gen_tick.py @@ -13,6 +13,8 @@ for i in range(1, 25): ticks.append(2**i) for i in range(1, 20): ticks.append(2**i * 1000) +for i in range(1, 20): + ticks.append(2**i * 10000) for i in range(1, 10): ticks.append(2**i * 1000000) ticks.append(2**i * 9 // 8 * 1000000) diff --git a/embassy-time/src/tick.rs b/embassy-time/src/tick.rs index be544181a..834e7c095 100644 --- a/embassy-time/src/tick.rs +++ b/embassy-time/src/tick.rs @@ -106,6 +106,44 @@ pub const TICK_HZ: u64 = 131_072_000; pub const TICK_HZ: u64 = 262_144_000; #[cfg(feature = "tick-hz-524_288_000")] pub const TICK_HZ: u64 = 524_288_000; +#[cfg(feature = "tick-hz-20_000")] +pub const TICK_HZ: u64 = 20_000; +#[cfg(feature = "tick-hz-40_000")] +pub const TICK_HZ: u64 = 40_000; +#[cfg(feature = "tick-hz-80_000")] +pub const TICK_HZ: u64 = 80_000; +#[cfg(feature = "tick-hz-160_000")] +pub const TICK_HZ: u64 = 160_000; +#[cfg(feature = "tick-hz-320_000")] +pub const TICK_HZ: u64 = 320_000; +#[cfg(feature = "tick-hz-640_000")] +pub const TICK_HZ: u64 = 640_000; +#[cfg(feature = "tick-hz-1_280_000")] +pub const TICK_HZ: u64 = 1_280_000; +#[cfg(feature = "tick-hz-2_560_000")] +pub const TICK_HZ: u64 = 2_560_000; +#[cfg(feature = "tick-hz-5_120_000")] +pub const TICK_HZ: u64 = 5_120_000; +#[cfg(feature = "tick-hz-10_240_000")] +pub const TICK_HZ: u64 = 10_240_000; +#[cfg(feature = "tick-hz-20_480_000")] +pub const TICK_HZ: u64 = 20_480_000; +#[cfg(feature = "tick-hz-40_960_000")] +pub const TICK_HZ: u64 = 40_960_000; +#[cfg(feature = "tick-hz-81_920_000")] +pub const TICK_HZ: u64 = 81_920_000; +#[cfg(feature = "tick-hz-163_840_000")] +pub const TICK_HZ: u64 = 163_840_000; +#[cfg(feature = "tick-hz-327_680_000")] +pub const TICK_HZ: u64 = 327_680_000; +#[cfg(feature = "tick-hz-655_360_000")] +pub const TICK_HZ: u64 = 655_360_000; +#[cfg(feature = "tick-hz-1_310_720_000")] +pub const TICK_HZ: u64 = 1_310_720_000; +#[cfg(feature = "tick-hz-2_621_440_000")] +pub const TICK_HZ: u64 = 2_621_440_000; +#[cfg(feature = "tick-hz-5_242_880_000")] +pub const TICK_HZ: u64 = 5_242_880_000; #[cfg(feature = "tick-hz-2_000_000")] pub const TICK_HZ: u64 = 2_000_000; #[cfg(feature = "tick-hz-3_000_000")] @@ -334,6 +372,25 @@ pub const TICK_HZ: u64 = 980_000_000; feature = "tick-hz-131_072_000", feature = "tick-hz-262_144_000", feature = "tick-hz-524_288_000", + feature = "tick-hz-20_000", + feature = "tick-hz-40_000", + feature = "tick-hz-80_000", + feature = "tick-hz-160_000", + feature = "tick-hz-320_000", + feature = "tick-hz-640_000", + feature = "tick-hz-1_280_000", + feature = "tick-hz-2_560_000", + feature = "tick-hz-5_120_000", + feature = "tick-hz-10_240_000", + feature = "tick-hz-20_480_000", + feature = "tick-hz-40_960_000", + feature = "tick-hz-81_920_000", + feature = "tick-hz-163_840_000", + feature = "tick-hz-327_680_000", + feature = "tick-hz-655_360_000", + feature = "tick-hz-1_310_720_000", + feature = "tick-hz-2_621_440_000", + feature = "tick-hz-5_242_880_000", feature = "tick-hz-2_000_000", feature = "tick-hz-3_000_000", feature = "tick-hz-4_000_000",