From b9ef831ff780526e6bbc24b60aa69bdcbd82880e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Thu, 28 Sep 2023 09:39:12 +0200 Subject: [PATCH] Add 80MHz tick rate --- embassy-time/CHANGELOG.md | 4 ++++ embassy-time/Cargo.toml | 3 ++- embassy-time/gen_tick.py | 1 + embassy-time/src/tick.rs | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/embassy-time/CHANGELOG.md b/embassy-time/CHANGELOG.md index 8bf02dbc..4389e6ce 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.4 - ??? + +- Added `tick-hz-80_000_000` + ## 0.1.3 - 2023-08-28 - Update `embedded-hal-async` to `1.0.0-rc.1` diff --git a/embassy-time/Cargo.toml b/embassy-time/Cargo.toml index 03aa6ca2..a290509d 100644 --- a/embassy-time/Cargo.toml +++ b/embassy-time/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "embassy-time" -version = "0.1.3" +version = "0.1.4" edition = "2021" description = "Instant and Duration for embedded no-std systems, with async timer support" repository = "https://github.com/embassy-rs/embassy" @@ -145,6 +145,7 @@ tick-hz-384_000_000 = [] tick-hz-512_000_000 = [] tick-hz-576_000_000 = [] tick-hz-768_000_000 = [] +tick-hz-80_000_000 = [] # END TICKS [dependencies] diff --git a/embassy-time/gen_tick.py b/embassy-time/gen_tick.py index 15e65187..804b6bb4 100644 --- a/embassy-time/gen_tick.py +++ b/embassy-time/gen_tick.py @@ -17,6 +17,7 @@ for i in range(1, 10): ticks.append(2**i * 1000000) ticks.append(2**i * 9 // 8 * 1000000) ticks.append(2**i * 3 // 2 * 1000000) +ticks.append(80_000_000) seen = set() ticks = [x for x in ticks if not (x in seen or seen.add(x))] diff --git a/embassy-time/src/tick.rs b/embassy-time/src/tick.rs index 608bc44f..0a4a0276 100644 --- a/embassy-time/src/tick.rs +++ b/embassy-time/src/tick.rs @@ -156,6 +156,8 @@ pub const TICK_HZ: u64 = 512_000_000; pub const TICK_HZ: u64 = 576_000_000; #[cfg(feature = "tick-hz-768_000_000")] pub const TICK_HZ: u64 = 768_000_000; +#[cfg(feature = "tick-hz-80_000_000")] +pub const TICK_HZ: u64 = 80_000_000; #[cfg(not(any( feature = "tick-hz-1", feature = "tick-hz-10", @@ -235,5 +237,6 @@ pub const TICK_HZ: u64 = 768_000_000; feature = "tick-hz-512_000_000", feature = "tick-hz-576_000_000", feature = "tick-hz-768_000_000", + feature = "tick-hz-80_000_000", )))] pub const TICK_HZ: u64 = 1_000_000;