Skip to content

Commit

Permalink
Merge pull request embassy-rs#3860 from bugadani/docs
Browse files Browse the repository at this point in the history
Document std/wasm in embassy-time
  • Loading branch information
Dirbaio authored Feb 8, 2025
2 parents 3b734a7 + bb6e6fe commit 080942c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions embassy-time/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ target = "x86_64-unknown-linux-gnu"
features = ["defmt", "std"]

[features]
std = ["tick-hz-1_000_000", "critical-section/std", "dep:embassy-time-queue-utils"]
wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:wasm-timer", "tick-hz-1_000_000", "dep:embassy-time-queue-utils"]

## Display the time since startup next to defmt log messages.
## At most 1 `defmt-timestamp-uptime-*` feature can be used.
## `defmt-timestamp-uptime` is provided for backwards compatibility (provides the same format as `uptime-us`).
Expand All @@ -39,8 +36,18 @@ defmt-timestamp-uptime-ts = ["defmt"]
defmt-timestamp-uptime-tms = ["defmt"]
defmt-timestamp-uptime-tus = ["defmt"]

#! ### Time Drivers

#! Usually, time drivers are defined by a HAL, or a companion crate to the HAL. For `std` and WASM
#! environments, as well as for testing purposes, `embassy-time` provides some default time drivers
#! that may be suitable for your use case. You can enable one of the following features to use them.

## Create a `MockDriver` that can be manually advanced for testing purposes.
mock-driver = ["tick-hz-1_000_000", "dep:embassy-time-queue-utils"]
## Create a time driver for `std` environments.
std = ["tick-hz-1_000_000", "critical-section/std", "dep:embassy-time-queue-utils"]
## Create a time driver for WASM.
wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:wasm-timer", "tick-hz-1_000_000", "dep:embassy-time-queue-utils"]

#! ### Generic Queue

Expand Down

0 comments on commit 080942c

Please sign in to comment.