mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-27 04:10:25 +00:00
Document std/wasm in embassy-time
This commit is contained in:
parent
3b734a7d08
commit
bb6e6fe30b
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user