diff options
| -rw-r--r-- | embassy-time/Cargo.toml | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/embassy-time/Cargo.toml b/embassy-time/Cargo.toml index a25673ef5..7aaae89f9 100644 --- a/embassy-time/Cargo.toml +++ b/embassy-time/Cargo.toml | |||
| @@ -24,9 +24,6 @@ target = "x86_64-unknown-linux-gnu" | |||
| 24 | features = ["defmt", "std"] | 24 | features = ["defmt", "std"] |
| 25 | 25 | ||
| 26 | [features] | 26 | [features] |
| 27 | std = ["tick-hz-1_000_000", "critical-section/std", "dep:embassy-time-queue-utils"] | ||
| 28 | wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:wasm-timer", "tick-hz-1_000_000", "dep:embassy-time-queue-utils"] | ||
| 29 | |||
| 30 | ## Display the time since startup next to defmt log messages. | 27 | ## Display the time since startup next to defmt log messages. |
| 31 | ## At most 1 `defmt-timestamp-uptime-*` feature can be used. | 28 | ## At most 1 `defmt-timestamp-uptime-*` feature can be used. |
| 32 | ## `defmt-timestamp-uptime` is provided for backwards compatibility (provides the same format as `uptime-us`). | 29 | ## `defmt-timestamp-uptime` is provided for backwards compatibility (provides the same format as `uptime-us`). |
| @@ -39,8 +36,18 @@ defmt-timestamp-uptime-ts = ["defmt"] | |||
| 39 | defmt-timestamp-uptime-tms = ["defmt"] | 36 | defmt-timestamp-uptime-tms = ["defmt"] |
| 40 | defmt-timestamp-uptime-tus = ["defmt"] | 37 | defmt-timestamp-uptime-tus = ["defmt"] |
| 41 | 38 | ||
| 39 | #! ### Time Drivers | ||
| 40 | |||
| 41 | #! Usually, time drivers are defined by a HAL, or a companion crate to the HAL. For `std` and WASM | ||
| 42 | #! environments, as well as for testing purposes, `embassy-time` provides some default time drivers | ||
| 43 | #! that may be suitable for your use case. You can enable one of the following features to use them. | ||
| 44 | |||
| 42 | ## Create a `MockDriver` that can be manually advanced for testing purposes. | 45 | ## Create a `MockDriver` that can be manually advanced for testing purposes. |
| 43 | mock-driver = ["tick-hz-1_000_000", "dep:embassy-time-queue-utils"] | 46 | mock-driver = ["tick-hz-1_000_000", "dep:embassy-time-queue-utils"] |
| 47 | ## Create a time driver for `std` environments. | ||
| 48 | std = ["tick-hz-1_000_000", "critical-section/std", "dep:embassy-time-queue-utils"] | ||
| 49 | ## Create a time driver for WASM. | ||
| 50 | wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:wasm-timer", "tick-hz-1_000_000", "dep:embassy-time-queue-utils"] | ||
| 44 | 51 | ||
| 45 | #! ### Generic Queue | 52 | #! ### Generic Queue |
| 46 | 53 | ||
