Merge pull request #3860 from bugadani/docs
Document std/wasm in embassy-time
This commit is contained in:
commit
080942c6a5
@ -24,9 +24,6 @@ target = "x86_64-unknown-linux-gnu"
|
|||||||
features = ["defmt", "std"]
|
features = ["defmt", "std"]
|
||||||
|
|
||||||
[features]
|
[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.
|
## Display the time since startup next to defmt log messages.
|
||||||
## At most 1 `defmt-timestamp-uptime-*` feature can be used.
|
## 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`).
|
## `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-tms = ["defmt"]
|
||||||
defmt-timestamp-uptime-tus = ["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.
|
## Create a `MockDriver` that can be manually advanced for testing purposes.
|
||||||
mock-driver = ["tick-hz-1_000_000", "dep:embassy-time-queue-utils"]
|
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
|
#! ### Generic Queue
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user