Skip to content

Commit

Permalink
Add generic-queue-* features back to embassy-time
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Dec 21, 2024
1 parent 6789b51 commit b25ba09
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion embassy-time-queue-driver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ embassy-executor = { version = "0.6.3", path = "../embassy-executor" }
#! The features also set how many timers are used for the generic queue. At most one
#! `generic-queue-*` feature can be enabled. If none is enabled, a default of 64 timers is used.
#!
#! When using embassy-time from libraries, you should *not* enable any `generic-queue-*` feature, to allow the
#! When using embassy-time-queue-driver from libraries, you should *not* enable any `generic-queue-*` feature, to allow the
#! end user to pick.

## Generic Queue with 8 timers
Expand Down
1 change: 0 additions & 1 deletion embassy-time/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- The `generic-queue` and related features have been removed (moved to embassy-time-queue-driver)
- embassy-time no longer provides an `embassy-time-queue-driver` implementation

## 0.3.2 - 2024-08-05
Expand Down
25 changes: 25 additions & 0 deletions embassy-time/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,31 @@ defmt-timestamp-uptime-tus = ["defmt"]
## Create a `MockDriver` that can be manually advanced for testing purposes.
mock-driver = ["tick-hz-1_000_000", "dep:embassy-time-queue-driver"]

#! ### Generic Queue

#! By default embassy-time uses a timer queue implementation that is faster but depends on `embassy-executor`.
#! It will panic if you try to await any timer when using another executor.
#!
#! Alternatively, you can choose to use a "generic" timer queue implementation that works on any executor.
#! To enable it, enable any of the features below.
#!
#! The features also set how many timers are used for the generic queue. At most one
#! `generic-queue-*` feature can be enabled. If none is enabled, a default of 64 timers is used.
#!
#! When using embassy-time from libraries, you should *not* enable any `generic-queue-*` feature, to allow the
#! end user to pick.

## Generic Queue with 8 timers
generic-queue-8 = ["embassy-time-queue-driver/generic-queue-8"]
## Generic Queue with 16 timers
generic-queue-16 = ["embassy-time-queue-driver/generic-queue-16"]
## Generic Queue with 32 timers
generic-queue-32 = ["embassy-time-queue-driver/generic-queue-32"]
## Generic Queue with 64 timers
generic-queue-64 = ["embassy-time-queue-driver/generic-queue-64"]
## Generic Queue with 128 timers
generic-queue-128 = ["embassy-time-queue-driver/generic-queue-128"]

#! ### Tick Rate
#!
#! At most 1 `tick-*` feature can be enabled. If none is enabled, a default of 1MHz is used.
Expand Down

0 comments on commit b25ba09

Please sign in to comment.