Merge pull request #3860 from bugadani/docs

Document std/wasm in embassy-time
This commit is contained in:
Dario Nieuwenhuis 2025-02-08 22:42:32 +01:00 committed by GitHub
commit 080942c6a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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`).
@ -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