aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-09-02 00:58:31 +0200
committerDario Nieuwenhuis <[email protected]>2022-09-02 00:59:34 +0200
commit5327b9c289ee69bf07ed384253d03d29af291285 (patch)
tree92c48f9f794b72e94b595bebd2ab21ec48accb14
parent835b69456d6a270e6d5c869da46c0df30fe54254 (diff)
time: add more tick rates, use 1mhz as default.
-rwxr-xr-xci.sh46
-rwxr-xr-xci_stable.sh70
-rw-r--r--embassy-lora/Cargo.toml4
-rw-r--r--embassy-net/Cargo.toml2
-rw-r--r--embassy-nrf/Cargo.toml2
-rw-r--r--embassy-rp/Cargo.toml2
-rw-r--r--embassy-stm32/Cargo.toml2
-rw-r--r--embassy-stm32/src/time_driver.rs4
-rw-r--r--embassy-time/Cargo.toml84
-rw-r--r--embassy-time/gen_tick.py50
-rw-r--r--embassy-time/src/duration.rs24
-rw-r--r--embassy-time/src/instant.rs14
-rw-r--r--embassy-time/src/lib.rs19
-rw-r--r--embassy-time/src/tick.rs182
-rw-r--r--examples/boot/application/stm32f3/Cargo.toml2
-rw-r--r--examples/boot/application/stm32f7/Cargo.toml2
-rw-r--r--examples/boot/application/stm32h7/Cargo.toml2
-rw-r--r--examples/boot/application/stm32l0/Cargo.toml2
-rw-r--r--examples/boot/application/stm32l1/Cargo.toml2
-rw-r--r--examples/boot/application/stm32l4/Cargo.toml2
-rw-r--r--examples/boot/application/stm32wl/Cargo.toml2
-rw-r--r--examples/stm32f0/Cargo.toml2
-rw-r--r--examples/stm32f1/Cargo.toml2
-rw-r--r--examples/stm32f2/Cargo.toml2
-rw-r--r--examples/stm32f3/Cargo.toml2
-rw-r--r--examples/stm32f4/Cargo.toml2
-rw-r--r--examples/stm32f7/Cargo.toml2
-rw-r--r--examples/stm32g0/Cargo.toml2
-rw-r--r--examples/stm32g4/Cargo.toml2
-rw-r--r--examples/stm32h7/Cargo.toml2
-rw-r--r--examples/stm32l0/Cargo.toml2
-rw-r--r--examples/stm32l1/Cargo.toml2
-rw-r--r--examples/stm32l4/Cargo.toml2
-rw-r--r--examples/stm32l5/Cargo.toml2
-rw-r--r--examples/stm32u5/Cargo.toml2
-rw-r--r--examples/stm32wb/Cargo.toml2
-rw-r--r--examples/stm32wl/Cargo.toml2
-rw-r--r--tests/stm32/Cargo.toml2
38 files changed, 418 insertions, 135 deletions
diff --git a/ci.sh b/ci.sh
index 0e2af1e4c..fa24d5268 100755
--- a/ci.sh
+++ b/ci.sh
@@ -36,10 +36,10 @@ cargo batch \
36 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,log \ 36 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,log \
37 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,defmt \ 37 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features nightly,defmt \
38 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt \ 38 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv6m-none-eabi --features nightly,defmt \
39 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,pool-16,embassy-time/tick-1mhz \ 39 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,pool-16 \
40 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,pool-16,embassy-time/tick-1mhz,unstable-traits \ 40 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,pool-16,unstable-traits \
41 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,pool-16,embassy-time/tick-1mhz,nightly \ 41 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,pool-16,nightly \
42 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,pool-16,embassy-time/tick-1mhz,unstable-traits,nightly \ 42 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,pool-16,unstable-traits,nightly \
43 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52805,gpiote,time-driver-rtc1 \ 43 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52805,gpiote,time-driver-rtc1 \
44 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52810,gpiote,time-driver-rtc1 \ 44 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52810,gpiote,time-driver-rtc1 \
45 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52811,gpiote,time-driver-rtc1 \ 45 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nightly,nrf52811,gpiote,time-driver-rtc1 \
@@ -58,25 +58,25 @@ cargo batch \
58 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv6m-none-eabi --features nightly,unstable-traits,log \ 58 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv6m-none-eabi --features nightly,unstable-traits,log \
59 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv6m-none-eabi --features nightly,unstable-traits \ 59 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv6m-none-eabi --features nightly,unstable-traits \
60 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv6m-none-eabi --features nightly \ 60 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv6m-none-eabi --features nightly \
61 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32f410tb,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 61 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32f410tb,defmt,exti,time-driver-any,unstable-traits \
62 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32f411ce,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 62 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32f411ce,defmt,exti,time-driver-any,unstable-traits \
63 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32f429zi,log,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 63 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32f429zi,log,exti,time-driver-any,unstable-traits \
64 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32h755zi-cm7,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 64 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32h755zi-cm7,defmt,exti,time-driver-any,unstable-traits \
65 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32h7b3ai,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 65 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32h7b3ai,defmt,exti,time-driver-any,unstable-traits \
66 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32l476vg,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 66 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32l476vg,defmt,exti,time-driver-any,unstable-traits \
67 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32wb15cc,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 67 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32wb15cc,defmt,exti,time-driver-any,unstable-traits \
68 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32l072cz,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 68 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32l072cz,defmt,exti,time-driver-any,unstable-traits \
69 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32l041f6,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 69 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32l041f6,defmt,exti,time-driver-any,unstable-traits \
70 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32l151cb-a,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 70 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32l151cb-a,defmt,exti,time-driver-any,unstable-traits \
71 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f398ve,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 71 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f398ve,defmt,exti,time-driver-any,unstable-traits \
72 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32g0c1ve,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 72 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32g0c1ve,defmt,exti,time-driver-any,unstable-traits \
73 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f217zg,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 73 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f217zg,defmt,exti,time-driver-any,unstable-traits \
74 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features nightly,stm32l552ze,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 74 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features nightly,stm32l552ze,defmt,exti,time-driver-any,unstable-traits \
75 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32wl54jc-cm0p,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 75 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32wl54jc-cm0p,defmt,exti,time-driver-any,unstable-traits \
76 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32wle5ub,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 76 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32wle5ub,defmt,exti,time-driver-any,unstable-traits \
77 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f107vc,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 77 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f107vc,defmt,exti,time-driver-any,unstable-traits \
78 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f103re,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 78 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f103re,defmt,exti,time-driver-any,unstable-traits \
79 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f100c4,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 79 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f100c4,defmt,exti,time-driver-any,unstable-traits \
80 --- build --release --manifest-path embassy-boot/nrf/Cargo.toml --target thumbv7em-none-eabi --features embassy-nrf/nrf52840 \ 80 --- build --release --manifest-path embassy-boot/nrf/Cargo.toml --target thumbv7em-none-eabi --features embassy-nrf/nrf52840 \
81 --- build --release --manifest-path embassy-boot/stm32/Cargo.toml --target thumbv7em-none-eabi --features embassy-stm32/stm32wl55jc-cm4 \ 81 --- build --release --manifest-path embassy-boot/stm32/Cargo.toml --target thumbv7em-none-eabi --features embassy-stm32/stm32wl55jc-cm4 \
82 --- build --release --manifest-path docs/modules/ROOT/examples/basic/Cargo.toml --target thumbv7em-none-eabi \ 82 --- build --release --manifest-path docs/modules/ROOT/examples/basic/Cargo.toml --target thumbv7em-none-eabi \
diff --git a/ci_stable.sh b/ci_stable.sh
index 02e630520..0332c3faf 100755
--- a/ci_stable.sh
+++ b/ci_stable.sh
@@ -13,8 +13,8 @@ cargo batch \
13 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features log \ 13 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features log \
14 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features defmt \ 14 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv7em-none-eabi --features defmt \
15 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv6m-none-eabi --features defmt \ 15 --- build --release --manifest-path embassy-executor/Cargo.toml --target thumbv6m-none-eabi --features defmt \
16 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,pool-16,embassy-time/tick-1mhz \ 16 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,pool-16 \
17 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,pool-16,embassy-time/tick-1mhz,unstable-traits \ 17 --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet,pool-16,unstable-traits \
18 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52805,gpiote,time-driver-rtc1 \ 18 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52805,gpiote,time-driver-rtc1 \
19 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52810,gpiote,time-driver-rtc1 \ 19 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52810,gpiote,time-driver-rtc1 \
20 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52811,gpiote,time-driver-rtc1 \ 20 --- build --release --manifest-path embassy-nrf/Cargo.toml --target thumbv7em-none-eabi --features nrf52811,gpiote,time-driver-rtc1 \
@@ -32,38 +32,38 @@ cargo batch \
32 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv6m-none-eabi --features unstable-traits,defmt \ 32 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv6m-none-eabi --features unstable-traits,defmt \
33 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv6m-none-eabi --features unstable-traits,log \ 33 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv6m-none-eabi --features unstable-traits,log \
34 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv6m-none-eabi \ 34 --- build --release --manifest-path embassy-rp/Cargo.toml --target thumbv6m-none-eabi \
35 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32g473cc,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 35 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32g473cc,defmt,exti,time-driver-any,unstable-traits \
36 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32g491re,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 36 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32g491re,defmt,exti,time-driver-any,unstable-traits \
37 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32u585zi,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 37 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32u585zi,defmt,exti,time-driver-any,unstable-traits \
38 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wb55vy,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 38 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wb55vy,defmt,exti,time-driver-any,unstable-traits \
39 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wl55uc-cm4,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 39 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wl55uc-cm4,defmt,exti,time-driver-any,unstable-traits \
40 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32l4r9zi,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 40 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32l4r9zi,defmt,exti,time-driver-any,unstable-traits \
41 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f303vc,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 41 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f303vc,defmt,exti,time-driver-any,unstable-traits \
42 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f411ce,defmt,time-driver-any,embassy-time?/tick-32768hz \ 42 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f411ce,defmt,time-driver-any \
43 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f411ce,defmt,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 43 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f411ce,defmt,time-driver-any,unstable-traits \
44 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi,log,time-driver-any,embassy-time?/tick-32768hz \ 44 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi,log,time-driver-any \
45 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi,log,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 45 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi,log,time-driver-any,unstable-traits \
46 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h755zi-cm7,defmt,time-driver-any,embassy-time?/tick-32768hz \ 46 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h755zi-cm7,defmt,time-driver-any \
47 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h755zi-cm7,defmt,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 47 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h755zi-cm7,defmt,time-driver-any,unstable-traits \
48 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32l476vg,defmt,time-driver-any,embassy-time?/tick-32768hz \ 48 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32l476vg,defmt,time-driver-any \
49 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32l476vg,defmt,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 49 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32l476vg,defmt,time-driver-any,unstable-traits \
50 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32l072cz,defmt,time-driver-any,embassy-time?/tick-32768hz \ 50 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32l072cz,defmt,time-driver-any \
51 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32l072cz,defmt,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 51 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32l072cz,defmt,time-driver-any,unstable-traits \
52 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32l151cb-a,defmt,time-driver-any,embassy-time?/tick-32768hz \ 52 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32l151cb-a,defmt,time-driver-any \
53 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32l151cb-a,defmt,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 53 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32l151cb-a,defmt,time-driver-any,unstable-traits \
54 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f410tb,defmt,exti,time-driver-any,embassy-time?/tick-32768hz \ 54 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f410tb,defmt,exti,time-driver-any \
55 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f410tb,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 55 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f410tb,defmt,exti,time-driver-any,unstable-traits \
56 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi,log,exti,time-driver-any,embassy-time?/tick-32768hz \ 56 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi,log,exti,time-driver-any \
57 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi,log,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 57 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f429zi,log,exti,time-driver-any,unstable-traits \
58 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h755zi-cm7,defmt,exti,time-driver-any,embassy-time?/tick-32768hz \ 58 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h755zi-cm7,defmt,exti,time-driver-any \
59 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h755zi-cm7,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 59 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32h755zi-cm7,defmt,exti,time-driver-any,unstable-traits \
60 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32l476vg,defmt,exti,time-driver-any,embassy-time?/tick-32768hz \ 60 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32l476vg,defmt,exti,time-driver-any \
61 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32l476vg,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 61 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32l476vg,defmt,exti,time-driver-any,unstable-traits \
62 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32l072cz,defmt,exti,time-driver-any,embassy-time?/tick-32768hz \ 62 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32l072cz,defmt,exti,time-driver-any \
63 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32l072cz,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 63 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32l072cz,defmt,exti,time-driver-any,unstable-traits \
64 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32l151cb-a,defmt,exti,time-driver-any,embassy-time?/tick-32768hz \ 64 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32l151cb-a,defmt,exti,time-driver-any \
65 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32l151cb-a,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 65 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32l151cb-a,defmt,exti,time-driver-any,unstable-traits \
66 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32f217zg,defmt,exti,time-driver-any,embassy-time?/tick-32768hz \ 66 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32f217zg,defmt,exti,time-driver-any \
67 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32f217zg,defmt,exti,time-driver-any,embassy-time?/tick-32768hz,unstable-traits \ 67 --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32f217zg,defmt,exti,time-driver-any,unstable-traits \
68 --- build --release --manifest-path examples/nrf/Cargo.toml --target thumbv7em-none-eabi --no-default-features --out-dir out/examples/nrf --bin raw_spawn \ 68 --- build --release --manifest-path examples/nrf/Cargo.toml --target thumbv7em-none-eabi --no-default-features --out-dir out/examples/nrf --bin raw_spawn \
69 --- build --release --manifest-path examples/stm32l0/Cargo.toml --target thumbv6m-none-eabi --no-default-features --out-dir out/examples/stm32l0 --bin raw_spawn \ 69 --- build --release --manifest-path examples/stm32l0/Cargo.toml --target thumbv6m-none-eabi --no-default-features --out-dir out/examples/stm32l0 --bin raw_spawn \
diff --git a/embassy-lora/Cargo.toml b/embassy-lora/Cargo.toml
index 9d5e7aed2..15f9237e9 100644
--- a/embassy-lora/Cargo.toml
+++ b/embassy-lora/Cargo.toml
@@ -8,8 +8,8 @@ src_base = "https://github.com/embassy-rs/embassy/blob/embassy-lora-v$VERSION/em
8src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-lora/src/" 8src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-lora/src/"
9features = ["time", "defmt"] 9features = ["time", "defmt"]
10flavors = [ 10flavors = [
11 { name = "sx127x", target = "thumbv7em-none-eabihf", features = ["sx127x", "embassy-stm32/stm32wl55jc-cm4", "embassy-stm32/time-driver-any", "embassy-time/tick-32768hz"] }, 11 { name = "sx127x", target = "thumbv7em-none-eabihf", features = ["sx127x", "embassy-stm32/stm32wl55jc-cm4", "embassy-stm32/time-driver-any"] },
12 { name = "stm32wl", target = "thumbv7em-none-eabihf", features = ["stm32wl", "embassy-stm32/stm32wl55jc-cm4", "embassy-stm32/time-driver-any", "embassy-time/tick-32768hz"] }, 12 { name = "stm32wl", target = "thumbv7em-none-eabihf", features = ["stm32wl", "embassy-stm32/stm32wl55jc-cm4", "embassy-stm32/time-driver-any"] },
13] 13]
14 14
15[lib] 15[lib]
diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml
index 64d78566f..d5b13204e 100644
--- a/embassy-net/Cargo.toml
+++ b/embassy-net/Cargo.toml
@@ -7,7 +7,7 @@ edition = "2021"
7[package.metadata.embassy_docs] 7[package.metadata.embassy_docs]
8src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-v$VERSION/embassy-net/src/" 8src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-v$VERSION/embassy-net/src/"
9src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-net/src/" 9src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-net/src/"
10features = [ "pool-4", "defmt", "tcp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "embassy-time/tick-1mhz"] 10features = ["pool-4", "defmt", "tcp", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip"]
11target = "thumbv7em-none-eabi" 11target = "thumbv7em-none-eabi"
12 12
13[features] 13[features]
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml
index 186c73a58..6fbbc8d9b 100644
--- a/embassy-nrf/Cargo.toml
+++ b/embassy-nrf/Cargo.toml
@@ -57,7 +57,7 @@ _nrf5340-net = ["_nrf5340", "nrf5340-net-pac"]
57_nrf5340 = ["_gpio-p1", "_dppi"] 57_nrf5340 = ["_gpio-p1", "_dppi"]
58_nrf9160 = ["nrf9160-pac", "_dppi"] 58_nrf9160 = ["nrf9160-pac", "_dppi"]
59 59
60_time-driver = ["dep:embassy-time", "embassy-time?/tick-32768hz"] 60_time-driver = ["dep:embassy-time", "embassy-time?/tick-hz-32_768"]
61 61
62_ppi = [] 62_ppi = []
63_dppi = [] 63_dppi = []
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml
index f76e439ab..ccb2f6525 100644
--- a/embassy-rp/Cargo.toml
+++ b/embassy-rp/Cargo.toml
@@ -30,7 +30,7 @@ unstable-traits = ["embedded-hal-1"]
30[dependencies] 30[dependencies]
31embassy-sync = { version = "0.1.0", path = "../embassy-sync" } 31embassy-sync = { version = "0.1.0", path = "../embassy-sync" }
32embassy-executor = { version = "0.1.0", path = "../embassy-executor" } 32embassy-executor = { version = "0.1.0", path = "../embassy-executor" }
33embassy-time = { version = "0.1.0", path = "../embassy-time", features = [ "tick-1mhz" ] } 33embassy-time = { version = "0.1.0", path = "../embassy-time", features = [ "tick-hz-1_000_000" ] }
34embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-2"]} 34embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-2"]}
35embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } 35embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" }
36embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } 36embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" }
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml
index 7a8e5c59b..b4c19f32e 100644
--- a/embassy-stm32/Cargo.toml
+++ b/embassy-stm32/Cargo.toml
@@ -10,7 +10,7 @@ src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-stm32
10# TODO: sdmmc 10# TODO: sdmmc
11# TODO: net 11# TODO: net
12# TODO: subghz 12# TODO: subghz
13features = ["nightly", "defmt", "unstable-pac", "unstable-traits", "exti", "time-driver-any", "embassy-time/tick-32768hz"] 13features = ["nightly", "defmt", "unstable-pac", "unstable-traits", "exti", "time-driver-any"]
14flavors = [ 14flavors = [
15 { regex_feature = "stm32f0.*", target = "thumbv6m-none-eabi" }, 15 { regex_feature = "stm32f0.*", target = "thumbv6m-none-eabi" },
16 { regex_feature = "stm32f1.*", target = "thumbv7m-none-eabi" }, 16 { regex_feature = "stm32f1.*", target = "thumbv7m-none-eabi" },
diff --git a/embassy-stm32/src/time_driver.rs b/embassy-stm32/src/time_driver.rs
index 6989a43d3..ed3225c51 100644
--- a/embassy-stm32/src/time_driver.rs
+++ b/embassy-stm32/src/time_driver.rs
@@ -7,7 +7,7 @@ use atomic_polyfill::{AtomicU32, AtomicU8};
7use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; 7use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
8use embassy_sync::blocking_mutex::Mutex; 8use embassy_sync::blocking_mutex::Mutex;
9use embassy_time::driver::{AlarmHandle, Driver}; 9use embassy_time::driver::{AlarmHandle, Driver};
10use embassy_time::TICKS_PER_SECOND; 10use embassy_time::TICK_HZ;
11use stm32_metapac::timer::regs; 11use stm32_metapac::timer::regs;
12 12
13use crate::interrupt::{CriticalSection, InterruptExt}; 13use crate::interrupt::{CriticalSection, InterruptExt};
@@ -153,7 +153,7 @@ impl RtcDriver {
153 r.cr1().modify(|w| w.set_cen(false)); 153 r.cr1().modify(|w| w.set_cen(false));
154 r.cnt().write(|w| w.set_cnt(0)); 154 r.cnt().write(|w| w.set_cnt(0));
155 155
156 let psc = timer_freq.0 / TICKS_PER_SECOND as u32 - 1; 156 let psc = timer_freq.0 / TICK_HZ as u32 - 1;
157 let psc: u16 = match psc.try_into() { 157 let psc: u16 = match psc.try_into() {
158 Err(_) => panic!("psc division overflow: {}", psc), 158 Err(_) => panic!("psc division overflow: {}", psc),
159 Ok(n) => n, 159 Ok(n) => n,
diff --git a/embassy-time/Cargo.toml b/embassy-time/Cargo.toml
index f0f622aba..6d71e100f 100644
--- a/embassy-time/Cargo.toml
+++ b/embassy-time/Cargo.toml
@@ -11,8 +11,8 @@ features = ["nightly", "defmt", "unstable-traits", "std"]
11target = "x86_64-unknown-linux-gnu" 11target = "x86_64-unknown-linux-gnu"
12 12
13[features] 13[features]
14std = ["tick-1mhz"] 14std = ["tick-hz-1_000_000"]
15wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:wasm-timer", "tick-1mhz"] 15wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:wasm-timer", "tick-hz-1_000_000"]
16 16
17# Enable nightly-only features 17# Enable nightly-only features
18nightly = ["embedded-hal-async"] 18nightly = ["embedded-hal-async"]
@@ -26,13 +26,79 @@ unstable-traits = ["embedded-hal-1"]
26defmt-timestamp-uptime = ["defmt"] 26defmt-timestamp-uptime = ["defmt"]
27 27
28# Set the `embassy_time` tick rate. 28# Set the `embassy_time` tick rate.
29# NOTE: This feature is only intended to be enabled by crates providing the time driver implementation. 29#
30# If you're not writing your own driver, check the driver documentation to customize the tick rate. 30# At most 1 `tick-*` feature can be enabled. If none is enabled, a default of 1MHz is used.
31# If you're writing a driver and your tick rate is not listed here, please add it and send a PR! 31#
32tick-32768hz = [] 32# If the time driver in use supports using arbitrary tick rates, you can enable one `tick-*`
33tick-1000hz = [] 33# feature from your binary crate to set the tick rate. The driver will use configured tick rate.
34tick-1mhz = [] 34# If the time driver supports a fixed tick rate, it will enable one feature itself, so you should
35tick-16mhz = [] 35# not enable one. Check the time driver documentation for details.
36#
37# When using embassy-time from libraries, you should *not* enable any `tick-*` feature, to allow the
38# end user or the driver to pick.
39
40# BEGIN TICKS
41# Generated by gen_tick.py. DO NOT EDIT.
42tick-hz-1 = []
43tick-hz-10 = []
44tick-hz-100 = []
45tick-hz-1_000 = []
46tick-hz-10_000 = []
47tick-hz-100_000 = []
48tick-hz-1_000_000 = []
49tick-hz-10_000_000 = []
50tick-hz-100_000_000 = []
51tick-hz-1_000_000_000 = []
52tick-hz-2 = []
53tick-hz-4 = []
54tick-hz-8 = []
55tick-hz-16 = []
56tick-hz-32 = []
57tick-hz-64 = []
58tick-hz-128 = []
59tick-hz-256 = []
60tick-hz-512 = []
61tick-hz-1_024 = []
62tick-hz-2_048 = []
63tick-hz-4_096 = []
64tick-hz-8_192 = []
65tick-hz-16_384 = []
66tick-hz-32_768 = []
67tick-hz-65_536 = []
68tick-hz-131_072 = []
69tick-hz-262_144 = []
70tick-hz-524_288 = []
71tick-hz-1_048_576 = []
72tick-hz-2_097_152 = []
73tick-hz-4_194_304 = []
74tick-hz-8_388_608 = []
75tick-hz-16_777_216 = []
76tick-hz-2_000_000 = []
77tick-hz-3_000_000 = []
78tick-hz-4_000_000 = []
79tick-hz-6_000_000 = []
80tick-hz-8_000_000 = []
81tick-hz-9_000_000 = []
82tick-hz-12_000_000 = []
83tick-hz-16_000_000 = []
84tick-hz-18_000_000 = []
85tick-hz-24_000_000 = []
86tick-hz-32_000_000 = []
87tick-hz-36_000_000 = []
88tick-hz-48_000_000 = []
89tick-hz-64_000_000 = []
90tick-hz-72_000_000 = []
91tick-hz-96_000_000 = []
92tick-hz-128_000_000 = []
93tick-hz-144_000_000 = []
94tick-hz-192_000_000 = []
95tick-hz-256_000_000 = []
96tick-hz-288_000_000 = []
97tick-hz-384_000_000 = []
98tick-hz-512_000_000 = []
99tick-hz-576_000_000 = []
100tick-hz-768_000_000 = []
101# END TICKS
36 102
37[dependencies] 103[dependencies]
38defmt = { version = "0.3", optional = true } 104defmt = { version = "0.3", optional = true }
diff --git a/embassy-time/gen_tick.py b/embassy-time/gen_tick.py
new file mode 100644
index 000000000..651ebbd72
--- /dev/null
+++ b/embassy-time/gen_tick.py
@@ -0,0 +1,50 @@
1import os
2import toml
3from glob import glob
4
5abspath = os.path.abspath(__file__)
6dname = os.path.dirname(abspath)
7os.chdir(dname)
8
9ticks = []
10for i in range(10):
11 ticks.append(10**i)
12for i in range(1, 25):
13 ticks.append(2**i)
14for i in range(1, 10):
15 ticks.append(2**i * 1000000)
16 ticks.append(2**i * 9 // 8 * 1000000)
17 ticks.append(2**i * 3 // 2 * 1000000)
18
19seen = set()
20ticks = [x for x in ticks if not (x in seen or seen.add(x))]
21
22# ========= Update Cargo.toml
23
24things = {f'tick-hz-{hz:_}': [] for hz in ticks}
25
26SEPARATOR_START = '# BEGIN TICKS\n'
27SEPARATOR_END = '# END TICKS\n'
28HELP = '# Generated by gen_tick.py. DO NOT EDIT.\n'
29with open('Cargo.toml', 'r') as f:
30 data = f.read()
31before, data = data.split(SEPARATOR_START, maxsplit=1)
32_, after = data.split(SEPARATOR_END, maxsplit=1)
33data = before + SEPARATOR_START + HELP + toml.dumps(things) + SEPARATOR_END + after
34with open('Cargo.toml', 'w') as f:
35 f.write(data)
36
37# ========= Update src/tick.rs
38
39with open('src/tick.rs', 'w') as f:
40
41 f.write('// Generated by gen_tick.py. DO NOT EDIT.\n\n')
42 for hz in ticks:
43 f.write(f'#[cfg(feature = "tick-hz-{hz:_}")] pub const TICK_HZ: u64 = {hz:_};\n')
44 f.write('#[cfg(not(any(\n')
45 for hz in ticks:
46 f.write(f'feature = "tick-hz-{hz:_}",\n')
47 f.write(')))] pub const TICK_HZ: u64 = 1_000_000;')
48
49
50os.system('rustfmt src/tick.rs') \ No newline at end of file
diff --git a/embassy-time/src/duration.rs b/embassy-time/src/duration.rs
index dc4f16bd4..d3c6f42a9 100644
--- a/embassy-time/src/duration.rs
+++ b/embassy-time/src/duration.rs
@@ -1,7 +1,7 @@
1use core::fmt; 1use core::fmt;
2use core::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign}; 2use core::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign};
3 3
4use super::{GCD_1K, GCD_1M, TICKS_PER_SECOND}; 4use super::{GCD_1K, GCD_1M, TICK_HZ};
5 5
6#[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)] 6#[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
7#[cfg_attr(feature = "defmt", derive(defmt::Format))] 7#[cfg_attr(feature = "defmt", derive(defmt::Format))]
@@ -23,17 +23,17 @@ impl Duration {
23 23
24 /// Convert the `Duration` to seconds, rounding down. 24 /// Convert the `Duration` to seconds, rounding down.
25 pub const fn as_secs(&self) -> u64 { 25 pub const fn as_secs(&self) -> u64 {
26 self.ticks / TICKS_PER_SECOND 26 self.ticks / TICK_HZ
27 } 27 }
28 28
29 /// Convert the `Duration` to milliseconds, rounding down. 29 /// Convert the `Duration` to milliseconds, rounding down.
30 pub const fn as_millis(&self) -> u64 { 30 pub const fn as_millis(&self) -> u64 {
31 self.ticks * (1000 / GCD_1K) / (TICKS_PER_SECOND / GCD_1K) 31 self.ticks * (1000 / GCD_1K) / (TICK_HZ / GCD_1K)
32 } 32 }
33 33
34 /// Convert the `Duration` to microseconds, rounding down. 34 /// Convert the `Duration` to microseconds, rounding down.
35 pub const fn as_micros(&self) -> u64 { 35 pub const fn as_micros(&self) -> u64 {
36 self.ticks * (1_000_000 / GCD_1M) / (TICKS_PER_SECOND / GCD_1M) 36 self.ticks * (1_000_000 / GCD_1M) / (TICK_HZ / GCD_1M)
37 } 37 }
38 38
39 /// Creates a duration from the specified number of clock ticks 39 /// Creates a duration from the specified number of clock ticks
@@ -43,15 +43,13 @@ impl Duration {
43 43
44 /// Creates a duration from the specified number of seconds, rounding up. 44 /// Creates a duration from the specified number of seconds, rounding up.
45 pub const fn from_secs(secs: u64) -> Duration { 45 pub const fn from_secs(secs: u64) -> Duration {
46 Duration { 46 Duration { ticks: secs * TICK_HZ }
47 ticks: secs * TICKS_PER_SECOND,
48 }
49 } 47 }
50 48
51 /// Creates a duration from the specified number of milliseconds, rounding up. 49 /// Creates a duration from the specified number of milliseconds, rounding up.
52 pub const fn from_millis(millis: u64) -> Duration { 50 pub const fn from_millis(millis: u64) -> Duration {
53 Duration { 51 Duration {
54 ticks: div_ceil(millis * (TICKS_PER_SECOND / GCD_1K), 1000 / GCD_1K), 52 ticks: div_ceil(millis * (TICK_HZ / GCD_1K), 1000 / GCD_1K),
55 } 53 }
56 } 54 }
57 55
@@ -59,21 +57,19 @@ impl Duration {
59 /// NOTE: Delays this small may be inaccurate. 57 /// NOTE: Delays this small may be inaccurate.
60 pub const fn from_micros(micros: u64) -> Duration { 58 pub const fn from_micros(micros: u64) -> Duration {
61 Duration { 59 Duration {
62 ticks: div_ceil(micros * (TICKS_PER_SECOND / GCD_1M), 1_000_000 / GCD_1M), 60 ticks: div_ceil(micros * (TICK_HZ / GCD_1M), 1_000_000 / GCD_1M),
63 } 61 }
64 } 62 }
65 63
66 /// Creates a duration from the specified number of seconds, rounding down. 64 /// Creates a duration from the specified number of seconds, rounding down.
67 pub const fn from_secs_floor(secs: u64) -> Duration { 65 pub const fn from_secs_floor(secs: u64) -> Duration {
68 Duration { 66 Duration { ticks: secs * TICK_HZ }
69 ticks: secs * TICKS_PER_SECOND,
70 }
71 } 67 }
72 68
73 /// Creates a duration from the specified number of milliseconds, rounding down. 69 /// Creates a duration from the specified number of milliseconds, rounding down.
74 pub const fn from_millis_floor(millis: u64) -> Duration { 70 pub const fn from_millis_floor(millis: u64) -> Duration {
75 Duration { 71 Duration {
76 ticks: millis * (TICKS_PER_SECOND / GCD_1K) / (1000 / GCD_1K), 72 ticks: millis * (TICK_HZ / GCD_1K) / (1000 / GCD_1K),
77 } 73 }
78 } 74 }
79 75
@@ -81,7 +77,7 @@ impl Duration {
81 /// NOTE: Delays this small may be inaccurate. 77 /// NOTE: Delays this small may be inaccurate.
82 pub const fn from_micros_floor(micros: u64) -> Duration { 78 pub const fn from_micros_floor(micros: u64) -> Duration {
83 Duration { 79 Duration {
84 ticks: micros * (TICKS_PER_SECOND / GCD_1M) / (1_000_000 / GCD_1M), 80 ticks: micros * (TICK_HZ / GCD_1M) / (1_000_000 / GCD_1M),
85 } 81 }
86 } 82 }
87 83
diff --git a/embassy-time/src/instant.rs b/embassy-time/src/instant.rs
index 6a4925f47..44f226f62 100644
--- a/embassy-time/src/instant.rs
+++ b/embassy-time/src/instant.rs
@@ -1,7 +1,7 @@
1use core::fmt; 1use core::fmt;
2use core::ops::{Add, AddAssign, Sub, SubAssign}; 2use core::ops::{Add, AddAssign, Sub, SubAssign};
3 3
4use super::{driver, Duration, GCD_1K, GCD_1M, TICKS_PER_SECOND}; 4use super::{driver, Duration, GCD_1K, GCD_1M, TICK_HZ};
5 5
6#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)] 6#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
7#[cfg_attr(feature = "defmt", derive(defmt::Format))] 7#[cfg_attr(feature = "defmt", derive(defmt::Format))]
@@ -29,21 +29,21 @@ impl Instant {
29 /// Create an Instant from a microsecond count since system boot. 29 /// Create an Instant from a microsecond count since system boot.
30 pub const fn from_micros(micros: u64) -> Self { 30 pub const fn from_micros(micros: u64) -> Self {
31 Self { 31 Self {
32 ticks: micros * (TICKS_PER_SECOND / GCD_1M) / (1_000_000 / GCD_1M), 32 ticks: micros * (TICK_HZ / GCD_1M) / (1_000_000 / GCD_1M),
33 } 33 }
34 } 34 }
35 35
36 /// Create an Instant from a millisecond count since system boot. 36 /// Create an Instant from a millisecond count since system boot.
37 pub const fn from_millis(millis: u64) -> Self { 37 pub const fn from_millis(millis: u64) -> Self {
38 Self { 38 Self {
39 ticks: millis * (TICKS_PER_SECOND / GCD_1K) / (1000 / GCD_1K), 39 ticks: millis * (TICK_HZ / GCD_1K) / (1000 / GCD_1K),
40 } 40 }
41 } 41 }
42 42
43 /// Create an Instant from a second count since system boot. 43 /// Create an Instant from a second count since system boot.
44 pub const fn from_secs(seconds: u64) -> Self { 44 pub const fn from_secs(seconds: u64) -> Self {
45 Self { 45 Self {
46 ticks: seconds * TICKS_PER_SECOND, 46 ticks: seconds * TICK_HZ,
47 } 47 }
48 } 48 }
49 49
@@ -54,17 +54,17 @@ impl Instant {
54 54
55 /// Seconds since system boot. 55 /// Seconds since system boot.
56 pub const fn as_secs(&self) -> u64 { 56 pub const fn as_secs(&self) -> u64 {
57 self.ticks / TICKS_PER_SECOND 57 self.ticks / TICK_HZ
58 } 58 }
59 59
60 /// Milliseconds since system boot. 60 /// Milliseconds since system boot.
61 pub const fn as_millis(&self) -> u64 { 61 pub const fn as_millis(&self) -> u64 {
62 self.ticks * (1000 / GCD_1K) / (TICKS_PER_SECOND / GCD_1K) 62 self.ticks * (1000 / GCD_1K) / (TICK_HZ / GCD_1K)
63 } 63 }
64 64
65 /// Microseconds since system boot. 65 /// Microseconds since system boot.
66 pub const fn as_micros(&self) -> u64 { 66 pub const fn as_micros(&self) -> u64 {
67 self.ticks * (1_000_000 / GCD_1M) / (TICKS_PER_SECOND / GCD_1M) 67 self.ticks * (1_000_000 / GCD_1M) / (TICK_HZ / GCD_1M)
68 } 68 }
69 69
70 /// Duration between this Instant and another Instant 70 /// Duration between this Instant and another Instant
diff --git a/embassy-time/src/lib.rs b/embassy-time/src/lib.rs
index a6c5d78cc..5b2620986 100644
--- a/embassy-time/src/lib.rs
+++ b/embassy-time/src/lib.rs
@@ -11,6 +11,7 @@ mod delay;
11pub mod driver; 11pub mod driver;
12mod duration; 12mod duration;
13mod instant; 13mod instant;
14mod tick;
14mod timer; 15mod timer;
15 16
16#[cfg(feature = "std")] 17#[cfg(feature = "std")]
@@ -23,25 +24,13 @@ pub use duration::Duration;
23pub use instant::Instant; 24pub use instant::Instant;
24pub use timer::{with_timeout, Ticker, TimeoutError, Timer}; 25pub use timer::{with_timeout, Ticker, TimeoutError, Timer};
25 26
26#[cfg(feature = "tick-1000hz")]
27const TPS: u64 = 1_000;
28
29#[cfg(feature = "tick-32768hz")]
30const TPS: u64 = 32_768;
31
32#[cfg(feature = "tick-1mhz")]
33const TPS: u64 = 1_000_000;
34
35#[cfg(feature = "tick-16mhz")]
36const TPS: u64 = 16_000_000;
37
38/// Ticks per second of the global timebase. 27/// Ticks per second of the global timebase.
39/// 28///
40/// This value is specified by the `tick-*` Cargo features, which 29/// This value is specified by the `tick-*` Cargo features, which
41/// should be set by the time driver. Some drivers support a fixed tick rate, others 30/// should be set by the time driver. Some drivers support a fixed tick rate, others
42/// allow you to choose a tick rate with Cargo features of their own. You should not 31/// allow you to choose a tick rate with Cargo features of their own. You should not
43/// set the `tick-*` features for embassy yourself as an end user. 32/// set the `tick-*` features for embassy yourself as an end user.
44pub const TICKS_PER_SECOND: u64 = TPS; 33pub const TICK_HZ: u64 = tick::TICK_HZ;
45 34
46const fn gcd(a: u64, b: u64) -> u64 { 35const fn gcd(a: u64, b: u64) -> u64 {
47 if b == 0 { 36 if b == 0 {
@@ -51,8 +40,8 @@ const fn gcd(a: u64, b: u64) -> u64 {
51 } 40 }
52} 41}
53 42
54pub(crate) const GCD_1K: u64 = gcd(TICKS_PER_SECOND, 1_000); 43pub(crate) const GCD_1K: u64 = gcd(TICK_HZ, 1_000);
55pub(crate) const GCD_1M: u64 = gcd(TICKS_PER_SECOND, 1_000_000); 44pub(crate) const GCD_1M: u64 = gcd(TICK_HZ, 1_000_000);
56 45
57#[cfg(feature = "defmt-timestamp-uptime")] 46#[cfg(feature = "defmt-timestamp-uptime")]
58defmt::timestamp! {"{=u64:us}", Instant::now().as_micros() } 47defmt::timestamp! {"{=u64:us}", Instant::now().as_micros() }
diff --git a/embassy-time/src/tick.rs b/embassy-time/src/tick.rs
new file mode 100644
index 000000000..a79006506
--- /dev/null
+++ b/embassy-time/src/tick.rs
@@ -0,0 +1,182 @@
1// Generated by gen_tick.py. DO NOT EDIT.
2
3#[cfg(feature = "tick-hz-1")]
4pub const TICK_HZ: u64 = 1;
5#[cfg(feature = "tick-hz-10")]
6pub const TICK_HZ: u64 = 10;
7#[cfg(feature = "tick-hz-100")]
8pub const TICK_HZ: u64 = 100;
9#[cfg(feature = "tick-hz-1_000")]
10pub const TICK_HZ: u64 = 1_000;
11#[cfg(feature = "tick-hz-10_000")]
12pub const TICK_HZ: u64 = 10_000;
13#[cfg(feature = "tick-hz-100_000")]
14pub const TICK_HZ: u64 = 100_000;
15#[cfg(feature = "tick-hz-1_000_000")]
16pub const TICK_HZ: u64 = 1_000_000;
17#[cfg(feature = "tick-hz-10_000_000")]
18pub const TICK_HZ: u64 = 10_000_000;
19#[cfg(feature = "tick-hz-100_000_000")]
20pub const TICK_HZ: u64 = 100_000_000;
21#[cfg(feature = "tick-hz-1_000_000_000")]
22pub const TICK_HZ: u64 = 1_000_000_000;
23#[cfg(feature = "tick-hz-2")]
24pub const TICK_HZ: u64 = 2;
25#[cfg(feature = "tick-hz-4")]
26pub const TICK_HZ: u64 = 4;
27#[cfg(feature = "tick-hz-8")]
28pub const TICK_HZ: u64 = 8;
29#[cfg(feature = "tick-hz-16")]
30pub const TICK_HZ: u64 = 16;
31#[cfg(feature = "tick-hz-32")]
32pub const TICK_HZ: u64 = 32;
33#[cfg(feature = "tick-hz-64")]
34pub const TICK_HZ: u64 = 64;
35#[cfg(feature = "tick-hz-128")]
36pub const TICK_HZ: u64 = 128;
37#[cfg(feature = "tick-hz-256")]
38pub const TICK_HZ: u64 = 256;
39#[cfg(feature = "tick-hz-512")]
40pub const TICK_HZ: u64 = 512;
41#[cfg(feature = "tick-hz-1_024")]
42pub const TICK_HZ: u64 = 1_024;
43#[cfg(feature = "tick-hz-2_048")]
44pub const TICK_HZ: u64 = 2_048;
45#[cfg(feature = "tick-hz-4_096")]
46pub const TICK_HZ: u64 = 4_096;
47#[cfg(feature = "tick-hz-8_192")]
48pub const TICK_HZ: u64 = 8_192;
49#[cfg(feature = "tick-hz-16_384")]
50pub const TICK_HZ: u64 = 16_384;
51#[cfg(feature = "tick-hz-32_768")]
52pub const TICK_HZ: u64 = 32_768;
53#[cfg(feature = "tick-hz-65_536")]
54pub const TICK_HZ: u64 = 65_536;
55#[cfg(feature = "tick-hz-131_072")]
56pub const TICK_HZ: u64 = 131_072;
57#[cfg(feature = "tick-hz-262_144")]
58pub const TICK_HZ: u64 = 262_144;
59#[cfg(feature = "tick-hz-524_288")]
60pub const TICK_HZ: u64 = 524_288;
61#[cfg(feature = "tick-hz-1_048_576")]
62pub const TICK_HZ: u64 = 1_048_576;
63#[cfg(feature = "tick-hz-2_097_152")]
64pub const TICK_HZ: u64 = 2_097_152;
65#[cfg(feature = "tick-hz-4_194_304")]
66pub const TICK_HZ: u64 = 4_194_304;
67#[cfg(feature = "tick-hz-8_388_608")]
68pub const TICK_HZ: u64 = 8_388_608;
69#[cfg(feature = "tick-hz-16_777_216")]
70pub const TICK_HZ: u64 = 16_777_216;
71#[cfg(feature = "tick-hz-2_000_000")]
72pub const TICK_HZ: u64 = 2_000_000;
73#[cfg(feature = "tick-hz-3_000_000")]
74pub const TICK_HZ: u64 = 3_000_000;
75#[cfg(feature = "tick-hz-4_000_000")]
76pub const TICK_HZ: u64 = 4_000_000;
77#[cfg(feature = "tick-hz-6_000_000")]
78pub const TICK_HZ: u64 = 6_000_000;
79#[cfg(feature = "tick-hz-8_000_000")]
80pub const TICK_HZ: u64 = 8_000_000;
81#[cfg(feature = "tick-hz-9_000_000")]
82pub const TICK_HZ: u64 = 9_000_000;
83#[cfg(feature = "tick-hz-12_000_000")]
84pub const TICK_HZ: u64 = 12_000_000;
85#[cfg(feature = "tick-hz-16_000_000")]
86pub const TICK_HZ: u64 = 16_000_000;
87#[cfg(feature = "tick-hz-18_000_000")]
88pub const TICK_HZ: u64 = 18_000_000;
89#[cfg(feature = "tick-hz-24_000_000")]
90pub const TICK_HZ: u64 = 24_000_000;
91#[cfg(feature = "tick-hz-32_000_000")]
92pub const TICK_HZ: u64 = 32_000_000;
93#[cfg(feature = "tick-hz-36_000_000")]
94pub const TICK_HZ: u64 = 36_000_000;
95#[cfg(feature = "tick-hz-48_000_000")]
96pub const TICK_HZ: u64 = 48_000_000;
97#[cfg(feature = "tick-hz-64_000_000")]
98pub const TICK_HZ: u64 = 64_000_000;
99#[cfg(feature = "tick-hz-72_000_000")]
100pub const TICK_HZ: u64 = 72_000_000;
101#[cfg(feature = "tick-hz-96_000_000")]
102pub const TICK_HZ: u64 = 96_000_000;
103#[cfg(feature = "tick-hz-128_000_000")]
104pub const TICK_HZ: u64 = 128_000_000;
105#[cfg(feature = "tick-hz-144_000_000")]
106pub const TICK_HZ: u64 = 144_000_000;
107#[cfg(feature = "tick-hz-192_000_000")]
108pub const TICK_HZ: u64 = 192_000_000;
109#[cfg(feature = "tick-hz-256_000_000")]
110pub const TICK_HZ: u64 = 256_000_000;
111#[cfg(feature = "tick-hz-288_000_000")]
112pub const TICK_HZ: u64 = 288_000_000;
113#[cfg(feature = "tick-hz-384_000_000")]
114pub const TICK_HZ: u64 = 384_000_000;
115#[cfg(feature = "tick-hz-512_000_000")]
116pub const TICK_HZ: u64 = 512_000_000;
117#[cfg(feature = "tick-hz-576_000_000")]
118pub const TICK_HZ: u64 = 576_000_000;
119#[cfg(feature = "tick-hz-768_000_000")]
120pub const TICK_HZ: u64 = 768_000_000;
121#[cfg(not(any(
122 feature = "tick-hz-1",
123 feature = "tick-hz-10",
124 feature = "tick-hz-100",
125 feature = "tick-hz-1_000",
126 feature = "tick-hz-10_000",
127 feature = "tick-hz-100_000",
128 feature = "tick-hz-1_000_000",
129 feature = "tick-hz-10_000_000",
130 feature = "tick-hz-100_000_000",
131 feature = "tick-hz-1_000_000_000",
132 feature = "tick-hz-2",
133 feature = "tick-hz-4",
134 feature = "tick-hz-8",
135 feature = "tick-hz-16",
136 feature = "tick-hz-32",
137 feature = "tick-hz-64",
138 feature = "tick-hz-128",
139 feature = "tick-hz-256",
140 feature = "tick-hz-512",
141 feature = "tick-hz-1_024",
142 feature = "tick-hz-2_048",
143 feature = "tick-hz-4_096",
144 feature = "tick-hz-8_192",
145 feature = "tick-hz-16_384",
146 feature = "tick-hz-32_768",
147 feature = "tick-hz-65_536",
148 feature = "tick-hz-131_072",
149 feature = "tick-hz-262_144",
150 feature = "tick-hz-524_288",
151 feature = "tick-hz-1_048_576",
152 feature = "tick-hz-2_097_152",
153 feature = "tick-hz-4_194_304",
154 feature = "tick-hz-8_388_608",
155 feature = "tick-hz-16_777_216",
156 feature = "tick-hz-2_000_000",
157 feature = "tick-hz-3_000_000",
158 feature = "tick-hz-4_000_000",
159 feature = "tick-hz-6_000_000",
160 feature = "tick-hz-8_000_000",
161 feature = "tick-hz-9_000_000",
162 feature = "tick-hz-12_000_000",
163 feature = "tick-hz-16_000_000",
164 feature = "tick-hz-18_000_000",
165 feature = "tick-hz-24_000_000",
166 feature = "tick-hz-32_000_000",
167 feature = "tick-hz-36_000_000",
168 feature = "tick-hz-48_000_000",
169 feature = "tick-hz-64_000_000",
170 feature = "tick-hz-72_000_000",
171 feature = "tick-hz-96_000_000",
172 feature = "tick-hz-128_000_000",
173 feature = "tick-hz-144_000_000",
174 feature = "tick-hz-192_000_000",
175 feature = "tick-hz-256_000_000",
176 feature = "tick-hz-288_000_000",
177 feature = "tick-hz-384_000_000",
178 feature = "tick-hz-512_000_000",
179 feature = "tick-hz-576_000_000",
180 feature = "tick-hz-768_000_000",
181)))]
182pub const TICK_HZ: u64 = 1_000_000;
diff --git a/examples/boot/application/stm32f3/Cargo.toml b/examples/boot/application/stm32f3/Cargo.toml
index f143d1e8d..ce1e6fe4a 100644
--- a/examples/boot/application/stm32f3/Cargo.toml
+++ b/examples/boot/application/stm32f3/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f303re", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f303re", "time-driver-any", "exti"] }
11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" } 11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
diff --git a/examples/boot/application/stm32f7/Cargo.toml b/examples/boot/application/stm32f7/Cargo.toml
index 29c87eee1..2fc7ae834 100644
--- a/examples/boot/application/stm32f7/Cargo.toml
+++ b/examples/boot/application/stm32f7/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f767zi", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32f767zi", "time-driver-any", "exti"] }
11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" } 11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
diff --git a/examples/boot/application/stm32h7/Cargo.toml b/examples/boot/application/stm32h7/Cargo.toml
index 5669527fe..553edf0aa 100644
--- a/examples/boot/application/stm32h7/Cargo.toml
+++ b/examples/boot/application/stm32h7/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32h743zi", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32h743zi", "time-driver-any", "exti"] }
11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" } 11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
diff --git a/examples/boot/application/stm32l0/Cargo.toml b/examples/boot/application/stm32l0/Cargo.toml
index 48624d5ec..470eca52a 100644
--- a/examples/boot/application/stm32l0/Cargo.toml
+++ b/examples/boot/application/stm32l0/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l072cz", "time-driver-any", "exti", "memory-x"] } 10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l072cz", "time-driver-any", "exti", "memory-x"] }
11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" } 11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
diff --git a/examples/boot/application/stm32l1/Cargo.toml b/examples/boot/application/stm32l1/Cargo.toml
index 00b638ca5..2b4b29357 100644
--- a/examples/boot/application/stm32l1/Cargo.toml
+++ b/examples/boot/application/stm32l1/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l151cb-a", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l151cb-a", "time-driver-any", "exti"] }
11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" } 11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
diff --git a/examples/boot/application/stm32l4/Cargo.toml b/examples/boot/application/stm32l4/Cargo.toml
index 51ba730d5..40bddd194 100644
--- a/examples/boot/application/stm32l4/Cargo.toml
+++ b/examples/boot/application/stm32l4/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l475vg", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32l475vg", "time-driver-any", "exti"] }
11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" } 11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
diff --git a/examples/boot/application/stm32wl/Cargo.toml b/examples/boot/application/stm32wl/Cargo.toml
index 182acf694..5b4a61e8f 100644
--- a/examples/boot/application/stm32wl/Cargo.toml
+++ b/examples/boot/application/stm32wl/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../../../embassy-executor", features = ["nightly", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../../../embassy-time", features = ["nightly", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32wl55jc-cm4", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["unstable-traits", "nightly", "stm32wl55jc-cm4", "time-driver-any", "exti"] }
11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" } 11embassy-boot-stm32 = { version = "0.1.0", path = "../../../../embassy-boot/stm32" }
12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../../../embassy-embedded-hal" }
diff --git a/examples/stm32f0/Cargo.toml b/examples/stm32f0/Cargo.toml
index cd2995d2c..c82b79c86 100644
--- a/examples/stm32f0/Cargo.toml
+++ b/examples/stm32f0/Cargo.toml
@@ -13,6 +13,6 @@ defmt-rtt = "0.3"
13panic-probe = "0.3" 13panic-probe = "0.3"
14embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 14embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
15embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 15embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
16embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-32768hz"] } 16embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
17embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "memory-x", "stm32f030f4", "time-driver-any"] } 17embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "memory-x", "stm32f030f4", "time-driver-any"] }
18 18
diff --git a/examples/stm32f1/Cargo.toml b/examples/stm32f1/Cargo.toml
index 8660e743d..33ac63db1 100644
--- a/examples/stm32f1/Cargo.toml
+++ b/examples/stm32f1/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-any"] } 10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-any"] }
11embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } 11embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
12embassy-usb-serial = { version = "0.1.0", path = "../../embassy-usb-serial", features = ["defmt"] } 12embassy-usb-serial = { version = "0.1.0", path = "../../embassy-usb-serial", features = ["defmt"] }
diff --git a/examples/stm32f2/Cargo.toml b/examples/stm32f2/Cargo.toml
index b4bff4d85..60cd54bd9 100644
--- a/examples/stm32f2/Cargo.toml
+++ b/examples/stm32f2/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f207zg", "unstable-pac", "memory-x", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f207zg", "unstable-pac", "memory-x", "time-driver-any", "exti"] }
11 11
12defmt = "0.3" 12defmt = "0.3"
diff --git a/examples/stm32f3/Cargo.toml b/examples/stm32f3/Cargo.toml
index d152b145f..208f39080 100644
--- a/examples/stm32f3/Cargo.toml
+++ b/examples/stm32f3/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f303ze", "unstable-pac", "memory-x", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32f303ze", "unstable-pac", "memory-x", "time-driver-any", "exti"] }
11embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } 11embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
12embassy-usb-serial = { version = "0.1.0", path = "../../embassy-usb-serial", features = ["defmt"] } 12embassy-usb-serial = { version = "0.1.0", path = "../../embassy-usb-serial", features = ["defmt"] }
diff --git a/examples/stm32f4/Cargo.toml b/examples/stm32f4/Cargo.toml
index 9bfdda92d..ea5c47a43 100644
--- a/examples/stm32f4/Cargo.toml
+++ b/examples/stm32f4/Cargo.toml
@@ -7,7 +7,7 @@ version = "0.1.0"
7[dependencies] 7[dependencies]
8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 8embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-32768hz"] } 10embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] }
11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "unstable-traits", "defmt", "stm32f429zi", "unstable-pac", "memory-x", "time-driver-any", "exti"] } 11embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "unstable-traits", "defmt", "stm32f429zi", "unstable-pac", "memory-x", "time-driver-any", "exti"] }
12 12
13defmt = "0.3" 13defmt = "0.3"
diff --git a/examples/stm32f7/Cargo.toml b/examples/stm32f7/Cargo.toml
index 53ab2f5e7..6c2f846fe 100644
--- a/examples/stm32f7/Cargo.toml
+++ b/examples/stm32f7/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "net", "stm32f767zi", "unstable-pac", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "net", "stm32f767zi", "unstable-pac", "time-driver-any", "exti"] }
11embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "pool-16"] } 11embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "pool-16"] }
12embedded-io = { version = "0.3.0", features = ["async"] } 12embedded-io = { version = "0.3.0", features = ["async"] }
diff --git a/examples/stm32g0/Cargo.toml b/examples/stm32g0/Cargo.toml
index 30f2b86f8..6baf17f36 100644
--- a/examples/stm32g0/Cargo.toml
+++ b/examples/stm32g0/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g071rb", "memory-x", "unstable-pac", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g071rb", "memory-x", "unstable-pac", "exti"] }
11 11
12defmt = "0.3" 12defmt = "0.3"
diff --git a/examples/stm32g4/Cargo.toml b/examples/stm32g4/Cargo.toml
index f81df0b70..d8c05a979 100644
--- a/examples/stm32g4/Cargo.toml
+++ b/examples/stm32g4/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g491re", "memory-x", "unstable-pac", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "time-driver-any", "stm32g491re", "memory-x", "unstable-pac", "exti"] }
11embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" } 11embassy-hal-common = {version = "0.1.0", path = "../../embassy-hal-common" }
12 12
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml
index 18b61120b..fc60d7a88 100644
--- a/examples/stm32h7/Cargo.toml
+++ b/examples/stm32h7/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h743bi", "net", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } 10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h743bi", "net", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] }
11embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "pool-16", "unstable-traits"] } 11embassy-net = { path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "dhcpv4", "medium-ethernet", "pool-16", "unstable-traits"] }
12embedded-io = { version = "0.3.0", features = ["async"] } 12embedded-io = { version = "0.3.0", features = ["async"] }
diff --git a/examples/stm32l0/Cargo.toml b/examples/stm32l0/Cargo.toml
index 11751a21d..086a8f790 100644
--- a/examples/stm32l0/Cargo.toml
+++ b/examples/stm32l0/Cargo.toml
@@ -10,7 +10,7 @@ nightly = ["embassy-stm32/nightly", "embassy-lora", "lorawan-device", "lorawan",
10[dependencies] 10[dependencies]
11embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 11embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
12embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 12embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
13embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-32768hz"] } 13embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
14embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32l072cz", "time-driver-any", "exti", "unstable-traits", "memory-x"] } 14embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32l072cz", "time-driver-any", "exti", "unstable-traits", "memory-x"] }
15embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["sx127x", "time", "defmt"], optional = true} 15embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["sx127x", "time", "defmt"], optional = true}
16 16
diff --git a/examples/stm32l1/Cargo.toml b/examples/stm32l1/Cargo.toml
index 18b35b305..a943c73d2 100644
--- a/examples/stm32l1/Cargo.toml
+++ b/examples/stm32l1/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32l151cb-a", "time-driver-any", "memory-x"] } 10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32l151cb-a", "time-driver-any", "memory-x"] }
11 11
12defmt = "0.3" 12defmt = "0.3"
diff --git a/examples/stm32l4/Cargo.toml b/examples/stm32l4/Cargo.toml
index cb7238e4c..35a9c20f0 100644
--- a/examples/stm32l4/Cargo.toml
+++ b/examples/stm32l4/Cargo.toml
@@ -8,7 +8,7 @@ version = "0.1.0"
8[dependencies] 8[dependencies]
9embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 9embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
10embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 10embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
11embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-32768hz"] } 11embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
12embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal" } 12embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal" }
13embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32l4s5vi", "time-driver-any", "exti", "unstable-traits"] } 13embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32l4s5vi", "time-driver-any", "exti", "unstable-traits"] }
14 14
diff --git a/examples/stm32l5/Cargo.toml b/examples/stm32l5/Cargo.toml
index ea3d5ab88..9ed5ea7e5 100644
--- a/examples/stm32l5/Cargo.toml
+++ b/examples/stm32l5/Cargo.toml
@@ -8,7 +8,7 @@ version = "0.1.0"
8[dependencies] 8[dependencies]
9embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 9embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
10embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 10embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
11embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-32768hz"] } 11embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
12embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32l552ze", "time-driver-any", "exti", "unstable-traits", "memory-x"] } 12embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32l552ze", "time-driver-any", "exti", "unstable-traits", "memory-x"] }
13embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } 13embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] }
14embassy-usb-serial = { version = "0.1.0", path = "../../embassy-usb-serial", features = ["defmt"] } 14embassy-usb-serial = { version = "0.1.0", path = "../../embassy-usb-serial", features = ["defmt"] }
diff --git a/examples/stm32u5/Cargo.toml b/examples/stm32u5/Cargo.toml
index ff0ec9f42..164940586 100644
--- a/examples/stm32u5/Cargo.toml
+++ b/examples/stm32u5/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32u585ai", "time-driver-any", "memory-x" ] } 10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "stm32u585ai", "time-driver-any", "memory-x" ] }
11 11
12defmt = "0.3" 12defmt = "0.3"
diff --git a/examples/stm32wb/Cargo.toml b/examples/stm32wb/Cargo.toml
index 3b10da0ad..923833e46 100644
--- a/examples/stm32wb/Cargo.toml
+++ b/examples/stm32wb/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32wb55cc", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32wb55cc", "time-driver-any", "exti"] }
11 11
12defmt = "0.3" 12defmt = "0.3"
diff --git a/examples/stm32wl/Cargo.toml b/examples/stm32wl/Cargo.toml
index 5f6679f4b..2cd8d692b 100644
--- a/examples/stm32wl/Cargo.toml
+++ b/examples/stm32wl/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6[dependencies] 6[dependencies]
7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 7embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 8embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-32768hz"] } 9embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32wl55jc-cm4", "time-driver-any", "memory-x", "subghz", "unstable-pac", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32wl55jc-cm4", "time-driver-any", "memory-x", "subghz", "unstable-pac", "exti"] }
11embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["stm32wl", "time", "defmt"] } 11embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["stm32wl", "time", "defmt"] }
12 12
diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml
index f1441d00c..d9cd3f120 100644
--- a/tests/stm32/Cargo.toml
+++ b/tests/stm32/Cargo.toml
@@ -15,7 +15,7 @@ stm32u585ai = ["embassy-stm32/stm32u585ai"] # IoT board
15[dependencies] 15[dependencies]
16embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } 16embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] }
17embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } 17embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] }
18embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "tick-32768hz"] } 18embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "tick-hz-32_768"] }
19embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "memory-x", "time-driver-tim2"] } 19embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "unstable-pac", "memory-x", "time-driver-tim2"] }
20 20
21defmt = "0.3.0" 21defmt = "0.3.0"