time: add more tick rates, use 1mhz as default.

This commit is contained in:
Dario Nieuwenhuis
2022-09-02 00:58:31 +02:00
parent 835b69456d
commit 5327b9c289
38 changed files with 418 additions and 135 deletions

View File

@ -11,8 +11,8 @@ features = ["nightly", "defmt", "unstable-traits", "std"]
target = "x86_64-unknown-linux-gnu"
[features]
std = ["tick-1mhz"]
wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:wasm-timer", "tick-1mhz"]
std = ["tick-hz-1_000_000"]
wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:wasm-timer", "tick-hz-1_000_000"]
# Enable nightly-only features
nightly = ["embedded-hal-async"]
@ -26,13 +26,79 @@ unstable-traits = ["embedded-hal-1"]
defmt-timestamp-uptime = ["defmt"]
# Set the `embassy_time` tick rate.
# NOTE: This feature is only intended to be enabled by crates providing the time driver implementation.
# If you're not writing your own driver, check the driver documentation to customize the tick rate.
# If you're writing a driver and your tick rate is not listed here, please add it and send a PR!
tick-32768hz = []
tick-1000hz = []
tick-1mhz = []
tick-16mhz = []
#
# 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 = []
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
[dependencies]
defmt = { version = "0.3", optional = true }