aboutsummaryrefslogtreecommitdiff
path: root/embassy-time
diff options
context:
space:
mode:
authorGabriel Smith <[email protected]>2023-10-24 15:20:59 -0400
committerGabriel Smith <[email protected]>2023-10-24 15:34:39 -0400
commitceb0d0bf08ba0cf0cccd4760d446a40b5bb7f322 (patch)
tree68944cfb647074127a27b8dc559883ccbadb39d0 /embassy-time
parentb3879ec22346ac38a409512e147fe8f7137f858a (diff)
time: Add tick rates in multiples of 10 kHz
Diffstat (limited to 'embassy-time')
-rw-r--r--embassy-time/CHANGELOG.md4
-rw-r--r--embassy-time/Cargo.toml19
-rw-r--r--embassy-time/gen_tick.py2
-rw-r--r--embassy-time/src/tick.rs57
4 files changed, 82 insertions, 0 deletions
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.
5The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7 7
8## 0.1.6 - ???
9
10- Added tick rates in multiples of 10 kHz
11
8## 0.1.5 - 2023-10-16 12## 0.1.5 - 2023-10-16
9 13
10- Added `links` key to Cargo.toml, to prevent multiple copies of this crate in the same binary. 14- 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 = []
126tick-hz-131_072_000 = [] 126tick-hz-131_072_000 = []
127tick-hz-262_144_000 = [] 127tick-hz-262_144_000 = []
128tick-hz-524_288_000 = [] 128tick-hz-524_288_000 = []
129tick-hz-20_000 = []
130tick-hz-40_000 = []
131tick-hz-80_000 = []
132tick-hz-160_000 = []
133tick-hz-320_000 = []
134tick-hz-640_000 = []
135tick-hz-1_280_000 = []
136tick-hz-2_560_000 = []
137tick-hz-5_120_000 = []
138tick-hz-10_240_000 = []
139tick-hz-20_480_000 = []
140tick-hz-40_960_000 = []
141tick-hz-81_920_000 = []
142tick-hz-163_840_000 = []
143tick-hz-327_680_000 = []
144tick-hz-655_360_000 = []
145tick-hz-1_310_720_000 = []
146tick-hz-2_621_440_000 = []
147tick-hz-5_242_880_000 = []
129tick-hz-2_000_000 = [] 148tick-hz-2_000_000 = []
130tick-hz-3_000_000 = [] 149tick-hz-3_000_000 = []
131tick-hz-4_000_000 = [] 150tick-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):
13 ticks.append(2**i) 13 ticks.append(2**i)
14for i in range(1, 20): 14for i in range(1, 20):
15 ticks.append(2**i * 1000) 15 ticks.append(2**i * 1000)
16for i in range(1, 20):
17 ticks.append(2**i * 10000)
16for i in range(1, 10): 18for i in range(1, 10):
17 ticks.append(2**i * 1000000) 19 ticks.append(2**i * 1000000)
18 ticks.append(2**i * 9 // 8 * 1000000) 20 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;
106pub const TICK_HZ: u64 = 262_144_000; 106pub const TICK_HZ: u64 = 262_144_000;
107#[cfg(feature = "tick-hz-524_288_000")] 107#[cfg(feature = "tick-hz-524_288_000")]
108pub const TICK_HZ: u64 = 524_288_000; 108pub const TICK_HZ: u64 = 524_288_000;
109#[cfg(feature = "tick-hz-20_000")]
110pub const TICK_HZ: u64 = 20_000;
111#[cfg(feature = "tick-hz-40_000")]
112pub const TICK_HZ: u64 = 40_000;
113#[cfg(feature = "tick-hz-80_000")]
114pub const TICK_HZ: u64 = 80_000;
115#[cfg(feature = "tick-hz-160_000")]
116pub const TICK_HZ: u64 = 160_000;
117#[cfg(feature = "tick-hz-320_000")]
118pub const TICK_HZ: u64 = 320_000;
119#[cfg(feature = "tick-hz-640_000")]
120pub const TICK_HZ: u64 = 640_000;
121#[cfg(feature = "tick-hz-1_280_000")]
122pub const TICK_HZ: u64 = 1_280_000;
123#[cfg(feature = "tick-hz-2_560_000")]
124pub const TICK_HZ: u64 = 2_560_000;
125#[cfg(feature = "tick-hz-5_120_000")]
126pub const TICK_HZ: u64 = 5_120_000;
127#[cfg(feature = "tick-hz-10_240_000")]
128pub const TICK_HZ: u64 = 10_240_000;
129#[cfg(feature = "tick-hz-20_480_000")]
130pub const TICK_HZ: u64 = 20_480_000;
131#[cfg(feature = "tick-hz-40_960_000")]
132pub const TICK_HZ: u64 = 40_960_000;
133#[cfg(feature = "tick-hz-81_920_000")]
134pub const TICK_HZ: u64 = 81_920_000;
135#[cfg(feature = "tick-hz-163_840_000")]
136pub const TICK_HZ: u64 = 163_840_000;
137#[cfg(feature = "tick-hz-327_680_000")]
138pub const TICK_HZ: u64 = 327_680_000;
139#[cfg(feature = "tick-hz-655_360_000")]
140pub const TICK_HZ: u64 = 655_360_000;
141#[cfg(feature = "tick-hz-1_310_720_000")]
142pub const TICK_HZ: u64 = 1_310_720_000;
143#[cfg(feature = "tick-hz-2_621_440_000")]
144pub const TICK_HZ: u64 = 2_621_440_000;
145#[cfg(feature = "tick-hz-5_242_880_000")]
146pub const TICK_HZ: u64 = 5_242_880_000;
109#[cfg(feature = "tick-hz-2_000_000")] 147#[cfg(feature = "tick-hz-2_000_000")]
110pub const TICK_HZ: u64 = 2_000_000; 148pub const TICK_HZ: u64 = 2_000_000;
111#[cfg(feature = "tick-hz-3_000_000")] 149#[cfg(feature = "tick-hz-3_000_000")]
@@ -334,6 +372,25 @@ pub const TICK_HZ: u64 = 980_000_000;
334 feature = "tick-hz-131_072_000", 372 feature = "tick-hz-131_072_000",
335 feature = "tick-hz-262_144_000", 373 feature = "tick-hz-262_144_000",
336 feature = "tick-hz-524_288_000", 374 feature = "tick-hz-524_288_000",
375 feature = "tick-hz-20_000",
376 feature = "tick-hz-40_000",
377 feature = "tick-hz-80_000",
378 feature = "tick-hz-160_000",
379 feature = "tick-hz-320_000",
380 feature = "tick-hz-640_000",
381 feature = "tick-hz-1_280_000",
382 feature = "tick-hz-2_560_000",
383 feature = "tick-hz-5_120_000",
384 feature = "tick-hz-10_240_000",
385 feature = "tick-hz-20_480_000",
386 feature = "tick-hz-40_960_000",
387 feature = "tick-hz-81_920_000",
388 feature = "tick-hz-163_840_000",
389 feature = "tick-hz-327_680_000",
390 feature = "tick-hz-655_360_000",
391 feature = "tick-hz-1_310_720_000",
392 feature = "tick-hz-2_621_440_000",
393 feature = "tick-hz-5_242_880_000",
337 feature = "tick-hz-2_000_000", 394 feature = "tick-hz-2_000_000",
338 feature = "tick-hz-3_000_000", 395 feature = "tick-hz-3_000_000",
339 feature = "tick-hz-4_000_000", 396 feature = "tick-hz-4_000_000",