2022-08-17 21:40:16 +00:00
|
|
|
[package]
|
|
|
|
name = "embassy-time"
|
2023-07-05 21:54:45 +00:00
|
|
|
version = "0.1.2"
|
2022-08-17 21:40:16 +00:00
|
|
|
edition = "2021"
|
2022-10-26 20:18:10 +00:00
|
|
|
description = "Instant and Duration for embedded no-std systems, with async timer support"
|
|
|
|
repository = "https://github.com/embassy-rs/embassy"
|
|
|
|
readme = "README.md"
|
2022-10-07 10:41:56 +00:00
|
|
|
license = "MIT OR Apache-2.0"
|
2022-10-26 20:18:10 +00:00
|
|
|
categories = [
|
|
|
|
"embedded",
|
|
|
|
"no-std",
|
|
|
|
"concurrency",
|
|
|
|
"asynchronous",
|
|
|
|
]
|
2022-08-17 21:40:16 +00:00
|
|
|
|
|
|
|
[package.metadata.embassy_docs]
|
|
|
|
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-time-v$VERSION/embassy-time/src/"
|
|
|
|
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-time/src/"
|
|
|
|
features = ["nightly", "defmt", "unstable-traits", "std"]
|
|
|
|
target = "x86_64-unknown-linux-gnu"
|
|
|
|
|
2022-10-26 20:11:08 +00:00
|
|
|
[package.metadata.docs.rs]
|
|
|
|
features = ["nightly", "defmt", "unstable-traits", "std"]
|
|
|
|
|
2022-08-17 21:40:16 +00:00
|
|
|
[features]
|
2023-07-08 10:20:26 +00:00
|
|
|
std = ["tick-hz-1_000_000", "critical-section/std"]
|
2022-09-01 22:58:31 +00:00
|
|
|
wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:wasm-timer", "tick-hz-1_000_000"]
|
2022-08-17 21:40:16 +00:00
|
|
|
|
|
|
|
# Enable nightly-only features
|
|
|
|
nightly = ["embedded-hal-async"]
|
|
|
|
|
|
|
|
# Implement embedded-hal 1.0 alpha and embedded-hal-async traits.
|
|
|
|
# Implement embedded-hal-async traits if `nightly` is set as well.
|
|
|
|
unstable-traits = ["embedded-hal-1"]
|
|
|
|
|
|
|
|
# Display a timestamp of the number of seconds since startup next to defmt log messages
|
|
|
|
# To use this you must have a time driver provided.
|
|
|
|
defmt-timestamp-uptime = ["defmt"]
|
|
|
|
|
2022-09-26 10:46:15 +00:00
|
|
|
# Create a global, generic queue that can be used with any executor
|
2022-09-20 17:23:56 +00:00
|
|
|
# To use this you must have a time driver provided.
|
2022-09-06 18:39:23 +00:00
|
|
|
generic-queue = []
|
|
|
|
|
2022-09-26 10:46:15 +00:00
|
|
|
# Set the number of timers for the generic queue.
|
|
|
|
#
|
|
|
|
# At most 1 `generic-queue-*` feature can be enabled. If none is enabled, a default of 64 timers is used.
|
|
|
|
#
|
|
|
|
# When using embassy-time from libraries, you should *not* enable any `generic-queue-*` feature, to allow the
|
|
|
|
# end user to pick.
|
|
|
|
generic-queue-8 = ["generic-queue"]
|
|
|
|
generic-queue-16 = ["generic-queue"]
|
|
|
|
generic-queue-32 = ["generic-queue"]
|
|
|
|
generic-queue-64 = ["generic-queue"]
|
|
|
|
generic-queue-128 = ["generic-queue"]
|
|
|
|
|
2022-08-17 21:40:16 +00:00
|
|
|
# Set the `embassy_time` tick rate.
|
2022-09-01 22:58:31 +00:00
|
|
|
#
|
|
|
|
# At most 1 `tick-*` feature can be enabled. If none is enabled, a default of 1MHz is used.
|
|
|
|
#
|
|
|
|
# If the time driver in use supports using arbitrary tick rates, you can enable one `tick-*`
|
|
|
|
# feature from your binary crate to set the tick rate. The driver will use configured tick rate.
|
|
|
|
# If the time driver supports a fixed tick rate, it will enable one feature itself, so you should
|
|
|
|
# not enable one. Check the time driver documentation for details.
|
|
|
|
#
|
|
|
|
# When using embassy-time from libraries, you should *not* enable any `tick-*` feature, to allow the
|
|
|
|
# end user or the driver to pick.
|
|
|
|
|
|
|
|
# BEGIN TICKS
|
|
|
|
# Generated by gen_tick.py. DO NOT EDIT.
|
|
|
|
tick-hz-1 = []
|
|
|
|
tick-hz-10 = []
|
|
|
|
tick-hz-100 = []
|
|
|
|
tick-hz-1_000 = []
|
|
|
|
tick-hz-10_000 = []
|
|
|
|
tick-hz-100_000 = []
|
|
|
|
tick-hz-1_000_000 = []
|
|
|
|
tick-hz-10_000_000 = []
|
|
|
|
tick-hz-100_000_000 = []
|
|
|
|
tick-hz-1_000_000_000 = []
|
|
|
|
tick-hz-2 = []
|
|
|
|
tick-hz-4 = []
|
|
|
|
tick-hz-8 = []
|
|
|
|
tick-hz-16 = []
|
|
|
|
tick-hz-32 = []
|
|
|
|
tick-hz-64 = []
|
|
|
|
tick-hz-128 = []
|
|
|
|
tick-hz-256 = []
|
|
|
|
tick-hz-512 = []
|
|
|
|
tick-hz-1_024 = []
|
|
|
|
tick-hz-2_048 = []
|
|
|
|
tick-hz-4_096 = []
|
|
|
|
tick-hz-8_192 = []
|
|
|
|
tick-hz-16_384 = []
|
|
|
|
tick-hz-32_768 = []
|
|
|
|
tick-hz-65_536 = []
|
|
|
|
tick-hz-131_072 = []
|
|
|
|
tick-hz-262_144 = []
|
|
|
|
tick-hz-524_288 = []
|
|
|
|
tick-hz-1_048_576 = []
|
|
|
|
tick-hz-2_097_152 = []
|
|
|
|
tick-hz-4_194_304 = []
|
|
|
|
tick-hz-8_388_608 = []
|
|
|
|
tick-hz-16_777_216 = []
|
2023-03-09 22:32:00 +00:00
|
|
|
tick-hz-2_000 = []
|
|
|
|
tick-hz-4_000 = []
|
|
|
|
tick-hz-8_000 = []
|
|
|
|
tick-hz-16_000 = []
|
|
|
|
tick-hz-32_000 = []
|
|
|
|
tick-hz-64_000 = []
|
|
|
|
tick-hz-128_000 = []
|
|
|
|
tick-hz-256_000 = []
|
|
|
|
tick-hz-512_000 = []
|
|
|
|
tick-hz-1_024_000 = []
|
|
|
|
tick-hz-2_048_000 = []
|
|
|
|
tick-hz-4_096_000 = []
|
|
|
|
tick-hz-8_192_000 = []
|
|
|
|
tick-hz-16_384_000 = []
|
|
|
|
tick-hz-32_768_000 = []
|
|
|
|
tick-hz-65_536_000 = []
|
|
|
|
tick-hz-131_072_000 = []
|
|
|
|
tick-hz-262_144_000 = []
|
|
|
|
tick-hz-524_288_000 = []
|
2022-09-01 22:58:31 +00:00
|
|
|
tick-hz-2_000_000 = []
|
|
|
|
tick-hz-3_000_000 = []
|
|
|
|
tick-hz-4_000_000 = []
|
|
|
|
tick-hz-6_000_000 = []
|
|
|
|
tick-hz-8_000_000 = []
|
|
|
|
tick-hz-9_000_000 = []
|
|
|
|
tick-hz-12_000_000 = []
|
|
|
|
tick-hz-16_000_000 = []
|
|
|
|
tick-hz-18_000_000 = []
|
|
|
|
tick-hz-24_000_000 = []
|
|
|
|
tick-hz-32_000_000 = []
|
|
|
|
tick-hz-36_000_000 = []
|
|
|
|
tick-hz-48_000_000 = []
|
|
|
|
tick-hz-64_000_000 = []
|
|
|
|
tick-hz-72_000_000 = []
|
|
|
|
tick-hz-96_000_000 = []
|
|
|
|
tick-hz-128_000_000 = []
|
|
|
|
tick-hz-144_000_000 = []
|
|
|
|
tick-hz-192_000_000 = []
|
|
|
|
tick-hz-256_000_000 = []
|
|
|
|
tick-hz-288_000_000 = []
|
|
|
|
tick-hz-384_000_000 = []
|
|
|
|
tick-hz-512_000_000 = []
|
|
|
|
tick-hz-576_000_000 = []
|
|
|
|
tick-hz-768_000_000 = []
|
|
|
|
# END TICKS
|
2022-08-17 21:40:16 +00:00
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
defmt = { version = "0.3", optional = true }
|
|
|
|
log = { version = "0.4.14", optional = true }
|
|
|
|
|
|
|
|
embedded-hal-02 = { package = "embedded-hal", version = "0.2.6" }
|
2023-08-15 22:40:56 +00:00
|
|
|
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.1", optional = true}
|
|
|
|
embedded-hal-async = { version = "=1.0.0-rc.1", optional = true}
|
2022-08-17 21:40:16 +00:00
|
|
|
|
|
|
|
futures-util = { version = "0.3.17", default-features = false }
|
|
|
|
atomic-polyfill = "1.0.1"
|
|
|
|
critical-section = "1.1"
|
|
|
|
cfg-if = "1.0.0"
|
2022-09-06 18:39:23 +00:00
|
|
|
heapless = "0.7"
|
2022-08-17 21:40:16 +00:00
|
|
|
|
|
|
|
# WASM dependencies
|
2022-08-23 17:55:49 +00:00
|
|
|
wasm-bindgen = { version = "0.2.81", optional = true }
|
2022-08-17 21:40:16 +00:00
|
|
|
js-sys = { version = "0.3", optional = true }
|
2022-09-29 09:02:43 +00:00
|
|
|
wasm-timer = { version = "0.2.5", optional = true }
|
2022-09-20 17:23:56 +00:00
|
|
|
|
|
|
|
[dev-dependencies]
|
|
|
|
serial_test = "0.9"
|
2022-09-26 10:46:15 +00:00
|
|
|
critical-section = { version = "1.1", features = ["std"] }
|
2023-05-29 17:46:28 +00:00
|
|
|
embassy-executor = { version = "0.2.0", path = "../embassy-executor", features = ["nightly"] }
|