diff options
146 files changed, 658 insertions, 618 deletions
diff --git a/.github/ci/build-xtensa.sh b/.github/ci/build-xtensa.sh index a13391c82..88357a041 100755 --- a/.github/ci/build-xtensa.sh +++ b/.github/ci/build-xtensa.sh | |||
| @@ -13,7 +13,7 @@ export CARGO_TARGET_DIR=/ci/cache/target | |||
| 13 | export CARGO_NET_GIT_FETCH_WITH_CLI=true | 13 | export CARGO_NET_GIT_FETCH_WITH_CLI=true |
| 14 | 14 | ||
| 15 | cargo install espup | 15 | cargo install espup |
| 16 | /ci/cache/cargo/bin/espup install | 16 | /ci/cache/cargo/bin/espup install --toolchain-version 1.83.0.1 |
| 17 | 17 | ||
| 18 | # Restore lockfiles | 18 | # Restore lockfiles |
| 19 | if [ -f /ci/cache/lockfiles.tar ]; then | 19 | if [ -f /ci/cache/lockfiles.tar ]; then |
diff --git a/.github/ci/doc.sh b/.github/ci/doc.sh index 47babe8f5..c92892406 100755 --- a/.github/ci/doc.sh +++ b/.github/ci/doc.sh | |||
| @@ -32,7 +32,7 @@ docserver-builder -i ./embassy-stm32-wpan -o webroot/crates/embassy-stm32-wpan/g | |||
| 32 | 32 | ||
| 33 | docserver-builder -i ./embassy-time -o webroot/crates/embassy-time/git.zup | 33 | docserver-builder -i ./embassy-time -o webroot/crates/embassy-time/git.zup |
| 34 | docserver-builder -i ./embassy-time-driver -o webroot/crates/embassy-time-driver/git.zup | 34 | docserver-builder -i ./embassy-time-driver -o webroot/crates/embassy-time-driver/git.zup |
| 35 | docserver-builder -i ./embassy-time-queue-driver -o webroot/crates/embassy-time-queue-driver/git.zup | 35 | docserver-builder -i ./embassy-time-queue-utils -o webroot/crates/embassy-time-queue-utils/git.zup |
| 36 | 36 | ||
| 37 | docserver-builder -i ./embassy-usb -o webroot/crates/embassy-usb/git.zup | 37 | docserver-builder -i ./embassy-usb -o webroot/crates/embassy-usb/git.zup |
| 38 | docserver-builder -i ./embassy-usb-dfu -o webroot/crates/embassy-usb-dfu/git.zup | 38 | docserver-builder -i ./embassy-usb-dfu -o webroot/crates/embassy-usb-dfu/git.zup |
diff --git a/.github/ci/test.sh b/.github/ci/test.sh index 0fd6820d2..c78865e54 100755 --- a/.github/ci/test.sh +++ b/.github/ci/test.sh | |||
| @@ -17,7 +17,7 @@ cargo test --manifest-path ./embassy-futures/Cargo.toml | |||
| 17 | cargo test --manifest-path ./embassy-sync/Cargo.toml | 17 | cargo test --manifest-path ./embassy-sync/Cargo.toml |
| 18 | cargo test --manifest-path ./embassy-embedded-hal/Cargo.toml | 18 | cargo test --manifest-path ./embassy-embedded-hal/Cargo.toml |
| 19 | cargo test --manifest-path ./embassy-hal-internal/Cargo.toml | 19 | cargo test --manifest-path ./embassy-hal-internal/Cargo.toml |
| 20 | cargo test --manifest-path ./embassy-time/Cargo.toml --features mock-driver,embassy-time-queue-driver/generic-queue-8 | 20 | cargo test --manifest-path ./embassy-time/Cargo.toml --features mock-driver,embassy-time-queue-utils/generic-queue-8 |
| 21 | cargo test --manifest-path ./embassy-time-driver/Cargo.toml | 21 | cargo test --manifest-path ./embassy-time-driver/Cargo.toml |
| 22 | 22 | ||
| 23 | cargo test --manifest-path ./embassy-boot/Cargo.toml | 23 | cargo test --manifest-path ./embassy-boot/Cargo.toml |
diff --git a/ci-xtensa.sh b/ci-xtensa.sh index 056e85d48..6c9807e98 100755 --- a/ci-xtensa.sh +++ b/ci-xtensa.sh | |||
| @@ -22,8 +22,8 @@ cargo batch \ | |||
| 22 | --- build --release --manifest-path embassy-executor/Cargo.toml --target xtensa-esp32-none-elf --features arch-spin,executor-thread \ | 22 | --- build --release --manifest-path embassy-executor/Cargo.toml --target xtensa-esp32-none-elf --features arch-spin,executor-thread \ |
| 23 | --- build --release --manifest-path embassy-sync/Cargo.toml --target xtensa-esp32s2-none-elf --features defmt \ | 23 | --- build --release --manifest-path embassy-sync/Cargo.toml --target xtensa-esp32s2-none-elf --features defmt \ |
| 24 | --- build --release --manifest-path embassy-time/Cargo.toml --target xtensa-esp32s2-none-elf --features defmt,defmt-timestamp-uptime,mock-driver \ | 24 | --- build --release --manifest-path embassy-time/Cargo.toml --target xtensa-esp32s2-none-elf --features defmt,defmt-timestamp-uptime,mock-driver \ |
| 25 | --- build --release --manifest-path embassy-time-queue-driver/Cargo.toml --target xtensa-esp32s2-none-elf \ | 25 | --- build --release --manifest-path embassy-time-queue-utils/Cargo.toml --target xtensa-esp32s2-none-elf \ |
| 26 | --- build --release --manifest-path embassy-time-queue-driver/Cargo.toml --target xtensa-esp32s2-none-elf --features generic-queue-8 \ | 26 | --- build --release --manifest-path embassy-time-queue-utils/Cargo.toml --target xtensa-esp32s2-none-elf --features generic-queue-8 \ |
| 27 | --- build --release --manifest-path embassy-net/Cargo.toml --target xtensa-esp32-none-elf --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet,packet-trace \ | 27 | --- build --release --manifest-path embassy-net/Cargo.toml --target xtensa-esp32-none-elf --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet,packet-trace \ |
| 28 | --- build --release --manifest-path embassy-net/Cargo.toml --target xtensa-esp32-none-elf --features defmt,tcp,udp,dns,proto-ipv4,multicast,medium-ethernet \ | 28 | --- build --release --manifest-path embassy-net/Cargo.toml --target xtensa-esp32-none-elf --features defmt,tcp,udp,dns,proto-ipv4,multicast,medium-ethernet \ |
| 29 | --- build --release --manifest-path embassy-net/Cargo.toml --target xtensa-esp32-none-elf --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \ | 29 | --- build --release --manifest-path embassy-net/Cargo.toml --target xtensa-esp32-none-elf --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \ |
| @@ -39,8 +39,8 @@ cargo batch \ | |||
| 39 | --- build --release --manifest-path embassy-executor/Cargo.toml --target riscv32imac-unknown-none-elf --features arch-riscv32,executor-thread \ | 39 | --- build --release --manifest-path embassy-executor/Cargo.toml --target riscv32imac-unknown-none-elf --features arch-riscv32,executor-thread \ |
| 40 | --- build --release --manifest-path embassy-sync/Cargo.toml --target thumbv6m-none-eabi --features defmt \ | 40 | --- build --release --manifest-path embassy-sync/Cargo.toml --target thumbv6m-none-eabi --features defmt \ |
| 41 | --- build --release --manifest-path embassy-time/Cargo.toml --target thumbv6m-none-eabi --features defmt,defmt-timestamp-uptime,mock-driver \ | 41 | --- build --release --manifest-path embassy-time/Cargo.toml --target thumbv6m-none-eabi --features defmt,defmt-timestamp-uptime,mock-driver \ |
| 42 | --- build --release --manifest-path embassy-time-queue-driver/Cargo.toml --target thumbv6m-none-eabi \ | 42 | --- build --release --manifest-path embassy-time-queue-utils/Cargo.toml --target thumbv6m-none-eabi \ |
| 43 | --- build --release --manifest-path embassy-time-queue-driver/Cargo.toml --target thumbv6m-none-eabi --features generic-queue-8 \ | 43 | --- build --release --manifest-path embassy-time-queue-utils/Cargo.toml --target thumbv6m-none-eabi --features generic-queue-8 \ |
| 44 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet,packet-trace \ | 44 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet,packet-trace \ |
| 45 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,multicast,medium-ethernet \ | 45 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,multicast,medium-ethernet \ |
| 46 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \ | 46 | --- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \ |
diff --git a/cyw43/Cargo.toml b/cyw43/Cargo.toml index 7c0260868..334e1f75e 100644 --- a/cyw43/Cargo.toml +++ b/cyw43/Cargo.toml | |||
| @@ -18,7 +18,7 @@ bluetooth = ["dep:bt-hci", "dep:embedded-io-async"] | |||
| 18 | firmware-logs = [] | 18 | firmware-logs = [] |
| 19 | 19 | ||
| 20 | [dependencies] | 20 | [dependencies] |
| 21 | embassy-time = { version = "0.3.2", path = "../embassy-time"} | 21 | embassy-time = { version = "0.4.0", path = "../embassy-time"} |
| 22 | embassy-sync = { version = "0.6.1", path = "../embassy-sync"} | 22 | embassy-sync = { version = "0.6.1", path = "../embassy-sync"} |
| 23 | embassy-futures = { version = "0.1.0", path = "../embassy-futures"} | 23 | embassy-futures = { version = "0.1.0", path = "../embassy-futures"} |
| 24 | embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel"} | 24 | embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel"} |
diff --git a/docs/examples/basic/Cargo.toml b/docs/examples/basic/Cargo.toml index daf83873d..613fc2041 100644 --- a/docs/examples/basic/Cargo.toml +++ b/docs/examples/basic/Cargo.toml | |||
| @@ -6,8 +6,8 @@ version = "0.1.0" | |||
| 6 | license = "MIT OR Apache-2.0" | 6 | license = "MIT OR Apache-2.0" |
| 7 | 7 | ||
| 8 | [dependencies] | 8 | [dependencies] |
| 9 | embassy-executor = { version = "0.6.3", path = "../../../embassy-executor", features = ["defmt", "arch-cortex-m", "executor-thread"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../../embassy-executor", features = ["defmt", "arch-cortex-m", "executor-thread"] } |
| 10 | embassy-time = { version = "0.3.2", path = "../../../embassy-time", features = ["defmt"] } | 10 | embassy-time = { version = "0.4.0", path = "../../../embassy-time", features = ["defmt"] } |
| 11 | embassy-nrf = { version = "0.2.0", path = "../../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote"] } | 11 | embassy-nrf = { version = "0.2.0", path = "../../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote"] } |
| 12 | 12 | ||
| 13 | defmt = "0.3" | 13 | defmt = "0.3" |
diff --git a/docs/pages/faq.adoc b/docs/pages/faq.adoc index 3e32563cc..ed88515d0 100644 --- a/docs/pages/faq.adoc +++ b/docs/pages/faq.adoc | |||
| @@ -140,9 +140,9 @@ Example: | |||
| 140 | [source,toml] | 140 | [source,toml] |
| 141 | ---- | 141 | ---- |
| 142 | [patch.crates-io] | 142 | [patch.crates-io] |
| 143 | embassy-time-queue-driver = { git = "https://github.com/embassy-rs/embassy.git", rev = "e5fdd35" } | 143 | embassy-time-queue-utils = { git = "https://github.com/embassy-rs/embassy.git", rev = "7f8af8a" } |
| 144 | embassy-time-driver = { git = "https://github.com/embassy-rs/embassy.git", rev = "e5fdd35" } | 144 | embassy-time-driver = { git = "https://github.com/embassy-rs/embassy.git", rev = "7f8af8a" } |
| 145 | # embassy-time = { git = "https://github.com/embassy-rs/embassy.git", rev = "e5fdd35" } | 145 | # embassy-time = { git = "https://github.com/embassy-rs/embassy.git", rev = "7f8af8a" } |
| 146 | ---- | 146 | ---- |
| 147 | 147 | ||
| 148 | Note that the git revision should match any other embassy patches or git dependencies that you are using! | 148 | Note that the git revision should match any other embassy patches or git dependencies that you are using! |
diff --git a/embassy-boot-rp/Cargo.toml b/embassy-boot-rp/Cargo.toml index fa603047e..23994c171 100644 --- a/embassy-boot-rp/Cargo.toml +++ b/embassy-boot-rp/Cargo.toml | |||
| @@ -27,7 +27,7 @@ log = { version = "0.4", optional = true } | |||
| 27 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } | 27 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } |
| 28 | embassy-rp = { version = "0.2.0", path = "../embassy-rp", default-features = false } | 28 | embassy-rp = { version = "0.2.0", path = "../embassy-rp", default-features = false } |
| 29 | embassy-boot = { version = "0.3.0", path = "../embassy-boot" } | 29 | embassy-boot = { version = "0.3.0", path = "../embassy-boot" } |
| 30 | embassy-time = { version = "0.3.2", path = "../embassy-time" } | 30 | embassy-time = { version = "0.4.0", path = "../embassy-time" } |
| 31 | 31 | ||
| 32 | cortex-m = { version = "0.7.6" } | 32 | cortex-m = { version = "0.7.6" } |
| 33 | cortex-m-rt = { version = "0.7" } | 33 | cortex-m-rt = { version = "0.7" } |
diff --git a/embassy-boot-rp/src/lib.rs b/embassy-boot-rp/src/lib.rs index 3e1731f5e..6ec33a580 100644 --- a/embassy-boot-rp/src/lib.rs +++ b/embassy-boot-rp/src/lib.rs | |||
| @@ -14,7 +14,10 @@ use embassy_time::Duration; | |||
| 14 | use embedded_storage::nor_flash::{ErrorType, NorFlash, ReadNorFlash}; | 14 | use embedded_storage::nor_flash::{ErrorType, NorFlash, ReadNorFlash}; |
| 15 | 15 | ||
| 16 | /// A bootloader for RP2040 devices. | 16 | /// A bootloader for RP2040 devices. |
| 17 | pub struct BootLoader<const BUFFER_SIZE: usize = ERASE_SIZE>; | 17 | pub struct BootLoader<const BUFFER_SIZE: usize = ERASE_SIZE> { |
| 18 | /// The reported state of the bootloader after preparing for boot | ||
| 19 | pub state: State, | ||
| 20 | } | ||
| 18 | 21 | ||
| 19 | impl<const BUFFER_SIZE: usize> BootLoader<BUFFER_SIZE> { | 22 | impl<const BUFFER_SIZE: usize> BootLoader<BUFFER_SIZE> { |
| 20 | /// Inspect the bootloader state and perform actions required before booting, such as swapping firmware | 23 | /// Inspect the bootloader state and perform actions required before booting, such as swapping firmware |
| @@ -36,8 +39,8 @@ impl<const BUFFER_SIZE: usize> BootLoader<BUFFER_SIZE> { | |||
| 36 | ) -> Result<Self, BootError> { | 39 | ) -> Result<Self, BootError> { |
| 37 | let mut aligned_buf = AlignedBuffer([0; BUFFER_SIZE]); | 40 | let mut aligned_buf = AlignedBuffer([0; BUFFER_SIZE]); |
| 38 | let mut boot = embassy_boot::BootLoader::new(config); | 41 | let mut boot = embassy_boot::BootLoader::new(config); |
| 39 | let _state = boot.prepare_boot(aligned_buf.as_mut())?; | 42 | let state = boot.prepare_boot(aligned_buf.as_mut())?; |
| 40 | Ok(Self) | 43 | Ok(Self { state }) |
| 41 | } | 44 | } |
| 42 | 45 | ||
| 43 | /// Boots the application. | 46 | /// Boots the application. |
diff --git a/embassy-embedded-hal/Cargo.toml b/embassy-embedded-hal/Cargo.toml index b7728c411..0407bd5b6 100644 --- a/embassy-embedded-hal/Cargo.toml +++ b/embassy-embedded-hal/Cargo.toml | |||
| @@ -15,21 +15,16 @@ categories = [ | |||
| 15 | [package.metadata.embassy_docs] | 15 | [package.metadata.embassy_docs] |
| 16 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-embedded-hal-v$VERSION/embassy-embedded-hal/src/" | 16 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-embedded-hal-v$VERSION/embassy-embedded-hal/src/" |
| 17 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-embedded-hal/src/" | 17 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-embedded-hal/src/" |
| 18 | features = ["std"] | ||
| 19 | target = "x86_64-unknown-linux-gnu" | 18 | target = "x86_64-unknown-linux-gnu" |
| 20 | 19 | ||
| 21 | [package.metadata.docs.rs] | ||
| 22 | features = ["std"] | ||
| 23 | |||
| 24 | [features] | 20 | [features] |
| 25 | std = [] | ||
| 26 | time = ["dep:embassy-time"] | 21 | time = ["dep:embassy-time"] |
| 27 | default = ["time"] | 22 | default = ["time"] |
| 28 | 23 | ||
| 29 | [dependencies] | 24 | [dependencies] |
| 30 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 25 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| 31 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } | 26 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } |
| 32 | embassy-time = { version = "0.3.2", path = "../embassy-time", optional = true } | 27 | embassy-time = { version = "0.4.0", path = "../embassy-time", optional = true } |
| 33 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = [ | 28 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = [ |
| 34 | "unproven", | 29 | "unproven", |
| 35 | ] } | 30 | ] } |
diff --git a/embassy-embedded-hal/src/lib.rs b/embassy-embedded-hal/src/lib.rs index 99a2d93c7..1db4fe012 100644 --- a/embassy-embedded-hal/src/lib.rs +++ b/embassy-embedded-hal/src/lib.rs | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #![cfg_attr(not(feature = "std"), no_std)] | 1 | #![no_std] |
| 2 | #![allow(async_fn_in_trait)] | 2 | #![allow(async_fn_in_trait)] |
| 3 | #![warn(missing_docs)] | 3 | #![warn(missing_docs)] |
| 4 | #![doc = include_str!("../README.md")] | 4 | #![doc = include_str!("../README.md")] |
diff --git a/embassy-executor/CHANGELOG.md b/embassy-executor/CHANGELOG.md index 59ea88d0c..ee8003a54 100644 --- a/embassy-executor/CHANGELOG.md +++ b/embassy-executor/CHANGELOG.md | |||
| @@ -5,12 +5,13 @@ All notable changes to this project will be documented in this file. | |||
| 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
| 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | 7 | ||
| 8 | ## Unreleased | 8 | ## 0.7.0 - 2024-12-22 |
| 9 | 9 | ||
| 10 | - embassy-executor no longer provides an `embassy-time-queue-driver` implementation | 10 | - embassy-executor no longer provides an `embassy-time-queue-driver` implementation |
| 11 | - Added `TaskRef::executor` to obtain a reference to a task's executor | 11 | - Added `TaskRef::executor` to obtain a reference to a task's executor |
| 12 | - integrated-timers are no longer processed when polling the executor. | 12 | - integrated-timers are no longer processed when polling the executor. |
| 13 | - Added the option to store data in timer queue items | 13 | - Added the option to store data in timer queue items |
| 14 | - Added `timer-item-payload-size-X` features for time driver implementors | ||
| 14 | 15 | ||
| 15 | ## 0.6.3 - 2024-11-12 | 16 | ## 0.6.3 - 2024-11-12 |
| 16 | 17 | ||
diff --git a/embassy-executor/Cargo.toml b/embassy-executor/Cargo.toml index 5effaca65..d6f24ce84 100644 --- a/embassy-executor/Cargo.toml +++ b/embassy-executor/Cargo.toml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | name = "embassy-executor" | 2 | name = "embassy-executor" |
| 3 | version = "0.6.3" | 3 | version = "0.7.0" |
| 4 | edition = "2021" | 4 | edition = "2021" |
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | description = "async/await executor designed for embedded usage" | 6 | description = "async/await executor designed for embedded usage" |
| @@ -34,7 +34,7 @@ log = { version = "0.4.14", optional = true } | |||
| 34 | rtos-trace = { version = "0.1.3", optional = true } | 34 | rtos-trace = { version = "0.1.3", optional = true } |
| 35 | 35 | ||
| 36 | embassy-executor-macros = { version = "0.6.2", path = "../embassy-executor-macros" } | 36 | embassy-executor-macros = { version = "0.6.2", path = "../embassy-executor-macros" } |
| 37 | embassy-time-driver = { version = "0.1.0", path = "../embassy-time-driver", optional = true } | 37 | embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", optional = true } |
| 38 | critical-section = "1.1" | 38 | critical-section = "1.1" |
| 39 | 39 | ||
| 40 | document-features = "0.2.7" | 40 | document-features = "0.2.7" |
diff --git a/embassy-executor/src/spawner.rs b/embassy-executor/src/spawner.rs index 16347ad71..41320d4c3 100644 --- a/embassy-executor/src/spawner.rs +++ b/embassy-executor/src/spawner.rs | |||
| @@ -62,6 +62,16 @@ pub enum SpawnError { | |||
| 62 | Busy, | 62 | Busy, |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | impl core::fmt::Display for SpawnError { | ||
| 66 | fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { | ||
| 67 | match self { | ||
| 68 | SpawnError::Busy => write!(f, "Busy"), | ||
| 69 | } | ||
| 70 | } | ||
| 71 | } | ||
| 72 | |||
| 73 | impl core::error::Error for SpawnError {} | ||
| 74 | |||
| 65 | /// Handle to spawn tasks into an executor. | 75 | /// Handle to spawn tasks into an executor. |
| 66 | /// | 76 | /// |
| 67 | /// This Spawner can spawn any task (Send and non-Send ones), but it can | 77 | /// This Spawner can spawn any task (Send and non-Send ones), but it can |
diff --git a/embassy-futures/src/select.rs b/embassy-futures/src/select.rs index bb175253b..014fee5d2 100644 --- a/embassy-futures/src/select.rs +++ b/embassy-futures/src/select.rs | |||
| @@ -14,6 +14,18 @@ pub enum Either<A, B> { | |||
| 14 | Second(B), | 14 | Second(B), |
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | impl<A, B> Either<A, B> { | ||
| 18 | /// Did the first future complete first? | ||
| 19 | pub fn is_first(&self) -> bool { | ||
| 20 | matches!(self, Either::First(_)) | ||
| 21 | } | ||
| 22 | |||
| 23 | /// Did the second future complete first? | ||
| 24 | pub fn is_second(&self) -> bool { | ||
| 25 | matches!(self, Either::Second(_)) | ||
| 26 | } | ||
| 27 | } | ||
| 28 | |||
| 17 | /// Wait for one of two futures to complete. | 29 | /// Wait for one of two futures to complete. |
| 18 | /// | 30 | /// |
| 19 | /// This function returns a new future which polls all the futures. | 31 | /// This function returns a new future which polls all the futures. |
| @@ -73,6 +85,23 @@ pub enum Either3<A, B, C> { | |||
| 73 | Third(C), | 85 | Third(C), |
| 74 | } | 86 | } |
| 75 | 87 | ||
| 88 | impl<A, B, C> Either3<A, B, C> { | ||
| 89 | /// Did the first future complete first? | ||
| 90 | pub fn is_first(&self) -> bool { | ||
| 91 | matches!(self, Either3::First(_)) | ||
| 92 | } | ||
| 93 | |||
| 94 | /// Did the second future complete first? | ||
| 95 | pub fn is_second(&self) -> bool { | ||
| 96 | matches!(self, Either3::Second(_)) | ||
| 97 | } | ||
| 98 | |||
| 99 | /// Did the third future complete first? | ||
| 100 | pub fn is_third(&self) -> bool { | ||
| 101 | matches!(self, Either3::Third(_)) | ||
| 102 | } | ||
| 103 | } | ||
| 104 | |||
| 76 | /// Same as [`select`], but with more futures. | 105 | /// Same as [`select`], but with more futures. |
| 77 | pub fn select3<A, B, C>(a: A, b: B, c: C) -> Select3<A, B, C> | 106 | pub fn select3<A, B, C>(a: A, b: B, c: C) -> Select3<A, B, C> |
| 78 | where | 107 | where |
| @@ -134,6 +163,28 @@ pub enum Either4<A, B, C, D> { | |||
| 134 | Fourth(D), | 163 | Fourth(D), |
| 135 | } | 164 | } |
| 136 | 165 | ||
| 166 | impl<A, B, C, D> Either4<A, B, C, D> { | ||
| 167 | /// Did the first future complete first? | ||
| 168 | pub fn is_first(&self) -> bool { | ||
| 169 | matches!(self, Either4::First(_)) | ||
| 170 | } | ||
| 171 | |||
| 172 | /// Did the second future complete first? | ||
| 173 | pub fn is_second(&self) -> bool { | ||
| 174 | matches!(self, Either4::Second(_)) | ||
| 175 | } | ||
| 176 | |||
| 177 | /// Did the third future complete first? | ||
| 178 | pub fn is_third(&self) -> bool { | ||
| 179 | matches!(self, Either4::Third(_)) | ||
| 180 | } | ||
| 181 | |||
| 182 | /// Did the fourth future complete first? | ||
| 183 | pub fn is_fourth(&self) -> bool { | ||
| 184 | matches!(self, Either4::Fourth(_)) | ||
| 185 | } | ||
| 186 | } | ||
| 187 | |||
| 137 | /// Same as [`select`], but with more futures. | 188 | /// Same as [`select`], but with more futures. |
| 138 | pub fn select4<A, B, C, D>(a: A, b: B, c: C, d: D) -> Select4<A, B, C, D> | 189 | pub fn select4<A, B, C, D>(a: A, b: B, c: C, d: D) -> Select4<A, B, C, D> |
| 139 | where | 190 | where |
| @@ -204,6 +255,33 @@ pub enum Either5<A, B, C, D, E> { | |||
| 204 | Fifth(E), | 255 | Fifth(E), |
| 205 | } | 256 | } |
| 206 | 257 | ||
| 258 | impl<A, B, C, D, E> Either5<A, B, C, D, E> { | ||
| 259 | /// Did the first future complete first? | ||
| 260 | pub fn is_first(&self) -> bool { | ||
| 261 | matches!(self, Either5::First(_)) | ||
| 262 | } | ||
| 263 | |||
| 264 | /// Did the second future complete first? | ||
| 265 | pub fn is_second(&self) -> bool { | ||
| 266 | matches!(self, Either5::Second(_)) | ||
| 267 | } | ||
| 268 | |||
| 269 | /// Did the third future complete first? | ||
| 270 | pub fn is_third(&self) -> bool { | ||
| 271 | matches!(self, Either5::Third(_)) | ||
| 272 | } | ||
| 273 | |||
| 274 | /// Did the fourth future complete first? | ||
| 275 | pub fn is_fourth(&self) -> bool { | ||
| 276 | matches!(self, Either5::Fourth(_)) | ||
| 277 | } | ||
| 278 | |||
| 279 | /// Did the fifth future complete first? | ||
| 280 | pub fn is_fifth(&self) -> bool { | ||
| 281 | matches!(self, Either5::Fifth(_)) | ||
| 282 | } | ||
| 283 | } | ||
| 284 | |||
| 207 | /// Same as [`select`], but with more futures. | 285 | /// Same as [`select`], but with more futures. |
| 208 | pub fn select5<A, B, C, D, E>(a: A, b: B, c: C, d: D, e: E) -> Select5<A, B, C, D, E> | 286 | pub fn select5<A, B, C, D, E>(a: A, b: B, c: C, d: D, e: E) -> Select5<A, B, C, D, E> |
| 209 | where | 287 | where |
| @@ -283,6 +361,38 @@ pub enum Either6<A, B, C, D, E, F> { | |||
| 283 | Sixth(F), | 361 | Sixth(F), |
| 284 | } | 362 | } |
| 285 | 363 | ||
| 364 | impl<A, B, C, D, E, F> Either6<A, B, C, D, E, F> { | ||
| 365 | /// Did the first future complete first? | ||
| 366 | pub fn is_first(&self) -> bool { | ||
| 367 | matches!(self, Either6::First(_)) | ||
| 368 | } | ||
| 369 | |||
| 370 | /// Did the second future complete first? | ||
| 371 | pub fn is_second(&self) -> bool { | ||
| 372 | matches!(self, Either6::Second(_)) | ||
| 373 | } | ||
| 374 | |||
| 375 | /// Did the third future complete first? | ||
| 376 | pub fn is_third(&self) -> bool { | ||
| 377 | matches!(self, Either6::Third(_)) | ||
| 378 | } | ||
| 379 | |||
| 380 | /// Did the fourth future complete first? | ||
| 381 | pub fn is_fourth(&self) -> bool { | ||
| 382 | matches!(self, Either6::Fourth(_)) | ||
| 383 | } | ||
| 384 | |||
| 385 | /// Did the fifth future complete first? | ||
| 386 | pub fn is_fifth(&self) -> bool { | ||
| 387 | matches!(self, Either6::Fifth(_)) | ||
| 388 | } | ||
| 389 | |||
| 390 | /// Did the sixth future complete first? | ||
| 391 | pub fn is_sixth(&self) -> bool { | ||
| 392 | matches!(self, Either6::Sixth(_)) | ||
| 393 | } | ||
| 394 | } | ||
| 395 | |||
| 286 | /// Same as [`select`], but with more futures. | 396 | /// Same as [`select`], but with more futures. |
| 287 | pub fn select6<A, B, C, D, E, F>(a: A, b: B, c: C, d: D, e: E, f: F) -> Select6<A, B, C, D, E, F> | 397 | pub fn select6<A, B, C, D, E, F>(a: A, b: B, c: C, d: D, e: E, f: F) -> Select6<A, B, C, D, E, F> |
| 288 | where | 398 | where |
diff --git a/embassy-net-adin1110/Cargo.toml b/embassy-net-adin1110/Cargo.toml index 0b2a6744d..3c988a732 100644 --- a/embassy-net-adin1110/Cargo.toml +++ b/embassy-net-adin1110/Cargo.toml | |||
| @@ -17,7 +17,7 @@ embedded-hal-1 = { package = "embedded-hal", version = "1.0" } | |||
| 17 | embedded-hal-async = { version = "1.0" } | 17 | embedded-hal-async = { version = "1.0" } |
| 18 | embedded-hal-bus = { version = "0.1", features = ["async"] } | 18 | embedded-hal-bus = { version = "0.1", features = ["async"] } |
| 19 | embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel" } | 19 | embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel" } |
| 20 | embassy-time = { version = "0.3.2", path = "../embassy-time" } | 20 | embassy-time = { version = "0.4.0", path = "../embassy-time" } |
| 21 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 21 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| 22 | bitfield = "0.14.0" | 22 | bitfield = "0.14.0" |
| 23 | 23 | ||
diff --git a/embassy-net-enc28j60/Cargo.toml b/embassy-net-enc28j60/Cargo.toml index cafced4b2..f3e66bbdb 100644 --- a/embassy-net-enc28j60/Cargo.toml +++ b/embassy-net-enc28j60/Cargo.toml | |||
| @@ -13,7 +13,7 @@ documentation = "https://docs.embassy.dev/embassy-net-enc28j60" | |||
| 13 | embedded-hal = { version = "1.0" } | 13 | embedded-hal = { version = "1.0" } |
| 14 | embedded-hal-async = { version = "1.0" } | 14 | embedded-hal-async = { version = "1.0" } |
| 15 | embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" } | 15 | embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" } |
| 16 | embassy-time = { version = "0.3.2", path = "../embassy-time" } | 16 | embassy-time = { version = "0.4.0", path = "../embassy-time" } |
| 17 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 17 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| 18 | 18 | ||
| 19 | defmt = { version = "0.3", optional = true } | 19 | defmt = { version = "0.3", optional = true } |
diff --git a/embassy-net-esp-hosted/Cargo.toml b/embassy-net-esp-hosted/Cargo.toml index d22ccb101..45534925d 100644 --- a/embassy-net-esp-hosted/Cargo.toml +++ b/embassy-net-esp-hosted/Cargo.toml | |||
| @@ -17,7 +17,7 @@ log = [ "dep:log" ] | |||
| 17 | defmt = { version = "0.3", optional = true } | 17 | defmt = { version = "0.3", optional = true } |
| 18 | log = { version = "0.4.14", optional = true } | 18 | log = { version = "0.4.14", optional = true } |
| 19 | 19 | ||
| 20 | embassy-time = { version = "0.3.2", path = "../embassy-time" } | 20 | embassy-time = { version = "0.4.0", path = "../embassy-time" } |
| 21 | embassy-sync = { version = "0.6.1", path = "../embassy-sync"} | 21 | embassy-sync = { version = "0.6.1", path = "../embassy-sync"} |
| 22 | embassy-futures = { version = "0.1.0", path = "../embassy-futures"} | 22 | embassy-futures = { version = "0.1.0", path = "../embassy-futures"} |
| 23 | embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel"} | 23 | embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel"} |
diff --git a/embassy-net-nrf91/Cargo.toml b/embassy-net-nrf91/Cargo.toml index f9e55c0b1..4e2f17ab2 100644 --- a/embassy-net-nrf91/Cargo.toml +++ b/embassy-net-nrf91/Cargo.toml | |||
| @@ -20,7 +20,7 @@ log = { version = "0.4.14", optional = true } | |||
| 20 | nrf-pac = { git = "https://github.com/embassy-rs/nrf-pac", rev = "52e3a757f06035c94291bfc42b0c03f71e4d677e" } | 20 | nrf-pac = { git = "https://github.com/embassy-rs/nrf-pac", rev = "52e3a757f06035c94291bfc42b0c03f71e4d677e" } |
| 21 | cortex-m = "0.7.7" | 21 | cortex-m = "0.7.7" |
| 22 | 22 | ||
| 23 | embassy-time = { version = "0.3.1", path = "../embassy-time" } | 23 | embassy-time = { version = "0.4.0", path = "../embassy-time" } |
| 24 | embassy-sync = { version = "0.6.1", path = "../embassy-sync"} | 24 | embassy-sync = { version = "0.6.1", path = "../embassy-sync"} |
| 25 | embassy-futures = { version = "0.1.0", path = "../embassy-futures"} | 25 | embassy-futures = { version = "0.1.0", path = "../embassy-futures"} |
| 26 | embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel"} | 26 | embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel"} |
diff --git a/embassy-net-wiznet/Cargo.toml b/embassy-net-wiznet/Cargo.toml index e7fb3f455..30c76d46e 100644 --- a/embassy-net-wiznet/Cargo.toml +++ b/embassy-net-wiznet/Cargo.toml | |||
| @@ -13,7 +13,7 @@ documentation = "https://docs.embassy.dev/embassy-net-wiznet" | |||
| 13 | embedded-hal = { version = "1.0" } | 13 | embedded-hal = { version = "1.0" } |
| 14 | embedded-hal-async = { version = "1.0" } | 14 | embedded-hal-async = { version = "1.0" } |
| 15 | embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel" } | 15 | embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel" } |
| 16 | embassy-time = { version = "0.3.2", path = "../embassy-time" } | 16 | embassy-time = { version = "0.4.0", path = "../embassy-time" } |
| 17 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 17 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| 18 | defmt = { version = "0.3", optional = true } | 18 | defmt = { version = "0.3", optional = true } |
| 19 | 19 | ||
diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml index 1d79a2a07..a7f7ffad2 100644 --- a/embassy-net/Cargo.toml +++ b/embassy-net/Cargo.toml | |||
| @@ -23,9 +23,6 @@ target = "thumbv7em-none-eabi" | |||
| 23 | features = ["defmt", "tcp", "udp", "raw", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "multicast", "dhcpv4-hostname"] | 23 | features = ["defmt", "tcp", "udp", "raw", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "multicast", "dhcpv4-hostname"] |
| 24 | 24 | ||
| 25 | [features] | 25 | [features] |
| 26 | default = [] | ||
| 27 | std = [] | ||
| 28 | |||
| 29 | ## Enable defmt | 26 | ## Enable defmt |
| 30 | defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt", "heapless/defmt-03", "defmt?/ip_in_core"] | 27 | defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt", "heapless/defmt-03", "defmt?/ip_in_core"] |
| 31 | 28 | ||
| @@ -74,7 +71,7 @@ smoltcp = { version = "0.12.0", default-features = false, features = [ | |||
| 74 | ] } | 71 | ] } |
| 75 | 72 | ||
| 76 | embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" } | 73 | embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" } |
| 77 | embassy-time = { version = "0.3.2", path = "../embassy-time" } | 74 | embassy-time = { version = "0.4.0", path = "../embassy-time" } |
| 78 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } | 75 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } |
| 79 | embedded-io-async = { version = "0.6.1" } | 76 | embedded-io-async = { version = "0.6.1" } |
| 80 | 77 | ||
diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs index 831e01d44..47bd5191f 100644 --- a/embassy-net/src/lib.rs +++ b/embassy-net/src/lib.rs | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #![cfg_attr(not(feature = "std"), no_std)] | 1 | #![no_std] |
| 2 | #![allow(async_fn_in_trait)] | 2 | #![allow(async_fn_in_trait)] |
| 3 | #![warn(missing_docs)] | 3 | #![warn(missing_docs)] |
| 4 | #![doc = include_str!("../README.md")] | 4 | #![doc = include_str!("../README.md")] |
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml index 48f80bb5e..45666ade8 100644 --- a/embassy-nrf/Cargo.toml +++ b/embassy-nrf/Cargo.toml | |||
| @@ -119,7 +119,7 @@ _nrf52 = ["_ppi"] | |||
| 119 | _nrf51 = ["_ppi"] | 119 | _nrf51 = ["_ppi"] |
| 120 | _nrf91 = [] | 120 | _nrf91 = [] |
| 121 | 121 | ||
| 122 | _time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-32_768", "dep:embassy-time-queue-driver"] | 122 | _time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-32_768", "dep:embassy-time-queue-utils"] |
| 123 | 123 | ||
| 124 | # trustzone state. | 124 | # trustzone state. |
| 125 | _s = [] | 125 | _s = [] |
| @@ -134,9 +134,9 @@ _gpio-p2 = [] | |||
| 134 | _nrf52832_anomaly_109 = [] | 134 | _nrf52832_anomaly_109 = [] |
| 135 | 135 | ||
| 136 | [dependencies] | 136 | [dependencies] |
| 137 | embassy-time-driver = { version = "0.1", path = "../embassy-time-driver", optional = true } | 137 | embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", optional = true } |
| 138 | embassy-time-queue-driver = { version = "0.1", path = "../embassy-time-queue-driver", optional = true } | 138 | embassy-time-queue-utils = { version = "0.1", path = "../embassy-time-queue-utils", optional = true } |
| 139 | embassy-time = { version = "0.3.2", path = "../embassy-time", optional = true } | 139 | embassy-time = { version = "0.4.0", path = "../embassy-time", optional = true } |
| 140 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } | 140 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } |
| 141 | embassy-hal-internal = {version = "0.2.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-3"] } | 141 | embassy-hal-internal = {version = "0.2.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-3"] } |
| 142 | embassy-embedded-hal = {version = "0.2.0", path = "../embassy-embedded-hal" } | 142 | embassy-embedded-hal = {version = "0.2.0", path = "../embassy-embedded-hal" } |
diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs index ec5e9f864..faef44d1b 100644 --- a/embassy-nrf/src/lib.rs +++ b/embassy-nrf/src/lib.rs | |||
| @@ -507,7 +507,6 @@ pub fn init(config: config::Config) -> Peripherals { | |||
| 507 | let mut needs_reset = false; | 507 | let mut needs_reset = false; |
| 508 | 508 | ||
| 509 | // Setup debug protection. | 509 | // Setup debug protection. |
| 510 | #[cfg(not(feature = "_nrf54l"))] // TODO | ||
| 511 | #[cfg(not(feature = "_nrf51"))] | 510 | #[cfg(not(feature = "_nrf51"))] |
| 512 | match config.debug { | 511 | match config.debug { |
| 513 | config::Debug::Allowed => { | 512 | config::Debug::Allowed => { |
| @@ -549,18 +548,77 @@ pub fn init(config: config::Config) -> Peripherals { | |||
| 549 | } | 548 | } |
| 550 | } | 549 | } |
| 551 | 550 | ||
| 551 | // TAMPC is only accessible for secure code | ||
| 552 | #[cfg(all(feature = "_nrf54l", feature = "_s"))] | ||
| 553 | { | ||
| 554 | use crate::pac::tampc::vals; | ||
| 555 | |||
| 556 | // UICR cannot be written here, because it can only be written once after an erase all. | ||
| 557 | // The erase all value means that debug access is allowed if permitted by the firmware. | ||
| 558 | |||
| 559 | // Write to TAMPC to permit debug access | ||
| 560 | // | ||
| 561 | // See https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/debug.html#ariaid-title6 | ||
| 562 | |||
| 563 | let p = pac::TAMPC; | ||
| 564 | |||
| 565 | // Unlock dbgen | ||
| 566 | p.protect().domain(0).dbgen().ctrl().write(|w| { | ||
| 567 | w.set_key(vals::DomainDbgenCtrlKey::KEY); | ||
| 568 | w.set_writeprotection(vals::DomainDbgenCtrlWriteprotection::CLEAR); | ||
| 569 | }); | ||
| 570 | p.protect().domain(0).dbgen().ctrl().write(|w| { | ||
| 571 | w.set_key(vals::DomainDbgenCtrlKey::KEY); | ||
| 572 | w.set_value(vals::DomainDbgenCtrlValue::HIGH); | ||
| 573 | }); | ||
| 574 | |||
| 575 | // Unlock niden | ||
| 576 | p.protect().domain(0).niden().ctrl().write(|w| { | ||
| 577 | w.set_key(vals::NidenCtrlKey::KEY); | ||
| 578 | w.set_writeprotection(vals::NidenCtrlWriteprotection::CLEAR); | ||
| 579 | }); | ||
| 580 | p.protect().domain(0).niden().ctrl().write(|w| { | ||
| 581 | w.set_key(vals::NidenCtrlKey::KEY); | ||
| 582 | w.set_value(vals::NidenCtrlValue::HIGH); | ||
| 583 | }); | ||
| 584 | |||
| 585 | p.protect().domain(0).spiden().ctrl().write(|w| { | ||
| 586 | w.set_key(vals::SpidenCtrlKey::KEY); | ||
| 587 | w.set_writeprotection(vals::SpidenCtrlWriteprotection::CLEAR); | ||
| 588 | }); | ||
| 589 | p.protect().domain(0).spiden().ctrl().write(|w| { | ||
| 590 | w.set_key(vals::SpidenCtrlKey::KEY); | ||
| 591 | w.set_value(vals::SpidenCtrlValue::HIGH); | ||
| 592 | }); | ||
| 593 | |||
| 594 | p.protect().domain(0).spniden().ctrl().write(|w| { | ||
| 595 | w.set_key(vals::SpnidenCtrlKey::KEY); | ||
| 596 | w.set_writeprotection(vals::SpnidenCtrlWriteprotection::CLEAR); | ||
| 597 | }); | ||
| 598 | p.protect().domain(0).spniden().ctrl().write(|w| { | ||
| 599 | w.set_key(vals::SpnidenCtrlKey::KEY); | ||
| 600 | w.set_value(vals::SpnidenCtrlValue::HIGH); | ||
| 601 | }); | ||
| 602 | } | ||
| 603 | |||
| 552 | // nothing to do on the nrf9160, debug is allowed by default. | 604 | // nothing to do on the nrf9160, debug is allowed by default. |
| 553 | } | 605 | } |
| 554 | config::Debug::Disallowed => unsafe { | 606 | config::Debug::Disallowed => { |
| 555 | // UICR.APPROTECT = Enabled | 607 | // TODO: Handle nRF54L |
| 556 | let res = uicr_write(consts::UICR_APPROTECT, consts::APPROTECT_ENABLED); | 608 | // By default, debug access is not allowed if the firmware doesn't allow it. |
| 557 | needs_reset |= res == WriteResult::Written; | 609 | // Code could be added here to disable debug access in UICR as well. |
| 558 | #[cfg(any(feature = "_nrf5340-app", feature = "_nrf91"))] | 610 | #[cfg(not(feature = "_nrf54l"))] |
| 559 | { | 611 | unsafe { |
| 560 | let res = uicr_write(consts::UICR_SECUREAPPROTECT, consts::APPROTECT_ENABLED); | 612 | // UICR.APPROTECT = Enabled |
| 613 | let res = uicr_write(consts::UICR_APPROTECT, consts::APPROTECT_ENABLED); | ||
| 561 | needs_reset |= res == WriteResult::Written; | 614 | needs_reset |= res == WriteResult::Written; |
| 615 | #[cfg(any(feature = "_nrf5340-app", feature = "_nrf91"))] | ||
| 616 | { | ||
| 617 | let res = uicr_write(consts::UICR_SECUREAPPROTECT, consts::APPROTECT_ENABLED); | ||
| 618 | needs_reset |= res == WriteResult::Written; | ||
| 619 | } | ||
| 562 | } | 620 | } |
| 563 | }, | 621 | } |
| 564 | config::Debug::NotConfigured => {} | 622 | config::Debug::NotConfigured => {} |
| 565 | } | 623 | } |
| 566 | 624 | ||
diff --git a/embassy-nrf/src/time_driver.rs b/embassy-nrf/src/time_driver.rs index a27fae9a8..ade6fd2a1 100644 --- a/embassy-nrf/src/time_driver.rs +++ b/embassy-nrf/src/time_driver.rs | |||
| @@ -5,7 +5,7 @@ use critical_section::CriticalSection; | |||
| 5 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | 5 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; |
| 6 | use embassy_sync::blocking_mutex::CriticalSectionMutex as Mutex; | 6 | use embassy_sync::blocking_mutex::CriticalSectionMutex as Mutex; |
| 7 | use embassy_time_driver::Driver; | 7 | use embassy_time_driver::Driver; |
| 8 | use embassy_time_queue_driver::Queue; | 8 | use embassy_time_queue_utils::Queue; |
| 9 | 9 | ||
| 10 | use crate::interrupt::InterruptExt; | 10 | use crate::interrupt::InterruptExt; |
| 11 | use crate::{interrupt, pac}; | 11 | use crate::{interrupt, pac}; |
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml index 94de82fa9..37d9d916f 100644 --- a/embassy-rp/Cargo.toml +++ b/embassy-rp/Cargo.toml | |||
| @@ -40,7 +40,7 @@ critical-section-impl = ["critical-section/restore-state-u8"] | |||
| 40 | unstable-pac = [] | 40 | unstable-pac = [] |
| 41 | 41 | ||
| 42 | ## Enable the timer for use with `embassy-time` with a 1MHz tick rate. | 42 | ## Enable the timer for use with `embassy-time` with a 1MHz tick rate. |
| 43 | time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-1_000_000", "dep:embassy-time-queue-driver"] | 43 | time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-1_000_000", "dep:embassy-time-queue-utils"] |
| 44 | 44 | ||
| 45 | ## Enable ROM function cache. This will store the address of a ROM function when first used, improving performance of subsequent calls. | 45 | ## Enable ROM function cache. This will store the address of a ROM function when first used, improving performance of subsequent calls. |
| 46 | rom-func-cache = [] | 46 | rom-func-cache = [] |
| @@ -109,9 +109,9 @@ binary-info = ["rt", "dep:rp-binary-info", "rp-binary-info?/binary-info"] | |||
| 109 | 109 | ||
| 110 | [dependencies] | 110 | [dependencies] |
| 111 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } | 111 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } |
| 112 | embassy-time-driver = { version = "0.1", path = "../embassy-time-driver", optional = true } | 112 | embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", optional = true } |
| 113 | embassy-time-queue-driver = { version = "0.1", path = "../embassy-time-queue-driver", optional = true } | 113 | embassy-time-queue-utils = { version = "0.1", path = "../embassy-time-queue-utils", optional = true } |
| 114 | embassy-time = { version = "0.3.2", path = "../embassy-time" } | 114 | embassy-time = { version = "0.4.0", path = "../embassy-time" } |
| 115 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 115 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| 116 | embassy-hal-internal = {version = "0.2.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-2"] } | 116 | embassy-hal-internal = {version = "0.2.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-2"] } |
| 117 | embassy-embedded-hal = {version = "0.2.0", path = "../embassy-embedded-hal" } | 117 | embassy-embedded-hal = {version = "0.2.0", path = "../embassy-embedded-hal" } |
| @@ -148,5 +148,5 @@ rp-binary-info = { version = "0.1.0", optional = true } | |||
| 148 | smart-leds = "0.4.0" | 148 | smart-leds = "0.4.0" |
| 149 | 149 | ||
| 150 | [dev-dependencies] | 150 | [dev-dependencies] |
| 151 | embassy-executor = { version = "0.6.3", path = "../embassy-executor", features = ["arch-std", "executor-thread"] } | 151 | embassy-executor = { version = "0.7.0", path = "../embassy-executor", features = ["arch-std", "executor-thread"] } |
| 152 | static_cell = { version = "2" } | 152 | static_cell = { version = "2" } |
diff --git a/embassy-rp/src/time_driver.rs b/embassy-rp/src/time_driver.rs index a0eaec10e..aa5d564e7 100644 --- a/embassy-rp/src/time_driver.rs +++ b/embassy-rp/src/time_driver.rs | |||
| @@ -5,7 +5,7 @@ use critical_section::CriticalSection; | |||
| 5 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | 5 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; |
| 6 | use embassy_sync::blocking_mutex::Mutex; | 6 | use embassy_sync::blocking_mutex::Mutex; |
| 7 | use embassy_time_driver::Driver; | 7 | use embassy_time_driver::Driver; |
| 8 | use embassy_time_queue_driver::Queue; | 8 | use embassy_time_queue_utils::Queue; |
| 9 | #[cfg(feature = "rp2040")] | 9 | #[cfg(feature = "rp2040")] |
| 10 | use pac::TIMER; | 10 | use pac::TIMER; |
| 11 | #[cfg(feature = "_rp235x")] | 11 | #[cfg(feature = "_rp235x")] |
diff --git a/embassy-stm32-wpan/Cargo.toml b/embassy-stm32-wpan/Cargo.toml index 7dd1bc677..552d80982 100644 --- a/embassy-stm32-wpan/Cargo.toml +++ b/embassy-stm32-wpan/Cargo.toml | |||
| @@ -21,7 +21,7 @@ features = ["stm32wb55rg"] | |||
| 21 | [dependencies] | 21 | [dependencies] |
| 22 | embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32" } | 22 | embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32" } |
| 23 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } | 23 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } |
| 24 | embassy-time = { version = "0.3.2", path = "../embassy-time", optional = true } | 24 | embassy-time = { version = "0.4.0", path = "../embassy-time", optional = true } |
| 25 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 25 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| 26 | embassy-hal-internal = { version = "0.2.0", path = "../embassy-hal-internal" } | 26 | embassy-hal-internal = { version = "0.2.0", path = "../embassy-hal-internal" } |
| 27 | embassy-embedded-hal = { version = "0.2.0", path = "../embassy-embedded-hal" } | 27 | embassy-embedded-hal = { version = "0.2.0", path = "../embassy-embedded-hal" } |
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 1d96a6a61..f35271016 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml | |||
| @@ -43,16 +43,16 @@ rustdoc-args = ["--cfg", "docsrs"] | |||
| 43 | 43 | ||
| 44 | [dependencies] | 44 | [dependencies] |
| 45 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } | 45 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } |
| 46 | embassy-time = { version = "0.3.2", path = "../embassy-time", optional = true } | 46 | embassy-time = { version = "0.4.0", path = "../embassy-time", optional = true } |
| 47 | embassy-time-driver = { version = "0.1", path = "../embassy-time-driver", optional = true } | 47 | embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", optional = true } |
| 48 | embassy-time-queue-driver = { version = "0.1", path = "../embassy-time-queue-driver", optional = true } | 48 | embassy-time-queue-utils = { version = "0.1", path = "../embassy-time-queue-utils", optional = true } |
| 49 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | 49 | embassy-futures = { version = "0.1.0", path = "../embassy-futures" } |
| 50 | embassy-hal-internal = {version = "0.2.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-4"] } | 50 | embassy-hal-internal = {version = "0.2.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-4"] } |
| 51 | embassy-embedded-hal = {version = "0.2.0", path = "../embassy-embedded-hal", default-features = false } | 51 | embassy-embedded-hal = {version = "0.2.0", path = "../embassy-embedded-hal", default-features = false } |
| 52 | embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" } | 52 | embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" } |
| 53 | embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver" } | 53 | embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver" } |
| 54 | embassy-usb-synopsys-otg = {version = "0.2.0", path = "../embassy-usb-synopsys-otg" } | 54 | embassy-usb-synopsys-otg = {version = "0.2.0", path = "../embassy-usb-synopsys-otg" } |
| 55 | embassy-executor = { version = "0.6.3", path = "../embassy-executor", optional = true } | 55 | embassy-executor = { version = "0.7.0", path = "../embassy-executor", optional = true } |
| 56 | 56 | ||
| 57 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } | 57 | embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } |
| 58 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } | 58 | embedded-hal-1 = { package = "embedded-hal", version = "1.0" } |
| @@ -150,7 +150,7 @@ time = ["dep:embassy-time", "embassy-embedded-hal/time"] | |||
| 150 | 150 | ||
| 151 | # Features starting with `_` are for internal use only. They're not intended | 151 | # Features starting with `_` are for internal use only. They're not intended |
| 152 | # to be enabled by other crates, and are not covered by semver guarantees. | 152 | # to be enabled by other crates, and are not covered by semver guarantees. |
| 153 | _time-driver = ["dep:embassy-time-driver", "time", "dep:embassy-time-queue-driver"] | 153 | _time-driver = ["dep:embassy-time-driver", "time", "dep:embassy-time-queue-utils"] |
| 154 | 154 | ||
| 155 | ## Use any time driver | 155 | ## Use any time driver |
| 156 | time-driver-any = ["_time-driver"] | 156 | time-driver-any = ["_time-driver"] |
diff --git a/embassy-stm32/src/gpio.rs b/embassy-stm32/src/gpio.rs index 87519f51e..c047f84ae 100644 --- a/embassy-stm32/src/gpio.rs +++ b/embassy-stm32/src/gpio.rs | |||
| @@ -659,6 +659,16 @@ fn set_as_af(pin_port: u8, af_num: u8, af_type: AfType) { | |||
| 659 | } | 659 | } |
| 660 | 660 | ||
| 661 | #[inline(never)] | 661 | #[inline(never)] |
| 662 | #[cfg(gpio_v2)] | ||
| 663 | fn set_speed(pin_port: u8, speed: Speed) { | ||
| 664 | let pin = unsafe { AnyPin::steal(pin_port) }; | ||
| 665 | let r = pin.block(); | ||
| 666 | let n = pin._pin() as usize; | ||
| 667 | |||
| 668 | r.ospeedr().modify(|w| w.set_ospeedr(n, speed.to_ospeedr())); | ||
| 669 | } | ||
| 670 | |||
| 671 | #[inline(never)] | ||
| 662 | fn set_as_analog(pin_port: u8) { | 672 | fn set_as_analog(pin_port: u8) { |
| 663 | let pin = unsafe { AnyPin::steal(pin_port) }; | 673 | let pin = unsafe { AnyPin::steal(pin_port) }; |
| 664 | let r = pin.block(); | 674 | let r = pin.block(); |
| @@ -739,6 +749,12 @@ pub(crate) trait SealedPin { | |||
| 739 | } | 749 | } |
| 740 | 750 | ||
| 741 | #[inline] | 751 | #[inline] |
| 752 | #[cfg(gpio_v2)] | ||
| 753 | fn set_speed(&self, speed: Speed) { | ||
| 754 | set_speed(self.pin_port(), speed) | ||
| 755 | } | ||
| 756 | |||
| 757 | #[inline] | ||
| 742 | fn set_as_analog(&self) { | 758 | fn set_as_analog(&self) { |
| 743 | set_as_analog(self.pin_port()); | 759 | set_as_analog(self.pin_port()); |
| 744 | } | 760 | } |
diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs index d12e5c1f5..fb10f2a5f 100644 --- a/embassy-stm32/src/lib.rs +++ b/embassy-stm32/src/lib.rs | |||
| @@ -332,10 +332,11 @@ mod dual_core { | |||
| 332 | /// ``` | 332 | /// ``` |
| 333 | /// | 333 | /// |
| 334 | /// This static must be placed in the same position for both cores. How and where this is done is left to the user. | 334 | /// This static must be placed in the same position for both cores. How and where this is done is left to the user. |
| 335 | #[repr(C)] | ||
| 335 | pub struct SharedData { | 336 | pub struct SharedData { |
| 336 | init_flag: AtomicUsize, | 337 | init_flag: AtomicUsize, |
| 337 | clocks: UnsafeCell<MaybeUninit<Clocks>>, | 338 | clocks: UnsafeCell<MaybeUninit<Clocks>>, |
| 338 | config: UnsafeCell<MaybeUninit<Config>>, | 339 | config: UnsafeCell<MaybeUninit<SharedConfig>>, |
| 339 | } | 340 | } |
| 340 | 341 | ||
| 341 | unsafe impl Sync for SharedData {} | 342 | unsafe impl Sync for SharedData {} |
| @@ -355,10 +356,15 @@ mod dual_core { | |||
| 355 | pub fn init_primary(config: Config, shared_data: &'static MaybeUninit<SharedData>) -> Peripherals { | 356 | pub fn init_primary(config: Config, shared_data: &'static MaybeUninit<SharedData>) -> Peripherals { |
| 356 | let shared_data = unsafe { shared_data.assume_init_ref() }; | 357 | let shared_data = unsafe { shared_data.assume_init_ref() }; |
| 357 | 358 | ||
| 359 | // Write the flag as soon as possible. Reading this flag uninitialized in the `init_secondary` | ||
| 360 | // is maybe unsound? Unclear. If it is indeed unsound, writing it sooner doesn't fix it all, | ||
| 361 | // but improves the odds of it going right | ||
| 362 | shared_data.init_flag.store(0, Ordering::SeqCst); | ||
| 363 | |||
| 358 | rcc::set_freqs_ptr(shared_data.clocks.get()); | 364 | rcc::set_freqs_ptr(shared_data.clocks.get()); |
| 359 | let p = init_hw(config); | 365 | let p = init_hw(config); |
| 360 | 366 | ||
| 361 | unsafe { *shared_data.config.get() }.write(config); | 367 | unsafe { *shared_data.config.get() }.write(config.into()); |
| 362 | 368 | ||
| 363 | shared_data.init_flag.store(INIT_DONE_FLAG, Ordering::SeqCst); | 369 | shared_data.init_flag.store(INIT_DONE_FLAG, Ordering::SeqCst); |
| 364 | 370 | ||
| @@ -430,6 +436,40 @@ mod dual_core { | |||
| 430 | 436 | ||
| 431 | Peripherals::take() | 437 | Peripherals::take() |
| 432 | } | 438 | } |
| 439 | |||
| 440 | #[repr(C)] | ||
| 441 | #[derive(Clone, Copy)] | ||
| 442 | struct SharedConfig { | ||
| 443 | #[cfg(bdma)] | ||
| 444 | bdma_interrupt_priority: Priority, | ||
| 445 | #[cfg(dma)] | ||
| 446 | dma_interrupt_priority: Priority, | ||
| 447 | #[cfg(gpdma)] | ||
| 448 | gpdma_interrupt_priority: Priority, | ||
| 449 | } | ||
| 450 | |||
| 451 | impl From<Config> for SharedConfig { | ||
| 452 | fn from(value: Config) -> Self { | ||
| 453 | let Config { | ||
| 454 | #[cfg(bdma)] | ||
| 455 | bdma_interrupt_priority, | ||
| 456 | #[cfg(dma)] | ||
| 457 | dma_interrupt_priority, | ||
| 458 | #[cfg(gpdma)] | ||
| 459 | gpdma_interrupt_priority, | ||
| 460 | .. | ||
| 461 | } = value; | ||
| 462 | |||
| 463 | SharedConfig { | ||
| 464 | #[cfg(bdma)] | ||
| 465 | bdma_interrupt_priority, | ||
| 466 | #[cfg(dma)] | ||
| 467 | dma_interrupt_priority, | ||
| 468 | #[cfg(gpdma)] | ||
| 469 | gpdma_interrupt_priority, | ||
| 470 | } | ||
| 471 | } | ||
| 472 | } | ||
| 433 | } | 473 | } |
| 434 | 474 | ||
| 435 | #[cfg(feature = "_dual-core")] | 475 | #[cfg(feature = "_dual-core")] |
diff --git a/embassy-stm32/src/spi/mod.rs b/embassy-stm32/src/spi/mod.rs index a65b0cc64..bf8284233 100644 --- a/embassy-stm32/src/spi/mod.rs +++ b/embassy-stm32/src/spi/mod.rs | |||
| @@ -55,6 +55,9 @@ pub struct Config { | |||
| 55 | /// There are some ICs that require a pull-up on the MISO pin for some applications. | 55 | /// There are some ICs that require a pull-up on the MISO pin for some applications. |
| 56 | /// If you are unsure, you probably don't need this. | 56 | /// If you are unsure, you probably don't need this. |
| 57 | pub miso_pull: Pull, | 57 | pub miso_pull: Pull, |
| 58 | /// signal rise/fall speed (slew rate) - defaults to `Medium`. | ||
| 59 | /// Increase for high SPI speeds. Change to `Low` to reduce ringing. | ||
| 60 | pub rise_fall_speed: Speed, | ||
| 58 | } | 61 | } |
| 59 | 62 | ||
| 60 | impl Default for Config { | 63 | impl Default for Config { |
| @@ -64,6 +67,7 @@ impl Default for Config { | |||
| 64 | bit_order: BitOrder::MsbFirst, | 67 | bit_order: BitOrder::MsbFirst, |
| 65 | frequency: Hertz(1_000_000), | 68 | frequency: Hertz(1_000_000), |
| 66 | miso_pull: Pull::None, | 69 | miso_pull: Pull::None, |
| 70 | rise_fall_speed: Speed::VeryHigh, | ||
| 67 | } | 71 | } |
| 68 | } | 72 | } |
| 69 | } | 73 | } |
| @@ -92,14 +96,14 @@ impl Config { | |||
| 92 | 96 | ||
| 93 | #[cfg(gpio_v1)] | 97 | #[cfg(gpio_v1)] |
| 94 | fn sck_af(&self) -> AfType { | 98 | fn sck_af(&self) -> AfType { |
| 95 | AfType::output(OutputType::PushPull, Speed::VeryHigh) | 99 | AfType::output(OutputType::PushPull, self.rise_fall_speed) |
| 96 | } | 100 | } |
| 97 | 101 | ||
| 98 | #[cfg(gpio_v2)] | 102 | #[cfg(gpio_v2)] |
| 99 | fn sck_af(&self) -> AfType { | 103 | fn sck_af(&self) -> AfType { |
| 100 | AfType::output_pull( | 104 | AfType::output_pull( |
| 101 | OutputType::PushPull, | 105 | OutputType::PushPull, |
| 102 | Speed::VeryHigh, | 106 | self.rise_fall_speed, |
| 103 | match self.mode.polarity { | 107 | match self.mode.polarity { |
| 104 | Polarity::IdleLow => Pull::Down, | 108 | Polarity::IdleLow => Pull::Down, |
| 105 | Polarity::IdleHigh => Pull::Up, | 109 | Polarity::IdleHigh => Pull::Up, |
| @@ -118,6 +122,7 @@ pub struct Spi<'d, M: PeriMode> { | |||
| 118 | rx_dma: Option<ChannelAndRequest<'d>>, | 122 | rx_dma: Option<ChannelAndRequest<'d>>, |
| 119 | _phantom: PhantomData<M>, | 123 | _phantom: PhantomData<M>, |
| 120 | current_word_size: word_impl::Config, | 124 | current_word_size: word_impl::Config, |
| 125 | rise_fall_speed: Speed, | ||
| 121 | } | 126 | } |
| 122 | 127 | ||
| 123 | impl<'d, M: PeriMode> Spi<'d, M> { | 128 | impl<'d, M: PeriMode> Spi<'d, M> { |
| @@ -140,6 +145,7 @@ impl<'d, M: PeriMode> Spi<'d, M> { | |||
| 140 | rx_dma, | 145 | rx_dma, |
| 141 | current_word_size: <u8 as SealedWord>::CONFIG, | 146 | current_word_size: <u8 as SealedWord>::CONFIG, |
| 142 | _phantom: PhantomData, | 147 | _phantom: PhantomData, |
| 148 | rise_fall_speed: config.rise_fall_speed, | ||
| 143 | }; | 149 | }; |
| 144 | this.enable_and_init(config); | 150 | this.enable_and_init(config); |
| 145 | this | 151 | this |
| @@ -243,6 +249,17 @@ impl<'d, M: PeriMode> Spi<'d, M> { | |||
| 243 | 249 | ||
| 244 | let br = compute_baud_rate(self.kernel_clock, config.frequency); | 250 | let br = compute_baud_rate(self.kernel_clock, config.frequency); |
| 245 | 251 | ||
| 252 | #[cfg(gpio_v2)] | ||
| 253 | { | ||
| 254 | self.rise_fall_speed = config.rise_fall_speed; | ||
| 255 | if let Some(sck) = self.sck.as_ref() { | ||
| 256 | sck.set_speed(config.rise_fall_speed); | ||
| 257 | } | ||
| 258 | if let Some(mosi) = self.mosi.as_ref() { | ||
| 259 | mosi.set_speed(config.rise_fall_speed); | ||
| 260 | } | ||
| 261 | } | ||
| 262 | |||
| 246 | #[cfg(any(spi_v1, spi_f1, spi_v2))] | 263 | #[cfg(any(spi_v1, spi_f1, spi_v2))] |
| 247 | self.info.regs.cr1().modify(|w| { | 264 | self.info.regs.cr1().modify(|w| { |
| 248 | w.set_cpha(cpha); | 265 | w.set_cpha(cpha); |
| @@ -308,6 +325,7 @@ impl<'d, M: PeriMode> Spi<'d, M> { | |||
| 308 | bit_order, | 325 | bit_order, |
| 309 | frequency, | 326 | frequency, |
| 310 | miso_pull, | 327 | miso_pull, |
| 328 | rise_fall_speed: self.rise_fall_speed, | ||
| 311 | } | 329 | } |
| 312 | } | 330 | } |
| 313 | 331 | ||
| @@ -441,7 +459,7 @@ impl<'d> Spi<'d, Blocking> { | |||
| 441 | Self::new_inner( | 459 | Self::new_inner( |
| 442 | peri, | 460 | peri, |
| 443 | new_pin!(sck, config.sck_af()), | 461 | new_pin!(sck, config.sck_af()), |
| 444 | new_pin!(mosi, AfType::output(OutputType::PushPull, Speed::VeryHigh)), | 462 | new_pin!(mosi, AfType::output(OutputType::PushPull, config.rise_fall_speed)), |
| 445 | new_pin!(miso, AfType::input(config.miso_pull)), | 463 | new_pin!(miso, AfType::input(config.miso_pull)), |
| 446 | None, | 464 | None, |
| 447 | None, | 465 | None, |
| @@ -477,7 +495,7 @@ impl<'d> Spi<'d, Blocking> { | |||
| 477 | Self::new_inner( | 495 | Self::new_inner( |
| 478 | peri, | 496 | peri, |
| 479 | new_pin!(sck, config.sck_af()), | 497 | new_pin!(sck, config.sck_af()), |
| 480 | new_pin!(mosi, AfType::output(OutputType::PushPull, Speed::VeryHigh)), | 498 | new_pin!(mosi, AfType::output(OutputType::PushPull, config.rise_fall_speed)), |
| 481 | None, | 499 | None, |
| 482 | None, | 500 | None, |
| 483 | None, | 501 | None, |
| @@ -496,7 +514,7 @@ impl<'d> Spi<'d, Blocking> { | |||
| 496 | Self::new_inner( | 514 | Self::new_inner( |
| 497 | peri, | 515 | peri, |
| 498 | None, | 516 | None, |
| 499 | new_pin!(mosi, AfType::output(OutputType::PushPull, Speed::VeryHigh)), | 517 | new_pin!(mosi, AfType::output(OutputType::PushPull, config.rise_fall_speed)), |
| 500 | None, | 518 | None, |
| 501 | None, | 519 | None, |
| 502 | None, | 520 | None, |
| @@ -519,7 +537,7 @@ impl<'d> Spi<'d, Async> { | |||
| 519 | Self::new_inner( | 537 | Self::new_inner( |
| 520 | peri, | 538 | peri, |
| 521 | new_pin!(sck, config.sck_af()), | 539 | new_pin!(sck, config.sck_af()), |
| 522 | new_pin!(mosi, AfType::output(OutputType::PushPull, Speed::VeryHigh)), | 540 | new_pin!(mosi, AfType::output(OutputType::PushPull, config.rise_fall_speed)), |
| 523 | new_pin!(miso, AfType::input(config.miso_pull)), | 541 | new_pin!(miso, AfType::input(config.miso_pull)), |
| 524 | new_dma!(tx_dma), | 542 | new_dma!(tx_dma), |
| 525 | new_dma!(rx_dma), | 543 | new_dma!(rx_dma), |
| @@ -561,7 +579,7 @@ impl<'d> Spi<'d, Async> { | |||
| 561 | Self::new_inner( | 579 | Self::new_inner( |
| 562 | peri, | 580 | peri, |
| 563 | new_pin!(sck, config.sck_af()), | 581 | new_pin!(sck, config.sck_af()), |
| 564 | new_pin!(mosi, AfType::output(OutputType::PushPull, Speed::VeryHigh)), | 582 | new_pin!(mosi, AfType::output(OutputType::PushPull, config.rise_fall_speed)), |
| 565 | None, | 583 | None, |
| 566 | new_dma!(tx_dma), | 584 | new_dma!(tx_dma), |
| 567 | None, | 585 | None, |
| @@ -581,7 +599,7 @@ impl<'d> Spi<'d, Async> { | |||
| 581 | Self::new_inner( | 599 | Self::new_inner( |
| 582 | peri, | 600 | peri, |
| 583 | None, | 601 | None, |
| 584 | new_pin!(mosi, AfType::output(OutputType::PushPull, Speed::VeryHigh)), | 602 | new_pin!(mosi, AfType::output(OutputType::PushPull, config.rise_fall_speed)), |
| 585 | None, | 603 | None, |
| 586 | new_dma!(tx_dma), | 604 | new_dma!(tx_dma), |
| 587 | None, | 605 | None, |
diff --git a/embassy-stm32/src/time_driver.rs b/embassy-stm32/src/time_driver.rs index a4c333d82..fbe148359 100644 --- a/embassy-stm32/src/time_driver.rs +++ b/embassy-stm32/src/time_driver.rs | |||
| @@ -7,7 +7,7 @@ use critical_section::CriticalSection; | |||
| 7 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | 7 | use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; |
| 8 | use embassy_sync::blocking_mutex::Mutex; | 8 | use embassy_sync::blocking_mutex::Mutex; |
| 9 | use embassy_time_driver::{Driver, TICK_HZ}; | 9 | use embassy_time_driver::{Driver, TICK_HZ}; |
| 10 | use embassy_time_queue_driver::Queue; | 10 | use embassy_time_queue_utils::Queue; |
| 11 | use stm32_metapac::timer::{regs, TimGp16}; | 11 | use stm32_metapac::timer::{regs, TimGp16}; |
| 12 | 12 | ||
| 13 | use crate::interrupt::typelevel::Interrupt; | 13 | use crate::interrupt::typelevel::Interrupt; |
diff --git a/embassy-stm32/src/ucpd.rs b/embassy-stm32/src/ucpd.rs index ee0a2c7c1..403d54f4b 100644 --- a/embassy-stm32/src/ucpd.rs +++ b/embassy-stm32/src/ucpd.rs | |||
| @@ -175,6 +175,23 @@ impl<'d, T: Instance> Ucpd<'d, T> { | |||
| 175 | w.set_ucpden(true); | 175 | w.set_ucpden(true); |
| 176 | }); | 176 | }); |
| 177 | 177 | ||
| 178 | #[cfg(stm32h5)] | ||
| 179 | r.cfgr2().write(|w| { | ||
| 180 | w.set_rxafilten(true); | ||
| 181 | }); | ||
| 182 | |||
| 183 | // Software trim according to RM0481, p. 2650/2668 | ||
| 184 | #[cfg(stm32h5)] | ||
| 185 | { | ||
| 186 | let trim_rd_cc1 = unsafe { *(0x4002_242C as *const u32) & 0xF }; | ||
| 187 | let trim_rd_cc2 = unsafe { ((*(0x4002_242C as *const u32)) >> 8) & 0xF }; | ||
| 188 | |||
| 189 | r.cfgr3().write(|w| { | ||
| 190 | w.set_trim_cc1_rd(trim_rd_cc1 as u8); | ||
| 191 | w.set_trim_cc2_rd(trim_rd_cc2 as u8); | ||
| 192 | }); | ||
| 193 | } | ||
| 194 | |||
| 178 | Self { | 195 | Self { |
| 179 | cc_phy: CcPhy { _lifetime: PhantomData }, | 196 | cc_phy: CcPhy { _lifetime: PhantomData }, |
| 180 | } | 197 | } |
| @@ -278,6 +295,31 @@ impl<'d, T: Instance> CcPhy<'d, T> { | |||
| 278 | }); | 295 | }); |
| 279 | }); | 296 | }); |
| 280 | 297 | ||
| 298 | // Software trim according to RM0481, p. 2650/2668 | ||
| 299 | #[cfg(stm32h5)] | ||
| 300 | T::REGS.cfgr3().modify(|w| match cc_pull { | ||
| 301 | CcPull::Source1_5A => { | ||
| 302 | #[cfg(stm32h5)] | ||
| 303 | { | ||
| 304 | let trim_1a5_cc1 = unsafe { *(0x08FF_F844 as *const u32) & 0xF }; | ||
| 305 | let trim_1a5_cc2 = unsafe { ((*(0x08FF_F844 as *const u32)) >> 16) & 0xF }; | ||
| 306 | |||
| 307 | w.set_trim_cc1_rp(trim_1a5_cc1 as u8); | ||
| 308 | w.set_trim_cc2_rp(trim_1a5_cc2 as u8); | ||
| 309 | }; | ||
| 310 | } | ||
| 311 | _ => { | ||
| 312 | #[cfg(stm32h5)] | ||
| 313 | { | ||
| 314 | let trim_3a0_cc1 = unsafe { (*(0x4002_242C as *const u32) >> 4) & 0xF }; | ||
| 315 | let trim_3a0_cc2 = unsafe { ((*(0x4002_242C as *const u32)) >> 12) & 0xF }; | ||
| 316 | |||
| 317 | w.set_trim_cc1_rp(trim_3a0_cc1 as u8); | ||
| 318 | w.set_trim_cc2_rp(trim_3a0_cc2 as u8); | ||
| 319 | }; | ||
| 320 | } | ||
| 321 | }); | ||
| 322 | |||
| 281 | // Disable dead-battery pull-down resistors which are enabled by default on boot. | 323 | // Disable dead-battery pull-down resistors which are enabled by default on boot. |
| 282 | critical_section::with(|cs| { | 324 | critical_section::with(|cs| { |
| 283 | init( | 325 | init( |
diff --git a/embassy-time-driver/CHANGELOG.md b/embassy-time-driver/CHANGELOG.md index 2af1dc736..30d56fd56 100644 --- a/embassy-time-driver/CHANGELOG.md +++ b/embassy-time-driver/CHANGELOG.md | |||
| @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. | |||
| 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
| 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | 7 | ||
| 8 | ## Unreleased | 8 | ## 0.2.0 - 2024-12-22 |
| 9 | 9 | ||
| 10 | - The `allocate_alarm`, `set_alarm_callback`, `set_alarm` functions have been removed. | 10 | - The `allocate_alarm`, `set_alarm_callback`, `set_alarm` functions have been removed. |
| 11 | - `schedule_wake` has been added to the `Driver` trait. | 11 | - `schedule_wake` has been added to the `Driver` trait. |
diff --git a/embassy-time-driver/Cargo.toml b/embassy-time-driver/Cargo.toml index d9f2e97df..2a1d5ee1d 100644 --- a/embassy-time-driver/Cargo.toml +++ b/embassy-time-driver/Cargo.toml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | name = "embassy-time-driver" | 2 | name = "embassy-time-driver" |
| 3 | version = "0.1.0" | 3 | version = "0.2.0" |
| 4 | edition = "2021" | 4 | edition = "2021" |
| 5 | description = "Driver trait for embassy-time" | 5 | description = "Driver trait for embassy-time" |
| 6 | repository = "https://github.com/embassy-rs/embassy" | 6 | repository = "https://github.com/embassy-rs/embassy" |
diff --git a/embassy-time-driver/src/lib.rs b/embassy-time-driver/src/lib.rs index 9f2795a01..b77683a52 100644 --- a/embassy-time-driver/src/lib.rs +++ b/embassy-time-driver/src/lib.rs | |||
| @@ -53,7 +53,7 @@ | |||
| 53 | //! use core::cell::RefCell; | 53 | //! use core::cell::RefCell; |
| 54 | //! use core::task::Waker; | 54 | //! use core::task::Waker; |
| 55 | //! | 55 | //! |
| 56 | //! use embassy_time_queue_driver::Queue; | 56 | //! use embassy_time_queue_utils::Queue; |
| 57 | //! use embassy_time_driver::Driver; | 57 | //! use embassy_time_driver::Driver; |
| 58 | //! | 58 | //! |
| 59 | //! struct MyDriver { | 59 | //! struct MyDriver { |
diff --git a/embassy-time-queue-driver/README.md b/embassy-time-queue-driver/README.md deleted file mode 100644 index b9fb12d94..000000000 --- a/embassy-time-queue-driver/README.md +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | # embassy-time-queue-driver | ||
| 2 | |||
| 3 | This crate contains the driver trait used by the [`embassy-time`](https://crates.io/crates/embassy-time) timer queue. | ||
| 4 | |||
| 5 | You should rarely need to use this crate directly. Only use it when implementing your own timer queue. | ||
| 6 | |||
| 7 | There is two timer queue implementations, one in `embassy-time` enabled by the `generic-queue` feature, and | ||
| 8 | another in `embassy-executor` enabled by the `integrated-timers` feature. | ||
diff --git a/embassy-time-queue-driver/src/lib.rs b/embassy-time-queue-driver/src/lib.rs deleted file mode 100644 index 333b6124d..000000000 --- a/embassy-time-queue-driver/src/lib.rs +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![doc = include_str!("../README.md")] | ||
| 3 | #![warn(missing_docs)] | ||
| 4 | |||
| 5 | //! This crate is an implementation detail of `embassy-time-driver`. | ||
| 6 | //! | ||
| 7 | //! As a HAL user, you should only depend on this crate if your application does not use | ||
| 8 | //! `embassy-executor` and your HAL does not configure a generic queue by itself. | ||
| 9 | //! | ||
| 10 | //! As a HAL implementer, you need to depend on this crate if you want to implement a time driver, | ||
| 11 | //! but how you should do so is documented in `embassy-time-driver`. | ||
| 12 | |||
| 13 | #[cfg(feature = "_generic-queue")] | ||
| 14 | pub mod queue_generic; | ||
| 15 | #[cfg(not(feature = "_generic-queue"))] | ||
| 16 | pub mod queue_integrated; | ||
| 17 | |||
| 18 | #[cfg(feature = "_generic-queue")] | ||
| 19 | pub use queue_generic::Queue; | ||
| 20 | #[cfg(not(feature = "_generic-queue"))] | ||
| 21 | pub use queue_integrated::Queue; | ||
diff --git a/embassy-time-queue-driver/CHANGELOG.md b/embassy-time-queue-utils/CHANGELOG.md index a99f250ed..ae4714f62 100644 --- a/embassy-time-queue-driver/CHANGELOG.md +++ b/embassy-time-queue-utils/CHANGELOG.md | |||
| @@ -1,15 +1,10 @@ | |||
| 1 | # Changelog for embassy-time-queue-driver | 1 | # Changelog for embassy-time-queue-utils |
| 2 | 2 | ||
| 3 | All notable changes to this project will be documented in this file. | 3 | All notable changes to this project will be documented in this file. |
| 4 | 4 | ||
| 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
| 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | 7 | ||
| 8 | ## Unreleased | ||
| 9 | |||
| 10 | - Added `generic-queue-N` features. | ||
| 11 | - Added `embassy_time_queue_driver::Queue` struct which uses integrated or a generic storage (configured using `generic-queue-N`). | ||
| 12 | |||
| 13 | ## 0.1.0 - 2024-01-11 | 8 | ## 0.1.0 - 2024-01-11 |
| 14 | 9 | ||
| 15 | Initial release | 10 | Initial release |
diff --git a/embassy-time-queue-driver/Cargo.toml b/embassy-time-queue-utils/Cargo.toml index a104f5c39..48be12118 100644 --- a/embassy-time-queue-driver/Cargo.toml +++ b/embassy-time-queue-utils/Cargo.toml | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | name = "embassy-time-queue-driver" | 2 | name = "embassy-time-queue-utils" |
| 3 | version = "0.1.0" | 3 | version = "0.1.0" |
| 4 | edition = "2021" | 4 | edition = "2021" |
| 5 | description = "Timer queue driver trait for embassy-time" | 5 | description = "Timer queue driver trait for embassy-time" |
| 6 | repository = "https://github.com/embassy-rs/embassy" | 6 | repository = "https://github.com/embassy-rs/embassy" |
| 7 | documentation = "https://docs.embassy.dev/embassy-time-queue-driver" | 7 | documentation = "https://docs.embassy.dev/embassy-time-queue-utils" |
| 8 | readme = "README.md" | 8 | readme = "README.md" |
| 9 | license = "MIT OR Apache-2.0" | 9 | license = "MIT OR Apache-2.0" |
| 10 | categories = [ | 10 | categories = [ |
| @@ -22,7 +22,7 @@ links = "embassy-time-queue" | |||
| 22 | 22 | ||
| 23 | [dependencies] | 23 | [dependencies] |
| 24 | heapless = "0.8" | 24 | heapless = "0.8" |
| 25 | embassy-executor = { version = "0.6.3", path = "../embassy-executor" } | 25 | embassy-executor = { version = "0.7.0", path = "../embassy-executor" } |
| 26 | 26 | ||
| 27 | [features] | 27 | [features] |
| 28 | #! ### Generic Queue | 28 | #! ### Generic Queue |
| @@ -36,7 +36,7 @@ embassy-executor = { version = "0.6.3", path = "../embassy-executor" } | |||
| 36 | #! The features also set how many timers are used for the generic queue. At most one | 36 | #! The features also set how many timers are used for the generic queue. At most one |
| 37 | #! `generic-queue-*` feature can be enabled. If none is enabled, a default of 64 timers is used. | 37 | #! `generic-queue-*` feature can be enabled. If none is enabled, a default of 64 timers is used. |
| 38 | #! | 38 | #! |
| 39 | #! When using embassy-time from libraries, you should *not* enable any `generic-queue-*` feature, to allow the | 39 | #! When using embassy-time-queue-driver from libraries, you should *not* enable any `generic-queue-*` feature, to allow the |
| 40 | #! end user to pick. | 40 | #! end user to pick. |
| 41 | 41 | ||
| 42 | ## Generic Queue with 8 timers | 42 | ## Generic Queue with 8 timers |
| @@ -53,6 +53,6 @@ generic-queue-128 = ["_generic-queue"] | |||
| 53 | _generic-queue = [] | 53 | _generic-queue = [] |
| 54 | 54 | ||
| 55 | [package.metadata.embassy_docs] | 55 | [package.metadata.embassy_docs] |
| 56 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-time-queue-driver-v$VERSION/embassy-time-queue-driver/src/" | 56 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-time-queue-utils-v$VERSION/embassy-time-queue-utils/src/" |
| 57 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-time-queue-driver/src/" | 57 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-time-queue-utils/src/" |
| 58 | target = "x86_64-unknown-linux-gnu" | 58 | target = "x86_64-unknown-linux-gnu" |
diff --git a/embassy-time-queue-utils/README.md b/embassy-time-queue-utils/README.md new file mode 100644 index 000000000..36461f1cb --- /dev/null +++ b/embassy-time-queue-utils/README.md | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | # embassy-time-queue-utils | ||
| 2 | |||
| 3 | This crate contains timer queues to help implementing an [`embassy-time-driver`](https://crates.io/crates/embassy-time-driver). | ||
| 4 | |||
| 5 | As a HAL user, you should not need to depend on this crate. | ||
| 6 | |||
| 7 | As a HAL implementer, you need to depend on this crate if you want to implement a time driver, | ||
| 8 | but how you should do so is documented in `embassy-time-driver`. | ||
diff --git a/embassy-time-queue-driver/build.rs b/embassy-time-queue-utils/build.rs index f328e4d9d..f328e4d9d 100644 --- a/embassy-time-queue-driver/build.rs +++ b/embassy-time-queue-utils/build.rs | |||
diff --git a/embassy-time-queue-utils/src/lib.rs b/embassy-time-queue-utils/src/lib.rs new file mode 100644 index 000000000..a6f66913f --- /dev/null +++ b/embassy-time-queue-utils/src/lib.rs | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | #![no_std] | ||
| 2 | #![doc = include_str!("../README.md")] | ||
| 3 | #![warn(missing_docs)] | ||
| 4 | |||
| 5 | #[cfg(feature = "_generic-queue")] | ||
| 6 | pub mod queue_generic; | ||
| 7 | #[cfg(not(feature = "_generic-queue"))] | ||
| 8 | pub mod queue_integrated; | ||
| 9 | |||
| 10 | #[cfg(feature = "_generic-queue")] | ||
| 11 | pub use queue_generic::Queue; | ||
| 12 | #[cfg(not(feature = "_generic-queue"))] | ||
| 13 | pub use queue_integrated::Queue; | ||
diff --git a/embassy-time-queue-driver/src/queue_generic.rs b/embassy-time-queue-utils/src/queue_generic.rs index 232035bc6..232035bc6 100644 --- a/embassy-time-queue-driver/src/queue_generic.rs +++ b/embassy-time-queue-utils/src/queue_generic.rs | |||
diff --git a/embassy-time-queue-driver/src/queue_integrated.rs b/embassy-time-queue-utils/src/queue_integrated.rs index 246cf1d63..246cf1d63 100644 --- a/embassy-time-queue-driver/src/queue_integrated.rs +++ b/embassy-time-queue-utils/src/queue_integrated.rs | |||
diff --git a/embassy-time/CHANGELOG.md b/embassy-time/CHANGELOG.md index a6acb1ad6..cd4c1afcb 100644 --- a/embassy-time/CHANGELOG.md +++ b/embassy-time/CHANGELOG.md | |||
| @@ -5,9 +5,8 @@ All notable changes to this project will be documented in this file. | |||
| 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
| 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | 7 | ||
| 8 | ## Unreleased | 8 | ## 0.4.0 - 2024-12-22 |
| 9 | 9 | ||
| 10 | - The `generic-queue` and related features have been removed (moved to embassy-time-queue-driver) | ||
| 11 | - embassy-time no longer provides an `embassy-time-queue-driver` implementation | 10 | - embassy-time no longer provides an `embassy-time-queue-driver` implementation |
| 12 | 11 | ||
| 13 | ## 0.3.2 - 2024-08-05 | 12 | ## 0.3.2 - 2024-08-05 |
diff --git a/embassy-time/Cargo.toml b/embassy-time/Cargo.toml index 4f4ea0b14..374b460c9 100644 --- a/embassy-time/Cargo.toml +++ b/embassy-time/Cargo.toml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | name = "embassy-time" | 2 | name = "embassy-time" |
| 3 | version = "0.3.2" | 3 | version = "0.4.0" |
| 4 | edition = "2021" | 4 | edition = "2021" |
| 5 | description = "Instant and Duration for embedded no-std systems, with async timer support" | 5 | description = "Instant and Duration for embedded no-std systems, with async timer support" |
| 6 | repository = "https://github.com/embassy-rs/embassy" | 6 | repository = "https://github.com/embassy-rs/embassy" |
| @@ -24,8 +24,8 @@ target = "x86_64-unknown-linux-gnu" | |||
| 24 | features = ["defmt", "std"] | 24 | features = ["defmt", "std"] |
| 25 | 25 | ||
| 26 | [features] | 26 | [features] |
| 27 | std = ["tick-hz-1_000_000", "critical-section/std", "dep:embassy-time-queue-driver"] | 27 | std = ["tick-hz-1_000_000", "critical-section/std", "dep:embassy-time-queue-utils"] |
| 28 | wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:wasm-timer", "tick-hz-1_000_000", "dep:embassy-time-queue-driver"] | 28 | wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:wasm-timer", "tick-hz-1_000_000", "dep:embassy-time-queue-utils"] |
| 29 | 29 | ||
| 30 | ## Display the time since startup next to defmt log messages. | 30 | ## Display the time since startup next to defmt log messages. |
| 31 | ## At most 1 `defmt-timestamp-uptime-*` feature can be used. | 31 | ## At most 1 `defmt-timestamp-uptime-*` feature can be used. |
| @@ -40,7 +40,32 @@ defmt-timestamp-uptime-tms = ["defmt"] | |||
| 40 | defmt-timestamp-uptime-tus = ["defmt"] | 40 | defmt-timestamp-uptime-tus = ["defmt"] |
| 41 | 41 | ||
| 42 | ## Create a `MockDriver` that can be manually advanced for testing purposes. | 42 | ## Create a `MockDriver` that can be manually advanced for testing purposes. |
| 43 | mock-driver = ["tick-hz-1_000_000", "dep:embassy-time-queue-driver"] | 43 | mock-driver = ["tick-hz-1_000_000", "dep:embassy-time-queue-utils"] |
| 44 | |||
| 45 | #! ### Generic Queue | ||
| 46 | |||
| 47 | #! By default embassy-time uses a timer queue implementation that is faster but depends on `embassy-executor`. | ||
| 48 | #! It will panic if you try to await any timer when using another executor. | ||
| 49 | #! | ||
| 50 | #! Alternatively, you can choose to use a "generic" timer queue implementation that works on any executor. | ||
| 51 | #! To enable it, enable any of the features below. | ||
| 52 | #! | ||
| 53 | #! The features also set how many timers are used for the generic queue. At most one | ||
| 54 | #! `generic-queue-*` feature can be enabled. If none is enabled, a default of 64 timers is used. | ||
| 55 | #! | ||
| 56 | #! When using embassy-time from libraries, you should *not* enable any `generic-queue-*` feature, to allow the | ||
| 57 | #! end user to pick. | ||
| 58 | |||
| 59 | ## Generic Queue with 8 timers | ||
| 60 | generic-queue-8 = ["embassy-time-queue-utils/generic-queue-8"] | ||
| 61 | ## Generic Queue with 16 timers | ||
| 62 | generic-queue-16 = ["embassy-time-queue-utils/generic-queue-16"] | ||
| 63 | ## Generic Queue with 32 timers | ||
| 64 | generic-queue-32 = ["embassy-time-queue-utils/generic-queue-32"] | ||
| 65 | ## Generic Queue with 64 timers | ||
| 66 | generic-queue-64 = ["embassy-time-queue-utils/generic-queue-64"] | ||
| 67 | ## Generic Queue with 128 timers | ||
| 68 | generic-queue-128 = ["embassy-time-queue-utils/generic-queue-128"] | ||
| 44 | 69 | ||
| 45 | #! ### Tick Rate | 70 | #! ### Tick Rate |
| 46 | #! | 71 | #! |
| @@ -383,8 +408,8 @@ tick-hz-5_242_880_000 = ["embassy-time-driver/tick-hz-5_242_880_000"] | |||
| 383 | #! </details> | 408 | #! </details> |
| 384 | 409 | ||
| 385 | [dependencies] | 410 | [dependencies] |
| 386 | embassy-time-driver = { version = "0.1.0", path = "../embassy-time-driver" } | 411 | embassy-time-driver = { version = "0.2", path = "../embassy-time-driver" } |
| 387 | embassy-time-queue-driver = { version = "0.1.0", path = "../embassy-time-queue-driver", optional = true} | 412 | embassy-time-queue-utils = { version = "0.1", path = "../embassy-time-queue-utils", optional = true} |
| 388 | 413 | ||
| 389 | defmt = { version = "0.3", optional = true } | 414 | defmt = { version = "0.3", optional = true } |
| 390 | log = { version = "0.4.14", optional = true } | 415 | log = { version = "0.4.14", optional = true } |
| @@ -407,4 +432,4 @@ wasm-timer = { version = "0.2.5", optional = true } | |||
| 407 | [dev-dependencies] | 432 | [dev-dependencies] |
| 408 | serial_test = "0.9" | 433 | serial_test = "0.9" |
| 409 | critical-section = { version = "1.1", features = ["std"] } | 434 | critical-section = { version = "1.1", features = ["std"] } |
| 410 | embassy-executor = { version = "0.6.3", path = "../embassy-executor" } | 435 | embassy-executor = { version = "0.7.0", path = "../embassy-executor" } |
diff --git a/embassy-time/src/driver_mock.rs b/embassy-time/src/driver_mock.rs index 138d60499..bb1961bf2 100644 --- a/embassy-time/src/driver_mock.rs +++ b/embassy-time/src/driver_mock.rs | |||
| @@ -3,7 +3,7 @@ use core::task::Waker; | |||
| 3 | 3 | ||
| 4 | use critical_section::Mutex as CsMutex; | 4 | use critical_section::Mutex as CsMutex; |
| 5 | use embassy_time_driver::Driver; | 5 | use embassy_time_driver::Driver; |
| 6 | use embassy_time_queue_driver::Queue; | 6 | use embassy_time_queue_utils::Queue; |
| 7 | 7 | ||
| 8 | use crate::{Duration, Instant}; | 8 | use crate::{Duration, Instant}; |
| 9 | 9 | ||
diff --git a/embassy-time/src/driver_std.rs b/embassy-time/src/driver_std.rs index 35888fddd..87d7ef7eb 100644 --- a/embassy-time/src/driver_std.rs +++ b/embassy-time/src/driver_std.rs | |||
| @@ -3,7 +3,7 @@ use std::thread; | |||
| 3 | use std::time::{Duration as StdDuration, Instant as StdInstant}; | 3 | use std::time::{Duration as StdDuration, Instant as StdInstant}; |
| 4 | 4 | ||
| 5 | use embassy_time_driver::Driver; | 5 | use embassy_time_driver::Driver; |
| 6 | use embassy_time_queue_driver::Queue; | 6 | use embassy_time_queue_utils::Queue; |
| 7 | 7 | ||
| 8 | struct TimeDriver { | 8 | struct TimeDriver { |
| 9 | signaler: Signaler, | 9 | signaler: Signaler, |
diff --git a/embassy-time/src/driver_wasm.rs b/embassy-time/src/driver_wasm.rs index bcdd1670b..e3207691a 100644 --- a/embassy-time/src/driver_wasm.rs +++ b/embassy-time/src/driver_wasm.rs | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | use std::sync::Mutex; | 1 | use std::sync::Mutex; |
| 2 | 2 | ||
| 3 | use embassy_time_driver::Driver; | 3 | use embassy_time_driver::Driver; |
| 4 | use embassy_time_queue_driver::Queue; | 4 | use embassy_time_queue_utils::Queue; |
| 5 | use wasm_bindgen::prelude::*; | 5 | use wasm_bindgen::prelude::*; |
| 6 | use wasm_timer::Instant as StdInstant; | 6 | use wasm_timer::Instant as StdInstant; |
| 7 | 7 | ||
diff --git a/embassy-usb-dfu/Cargo.toml b/embassy-usb-dfu/Cargo.toml index 763c9600d..baee0205e 100644 --- a/embassy-usb-dfu/Cargo.toml +++ b/embassy-usb-dfu/Cargo.toml | |||
| @@ -34,7 +34,7 @@ cortex-m = { version = "0.7.7", features = ["inline-asm"], optional = true } | |||
| 34 | embassy-boot = { version = "0.3.0", path = "../embassy-boot" } | 34 | embassy-boot = { version = "0.3.0", path = "../embassy-boot" } |
| 35 | embassy-futures = { version = "0.1.1", path = "../embassy-futures" } | 35 | embassy-futures = { version = "0.1.1", path = "../embassy-futures" } |
| 36 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } | 36 | embassy-sync = { version = "0.6.1", path = "../embassy-sync" } |
| 37 | embassy-time = { version = "0.3.2", path = "../embassy-time" } | 37 | embassy-time = { version = "0.4.0", path = "../embassy-time" } |
| 38 | embassy-usb = { version = "0.3.0", path = "../embassy-usb", default-features = false } | 38 | embassy-usb = { version = "0.3.0", path = "../embassy-usb", default-features = false } |
| 39 | embedded-storage = { version = "0.3.1" } | 39 | embedded-storage = { version = "0.3.1" } |
| 40 | esp32c3-hal = { version = "0.13.0", optional = true, default-features = false } | 40 | esp32c3-hal = { version = "0.13.0", optional = true, default-features = false } |
diff --git a/embassy-usb-logger/src/lib.rs b/embassy-usb-logger/src/lib.rs index 29c102f10..de25abce1 100644 --- a/embassy-usb-logger/src/lib.rs +++ b/embassy-usb-logger/src/lib.rs | |||
| @@ -102,13 +102,6 @@ impl<const N: usize, T: ReceiverHandler + Send + Sync> UsbLogger<N, T> { | |||
| 102 | config.max_power = 100; | 102 | config.max_power = 100; |
| 103 | config.max_packet_size_0 = MAX_PACKET_SIZE; | 103 | config.max_packet_size_0 = MAX_PACKET_SIZE; |
| 104 | 104 | ||
| 105 | // Required for windows compatiblity. | ||
| 106 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 107 | config.device_class = 0xEF; | ||
| 108 | config.device_sub_class = 0x02; | ||
| 109 | config.device_protocol = 0x01; | ||
| 110 | config.composite_with_iads = true; | ||
| 111 | |||
| 112 | let mut builder = Builder::new( | 105 | let mut builder = Builder::new( |
| 113 | driver, | 106 | driver, |
| 114 | config, | 107 | config, |
diff --git a/embassy-usb/src/builder.rs b/embassy-usb/src/builder.rs index 008a10f72..9a21b9a3b 100644 --- a/embassy-usb/src/builder.rs +++ b/embassy-usb/src/builder.rs | |||
| @@ -34,17 +34,20 @@ pub struct Config<'a> { | |||
| 34 | /// Device class code assigned by USB.org. Set to `0xff` for vendor-specific | 34 | /// Device class code assigned by USB.org. Set to `0xff` for vendor-specific |
| 35 | /// devices that do not conform to any class. | 35 | /// devices that do not conform to any class. |
| 36 | /// | 36 | /// |
| 37 | /// Default: `0x00` (class code specified by interfaces) | 37 | /// Default: `0xEF` |
| 38 | /// See also: `composite_with_iads` | ||
| 38 | pub device_class: u8, | 39 | pub device_class: u8, |
| 39 | 40 | ||
| 40 | /// Device sub-class code. Depends on class. | 41 | /// Device sub-class code. Depends on class. |
| 41 | /// | 42 | /// |
| 42 | /// Default: `0x00` | 43 | /// Default: `0x02` |
| 44 | /// See also: `composite_with_iads` | ||
| 43 | pub device_sub_class: u8, | 45 | pub device_sub_class: u8, |
| 44 | 46 | ||
| 45 | /// Device protocol code. Depends on class and sub-class. | 47 | /// Device protocol code. Depends on class and sub-class. |
| 46 | /// | 48 | /// |
| 47 | /// Default: `0x00` | 49 | /// Default: `0x01` |
| 50 | /// See also: `composite_with_iads` | ||
| 48 | pub device_protocol: u8, | 51 | pub device_protocol: u8, |
| 49 | 52 | ||
| 50 | /// Device release version in BCD. | 53 | /// Device release version in BCD. |
| @@ -84,11 +87,14 @@ pub struct Config<'a> { | |||
| 84 | 87 | ||
| 85 | /// Configures the device as a composite device with interface association descriptors. | 88 | /// Configures the device as a composite device with interface association descriptors. |
| 86 | /// | 89 | /// |
| 87 | /// If set to `true`, the following fields should have the given values: | 90 | /// If set to `true` (default), the following fields should have the given values: |
| 88 | /// | 91 | /// |
| 89 | /// - `device_class` = `0xEF` | 92 | /// - `device_class` = `0xEF` |
| 90 | /// - `device_sub_class` = `0x02` | 93 | /// - `device_sub_class` = `0x02` |
| 91 | /// - `device_protocol` = `0x01` | 94 | /// - `device_protocol` = `0x01` |
| 95 | /// | ||
| 96 | /// If set to `false`, those fields must be set correctly for the classes that will be | ||
| 97 | /// installed on the USB device. | ||
| 92 | pub composite_with_iads: bool, | 98 | pub composite_with_iads: bool, |
| 93 | 99 | ||
| 94 | /// Whether the device has its own power source. | 100 | /// Whether the device has its own power source. |
| @@ -117,9 +123,9 @@ impl<'a> Config<'a> { | |||
| 117 | /// Create default configuration with the provided vid and pid values. | 123 | /// Create default configuration with the provided vid and pid values. |
| 118 | pub const fn new(vid: u16, pid: u16) -> Self { | 124 | pub const fn new(vid: u16, pid: u16) -> Self { |
| 119 | Self { | 125 | Self { |
| 120 | device_class: 0x00, | 126 | device_class: 0xEF, |
| 121 | device_sub_class: 0x00, | 127 | device_sub_class: 0x02, |
| 122 | device_protocol: 0x00, | 128 | device_protocol: 0x01, |
| 123 | max_packet_size_0: 64, | 129 | max_packet_size_0: 64, |
| 124 | vendor_id: vid, | 130 | vendor_id: vid, |
| 125 | product_id: pid, | 131 | product_id: pid, |
| @@ -130,7 +136,7 @@ impl<'a> Config<'a> { | |||
| 130 | serial_number: None, | 136 | serial_number: None, |
| 131 | self_powered: false, | 137 | self_powered: false, |
| 132 | supports_remote_wakeup: false, | 138 | supports_remote_wakeup: false, |
| 133 | composite_with_iads: false, | 139 | composite_with_iads: true, |
| 134 | max_power: 100, | 140 | max_power: 100, |
| 135 | } | 141 | } |
| 136 | } | 142 | } |
diff --git a/examples/boot/application/nrf/Cargo.toml b/examples/boot/application/nrf/Cargo.toml index 45ad341fc..bfe6532ad 100644 --- a/examples/boot/application/nrf/Cargo.toml +++ b/examples/boot/application/nrf/Cargo.toml | |||
| @@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } | 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } |
| 9 | embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-16384", "arch-cortex-m", "executor-thread", "arch-cortex-m", "executor-thread"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-16384", "arch-cortex-m", "executor-thread", "arch-cortex-m", "executor-thread"] } |
| 10 | embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [] } | 10 | embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [] } |
| 11 | embassy-nrf = { version = "0.2.0", path = "../../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", ] } | 11 | embassy-nrf = { version = "0.2.0", path = "../../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", ] } |
| 12 | embassy-boot = { version = "0.3.0", path = "../../../../embassy-boot", features = [] } | 12 | embassy-boot = { version = "0.3.0", path = "../../../../embassy-boot", features = [] } |
| 13 | embassy-boot-nrf = { version = "0.3.0", path = "../../../../embassy-boot-nrf", features = [] } | 13 | embassy-boot-nrf = { version = "0.3.0", path = "../../../../embassy-boot-nrf", features = [] } |
diff --git a/examples/boot/application/rp/Cargo.toml b/examples/boot/application/rp/Cargo.toml index ec99f2605..6217cf64b 100644 --- a/examples/boot/application/rp/Cargo.toml +++ b/examples/boot/application/rp/Cargo.toml | |||
| @@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } | 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } |
| 9 | embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-16384", "arch-cortex-m", "executor-thread", "arch-cortex-m", "executor-thread"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-16384", "arch-cortex-m", "executor-thread", "arch-cortex-m", "executor-thread"] } |
| 10 | embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [] } | 10 | embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [] } |
| 11 | embassy-rp = { version = "0.2.0", path = "../../../../embassy-rp", features = ["time-driver", "rp2040"] } | 11 | embassy-rp = { version = "0.2.0", path = "../../../../embassy-rp", features = ["time-driver", "rp2040"] } |
| 12 | embassy-boot-rp = { version = "0.3.0", path = "../../../../embassy-boot-rp", features = [] } | 12 | embassy-boot-rp = { version = "0.3.0", path = "../../../../embassy-boot-rp", features = [] } |
| 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } |
diff --git a/examples/boot/application/stm32f3/Cargo.toml b/examples/boot/application/stm32f3/Cargo.toml index d2138db87..68f65e384 100644 --- a/examples/boot/application/stm32f3/Cargo.toml +++ b/examples/boot/application/stm32f3/Cargo.toml | |||
| @@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } | 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } |
| 9 | embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } |
| 10 | embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32f303re", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32f303re", "time-driver-any", "exti"] } |
| 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32" } | 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32" } |
| 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } |
diff --git a/examples/boot/application/stm32f7/Cargo.toml b/examples/boot/application/stm32f7/Cargo.toml index b86c66f5d..90391af5c 100644 --- a/examples/boot/application/stm32f7/Cargo.toml +++ b/examples/boot/application/stm32f7/Cargo.toml | |||
| @@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } | 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } |
| 9 | embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } |
| 10 | embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32f767zi", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32f767zi", "time-driver-any", "exti"] } |
| 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } | 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } |
| 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } |
diff --git a/examples/boot/application/stm32h7/Cargo.toml b/examples/boot/application/stm32h7/Cargo.toml index e2e2fe711..33e210d44 100644 --- a/examples/boot/application/stm32h7/Cargo.toml +++ b/examples/boot/application/stm32h7/Cargo.toml | |||
| @@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } | 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } |
| 9 | embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } |
| 10 | embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32h743zi", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32h743zi", "time-driver-any", "exti"] } |
| 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } | 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } |
| 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } |
diff --git a/examples/boot/application/stm32l0/Cargo.toml b/examples/boot/application/stm32l0/Cargo.toml index 7e9c52ffa..f9402904f 100644 --- a/examples/boot/application/stm32l0/Cargo.toml +++ b/examples/boot/application/stm32l0/Cargo.toml | |||
| @@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } | 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } |
| 9 | embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } |
| 10 | embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32l072cz", "time-driver-any", "exti", "memory-x"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32l072cz", "time-driver-any", "exti", "memory-x"] } |
| 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } | 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } |
| 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } |
diff --git a/examples/boot/application/stm32l1/Cargo.toml b/examples/boot/application/stm32l1/Cargo.toml index 42353a24c..d02986850 100644 --- a/examples/boot/application/stm32l1/Cargo.toml +++ b/examples/boot/application/stm32l1/Cargo.toml | |||
| @@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } | 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } |
| 9 | embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } |
| 10 | embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32l151cb-a", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32l151cb-a", "time-driver-any", "exti"] } |
| 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } | 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } |
| 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } |
diff --git a/examples/boot/application/stm32l4/Cargo.toml b/examples/boot/application/stm32l4/Cargo.toml index cf0b0242a..fedfe2b33 100644 --- a/examples/boot/application/stm32l4/Cargo.toml +++ b/examples/boot/application/stm32l4/Cargo.toml | |||
| @@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } | 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } |
| 9 | embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } |
| 10 | embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32l475vg", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32l475vg", "time-driver-any", "exti"] } |
| 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } | 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } |
| 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } |
diff --git a/examples/boot/application/stm32wb-dfu/Cargo.toml b/examples/boot/application/stm32wb-dfu/Cargo.toml index ea2879fb5..ab359a948 100644 --- a/examples/boot/application/stm32wb-dfu/Cargo.toml +++ b/examples/boot/application/stm32wb-dfu/Cargo.toml | |||
| @@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } | 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } |
| 9 | embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } |
| 10 | embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32wb55rg", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32wb55rg", "time-driver-any", "exti"] } |
| 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } | 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } |
| 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } |
diff --git a/examples/boot/application/stm32wl/Cargo.toml b/examples/boot/application/stm32wl/Cargo.toml index 6417b8430..8e24fdcf1 100644 --- a/examples/boot/application/stm32wl/Cargo.toml +++ b/examples/boot/application/stm32wl/Cargo.toml | |||
| @@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } | 8 | embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" } |
| 9 | embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] } |
| 10 | embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32wl55jc-cm4", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32wl55jc-cm4", "time-driver-any", "exti"] } |
| 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } | 12 | embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] } |
| 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" } |
diff --git a/examples/lpc55s69/Cargo.toml b/examples/lpc55s69/Cargo.toml index 41a88f082..1c8d5f456 100644 --- a/examples/lpc55s69/Cargo.toml +++ b/examples/lpc55s69/Cargo.toml | |||
| @@ -7,9 +7,9 @@ license = "MIT OR Apache-2.0" | |||
| 7 | 7 | ||
| 8 | [dependencies] | 8 | [dependencies] |
| 9 | embassy-nxp = { version = "0.1.0", path = "../../embassy-nxp", features = ["rt"] } | 9 | embassy-nxp = { version = "0.1.0", path = "../../embassy-nxp", features = ["rt"] } |
| 10 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt"] } | 10 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt"] } |
| 11 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 11 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 12 | embassy-time = { version = "0.3.0", path = "../../embassy-time", features = ["defmt"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] } |
| 13 | panic-halt = "0.2.0" | 13 | panic-halt = "0.2.0" |
| 14 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 14 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 15 | cortex-m-rt = {version = "0.7.0"} | 15 | cortex-m-rt = {version = "0.7.0"} |
diff --git a/examples/nrf-rtos-trace/Cargo.toml b/examples/nrf-rtos-trace/Cargo.toml index 6d13d668a..0623b27ea 100644 --- a/examples/nrf-rtos-trace/Cargo.toml +++ b/examples/nrf-rtos-trace/Cargo.toml | |||
| @@ -16,8 +16,8 @@ log = [ | |||
| 16 | 16 | ||
| 17 | [dependencies] | 17 | [dependencies] |
| 18 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync" } | 18 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync" } |
| 19 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "rtos-trace"] } | 19 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "rtos-trace"] } |
| 20 | embassy-time = { version = "0.3.2", path = "../../embassy-time" } | 20 | embassy-time = { version = "0.4.0", path = "../../embassy-time" } |
| 21 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } | 21 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } |
| 22 | 22 | ||
| 23 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 23 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
diff --git a/examples/nrf51/Cargo.toml b/examples/nrf51/Cargo.toml index 8d995cfd8..492ebadd7 100644 --- a/examples/nrf51/Cargo.toml +++ b/examples/nrf51/Cargo.toml | |||
| @@ -5,8 +5,8 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-4096", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 8 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-4096", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 9 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 9 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 10 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf51", "gpiote", "time-driver-rtc1", "unstable-pac", "time", "rt"] } | 10 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf51", "gpiote", "time-driver-rtc1", "unstable-pac", "time", "rt"] } |
| 11 | 11 | ||
| 12 | defmt = "0.3" | 12 | defmt = "0.3" |
diff --git a/examples/nrf52810/Cargo.toml b/examples/nrf52810/Cargo.toml index fa2a27aaa..8cd3b83e3 100644 --- a/examples/nrf52810/Cargo.toml +++ b/examples/nrf52810/Cargo.toml | |||
| @@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0" | |||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 8 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 9 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 9 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 10 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 10 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 11 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 12 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf52810", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 12 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf52810", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } |
| 13 | 13 | ||
| 14 | defmt = "0.3" | 14 | defmt = "0.3" |
diff --git a/examples/nrf52840-rtic/Cargo.toml b/examples/nrf52840-rtic/Cargo.toml index 6b15b24da..00dfe9d80 100644 --- a/examples/nrf52840-rtic/Cargo.toml +++ b/examples/nrf52840-rtic/Cargo.toml | |||
| @@ -9,8 +9,8 @@ rtic = { version = "2", features = ["thumbv7-backend"] } | |||
| 9 | 9 | ||
| 10 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 10 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 11 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 11 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = [ "defmt", "defmt-timestamp-uptime"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = [ "defmt", "defmt-timestamp-uptime"] } |
| 13 | embassy-time-queue-driver = { version = "0.1.0", path = "../../embassy-time-queue-driver", features = ["generic-queue-8"] } | 13 | embassy-time-queue-utils = { version = "0.1", path = "../../embassy-time-queue-utils", features = ["generic-queue-8"] } |
| 14 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = [ "defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 14 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = [ "defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } |
| 15 | 15 | ||
| 16 | defmt = "0.3" | 16 | defmt = "0.3" |
diff --git a/examples/nrf52840/Cargo.toml b/examples/nrf52840/Cargo.toml index fa29d52b9..7a4aa803b 100644 --- a/examples/nrf52840/Cargo.toml +++ b/examples/nrf52840/Cargo.toml | |||
| @@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0" | |||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 8 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 9 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 9 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 10 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 10 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 11 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 12 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 12 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } |
| 13 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"] } | 13 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"] } |
| 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
diff --git a/examples/nrf52840/src/bin/usb_ethernet.rs b/examples/nrf52840/src/bin/usb_ethernet.rs index 88314b749..49856012d 100644 --- a/examples/nrf52840/src/bin/usb_ethernet.rs +++ b/examples/nrf52840/src/bin/usb_ethernet.rs | |||
| @@ -60,12 +60,6 @@ async fn main(spawner: Spawner) { | |||
| 60 | config.max_power = 100; | 60 | config.max_power = 100; |
| 61 | config.max_packet_size_0 = 64; | 61 | config.max_packet_size_0 = 64; |
| 62 | 62 | ||
| 63 | // Required for Windows support. | ||
| 64 | config.composite_with_iads = true; | ||
| 65 | config.device_class = 0xEF; | ||
| 66 | config.device_sub_class = 0x02; | ||
| 67 | config.device_protocol = 0x01; | ||
| 68 | |||
| 69 | // Create embassy-usb DeviceBuilder using the driver and config. | 63 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 70 | static CONFIG_DESC: StaticCell<[u8; 256]> = StaticCell::new(); | 64 | static CONFIG_DESC: StaticCell<[u8; 256]> = StaticCell::new(); |
| 71 | static BOS_DESC: StaticCell<[u8; 256]> = StaticCell::new(); | 65 | static BOS_DESC: StaticCell<[u8; 256]> = StaticCell::new(); |
diff --git a/examples/nrf52840/src/bin/usb_serial.rs b/examples/nrf52840/src/bin/usb_serial.rs index a534046d9..8d05df791 100644 --- a/examples/nrf52840/src/bin/usb_serial.rs +++ b/examples/nrf52840/src/bin/usb_serial.rs | |||
| @@ -36,13 +36,6 @@ async fn main(_spawner: Spawner) { | |||
| 36 | config.max_power = 100; | 36 | config.max_power = 100; |
| 37 | config.max_packet_size_0 = 64; | 37 | config.max_packet_size_0 = 64; |
| 38 | 38 | ||
| 39 | // Required for windows compatibility. | ||
| 40 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 41 | config.device_class = 0xEF; | ||
| 42 | config.device_sub_class = 0x02; | ||
| 43 | config.device_protocol = 0x01; | ||
| 44 | config.composite_with_iads = true; | ||
| 45 | |||
| 46 | // Create embassy-usb DeviceBuilder using the driver and config. | 39 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 47 | // It needs some buffers for building the descriptors. | 40 | // It needs some buffers for building the descriptors. |
| 48 | let mut config_descriptor = [0; 256]; | 41 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/nrf52840/src/bin/usb_serial_multitask.rs b/examples/nrf52840/src/bin/usb_serial_multitask.rs index 32fc5e094..5e5b4de35 100644 --- a/examples/nrf52840/src/bin/usb_serial_multitask.rs +++ b/examples/nrf52840/src/bin/usb_serial_multitask.rs | |||
| @@ -53,13 +53,6 @@ async fn main(spawner: Spawner) { | |||
| 53 | config.max_power = 100; | 53 | config.max_power = 100; |
| 54 | config.max_packet_size_0 = 64; | 54 | config.max_packet_size_0 = 64; |
| 55 | 55 | ||
| 56 | // Required for windows compatibility. | ||
| 57 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 58 | config.device_class = 0xEF; | ||
| 59 | config.device_sub_class = 0x02; | ||
| 60 | config.device_protocol = 0x01; | ||
| 61 | config.composite_with_iads = true; | ||
| 62 | |||
| 63 | static STATE: StaticCell<State> = StaticCell::new(); | 56 | static STATE: StaticCell<State> = StaticCell::new(); |
| 64 | let state = STATE.init(State::new()); | 57 | let state = STATE.init(State::new()); |
| 65 | 58 | ||
diff --git a/examples/nrf52840/src/bin/usb_serial_winusb.rs b/examples/nrf52840/src/bin/usb_serial_winusb.rs index 0352f9c66..8a20ce673 100644 --- a/examples/nrf52840/src/bin/usb_serial_winusb.rs +++ b/examples/nrf52840/src/bin/usb_serial_winusb.rs | |||
| @@ -41,13 +41,6 @@ async fn main(_spawner: Spawner) { | |||
| 41 | config.max_power = 100; | 41 | config.max_power = 100; |
| 42 | config.max_packet_size_0 = 64; | 42 | config.max_packet_size_0 = 64; |
| 43 | 43 | ||
| 44 | // Required for windows compatibility. | ||
| 45 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 46 | config.device_class = 0xEF; | ||
| 47 | config.device_sub_class = 0x02; | ||
| 48 | config.device_protocol = 0x01; | ||
| 49 | config.composite_with_iads = true; | ||
| 50 | |||
| 51 | // Create embassy-usb DeviceBuilder using the driver and config. | 44 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 52 | // It needs some buffers for building the descriptors. | 45 | // It needs some buffers for building the descriptors. |
| 53 | let mut config_descriptor = [0; 256]; | 46 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/nrf5340/Cargo.toml b/examples/nrf5340/Cargo.toml index 1792b277c..b9d336db7 100644 --- a/examples/nrf5340/Cargo.toml +++ b/examples/nrf5340/Cargo.toml | |||
| @@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0" | |||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 8 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 9 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 9 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 10 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } | 10 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } |
| 11 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 12 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf5340-app-s", "time-driver-rtc1", "gpiote", "unstable-pac"] } | 12 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf5340-app-s", "time-driver-rtc1", "gpiote", "unstable-pac"] } |
| 13 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"] } | 13 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"] } |
| 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
diff --git a/examples/nrf54l15/.cargo/config.toml b/examples/nrf54l15/.cargo/config.toml index 4a026ebbd..443bd7418 100644 --- a/examples/nrf54l15/.cargo/config.toml +++ b/examples/nrf54l15/.cargo/config.toml | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | [target.'cfg(all(target_arch = "arm", target_os = "none"))'] | 1 | [target.'cfg(all(target_arch = "arm", target_os = "none"))'] |
| 2 | # replace nRF82840_xxAA with your chip as listed in `probe-rs chip list` | 2 | # replace nRF82840_xxAA with your chip as listed in `probe-rs chip list` |
| 3 | runner = "../../sshprobe.sh" | 3 | runner = "probe-rs run --chip nrf54l15" |
| 4 | 4 | ||
| 5 | [build] | 5 | [build] |
| 6 | target = "thumbv8m.main-none-eabihf" | 6 | target = "thumbv8m.main-none-eabihf" |
diff --git a/examples/nrf54l15/Cargo.toml b/examples/nrf54l15/Cargo.toml index 7288ef6af..3f8f091ec 100644 --- a/examples/nrf54l15/Cargo.toml +++ b/examples/nrf54l15/Cargo.toml | |||
| @@ -5,8 +5,8 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 8 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 9 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 9 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 10 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf54l15-app-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 10 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf54l15-app-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } |
| 11 | 11 | ||
| 12 | defmt = "0.3" | 12 | defmt = "0.3" |
diff --git a/examples/nrf9151/ns/Cargo.toml b/examples/nrf9151/ns/Cargo.toml index 0353cf598..f32139d9e 100644 --- a/examples/nrf9151/ns/Cargo.toml +++ b/examples/nrf9151/ns/Cargo.toml | |||
| @@ -5,8 +5,8 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-executor = { version = "0.6.3", path = "../../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 8 | embassy-executor = { version = "0.7.0", path = "../../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 9 | embassy-time = { version = "0.3.2", path = "../../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 9 | embassy-time = { version = "0.4.0", path = "../../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 10 | embassy-nrf = { version = "0.2.0", path = "../../../embassy-nrf", features = ["defmt", "nrf9120-ns", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 10 | embassy-nrf = { version = "0.2.0", path = "../../../embassy-nrf", features = ["defmt", "nrf9120-ns", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } |
| 11 | 11 | ||
| 12 | defmt = "0.3" | 12 | defmt = "0.3" |
diff --git a/examples/nrf9151/s/Cargo.toml b/examples/nrf9151/s/Cargo.toml index 5d2302574..6ff5c4106 100644 --- a/examples/nrf9151/s/Cargo.toml +++ b/examples/nrf9151/s/Cargo.toml | |||
| @@ -5,8 +5,8 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-executor = { version = "0.6.3", path = "../../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 8 | embassy-executor = { version = "0.7.0", path = "../../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 9 | embassy-time = { version = "0.3.2", path = "../../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 9 | embassy-time = { version = "0.4.0", path = "../../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 10 | embassy-nrf = { version = "0.2.0", path = "../../../embassy-nrf", features = ["defmt", "nrf9120-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 10 | embassy-nrf = { version = "0.2.0", path = "../../../embassy-nrf", features = ["defmt", "nrf9120-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } |
| 11 | 11 | ||
| 12 | defmt = "0.3" | 12 | defmt = "0.3" |
diff --git a/examples/nrf9160/Cargo.toml b/examples/nrf9160/Cargo.toml index b52cd4af0..885adb337 100644 --- a/examples/nrf9160/Cargo.toml +++ b/examples/nrf9160/Cargo.toml | |||
| @@ -5,8 +5,8 @@ version = "0.1.0" | |||
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 8 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 9 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 9 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 10 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf9160-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 10 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf9160-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } |
| 11 | embassy-net-nrf91 = { version = "0.1.0", path = "../../embassy-net-nrf91", features = ["defmt"] } | 11 | embassy-net-nrf91 = { version = "0.1.0", path = "../../embassy-net-nrf91", features = ["defmt"] } |
| 12 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "proto-ipv4", "medium-ip"] } | 12 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "proto-ipv4", "medium-ip"] } |
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml index ce812b2e0..bdd50707a 100644 --- a/examples/rp/Cargo.toml +++ b/examples/rp/Cargo.toml | |||
| @@ -8,15 +8,15 @@ license = "MIT OR Apache-2.0" | |||
| 8 | [dependencies] | 8 | [dependencies] |
| 9 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal", features = ["defmt"] } | 9 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal", features = ["defmt"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-98304", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-98304", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 13 | embassy-rp = { version = "0.2.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp2040"] } | 13 | embassy-rp = { version = "0.2.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp2040"] } |
| 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 15 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "raw", "dhcpv4", "medium-ethernet", "dns", "proto-ipv4", "proto-ipv6", "multicast"] } | 15 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "raw", "dhcpv4", "medium-ethernet", "dns", "proto-ipv4", "proto-ipv6", "multicast"] } |
| 16 | embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] } | 16 | embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] } |
| 17 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 17 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 18 | embassy-usb-logger = { version = "0.2.0", path = "../../embassy-usb-logger" } | 18 | embassy-usb-logger = { version = "0.2.0", path = "../../embassy-usb-logger" } |
| 19 | cyw43 = { version = "0.2.0", path = "../../cyw43", features = ["defmt", "firmware-logs", "bluetooth"] } | 19 | cyw43 = { version = "0.2.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] } |
| 20 | cyw43-pio = { version = "0.2.0", path = "../../cyw43-pio", features = ["defmt"] } | 20 | cyw43-pio = { version = "0.2.0", path = "../../cyw43-pio", features = ["defmt"] } |
| 21 | 21 | ||
| 22 | defmt = "0.3" | 22 | defmt = "0.3" |
| @@ -60,9 +60,6 @@ pio = "0.2.1" | |||
| 60 | rand = { version = "0.8.5", default-features = false } | 60 | rand = { version = "0.8.5", default-features = false } |
| 61 | embedded-sdmmc = "0.7.0" | 61 | embedded-sdmmc = "0.7.0" |
| 62 | 62 | ||
| 63 | bt-hci = { version = "0.1.0", default-features = false, features = ["defmt"] } | ||
| 64 | trouble-host = { version = "0.1.0", features = ["defmt", "gatt"] } | ||
| 65 | |||
| 66 | [profile.release] | 63 | [profile.release] |
| 67 | debug = 2 | 64 | debug = 2 |
| 68 | lto = true | 65 | lto = true |
| @@ -74,7 +71,6 @@ lto = true | |||
| 74 | opt-level = "z" | 71 | opt-level = "z" |
| 75 | 72 | ||
| 76 | [patch.crates-io] | 73 | [patch.crates-io] |
| 77 | trouble-host = { git = "https://github.com/embassy-rs/trouble.git", rev = "4b8c0f499b34e46ca23a56e2d1640ede371722cf" } | ||
| 78 | embassy-executor = { path = "../../embassy-executor" } | 74 | embassy-executor = { path = "../../embassy-executor" } |
| 79 | embassy-sync = { path = "../../embassy-sync" } | 75 | embassy-sync = { path = "../../embassy-sync" } |
| 80 | embassy-futures = { path = "../../embassy-futures" } | 76 | embassy-futures = { path = "../../embassy-futures" } |
diff --git a/examples/rp/src/bin/bluetooth.rs b/examples/rp/src/bin/bluetooth.rs deleted file mode 100644 index 7524e7929..000000000 --- a/examples/rp/src/bin/bluetooth.rs +++ /dev/null | |||
| @@ -1,150 +0,0 @@ | |||
| 1 | //! This example test the RP Pico W on board LED. | ||
| 2 | //! | ||
| 3 | //! It does not work with the RP Pico board. See blinky.rs. | ||
| 4 | |||
| 5 | #![no_std] | ||
| 6 | #![no_main] | ||
| 7 | |||
| 8 | use bt_hci::controller::ExternalController; | ||
| 9 | use cyw43_pio::PioSpi; | ||
| 10 | use defmt::*; | ||
| 11 | use embassy_executor::Spawner; | ||
| 12 | use embassy_futures::join::join3; | ||
| 13 | use embassy_rp::bind_interrupts; | ||
| 14 | use embassy_rp::gpio::{Level, Output}; | ||
| 15 | use embassy_rp::peripherals::{DMA_CH0, PIO0}; | ||
| 16 | use embassy_rp::pio::{InterruptHandler, Pio}; | ||
| 17 | use embassy_sync::blocking_mutex::raw::NoopRawMutex; | ||
| 18 | use embassy_time::{Duration, Timer}; | ||
| 19 | use static_cell::StaticCell; | ||
| 20 | use trouble_host::advertise::{AdStructure, Advertisement, BR_EDR_NOT_SUPPORTED, LE_GENERAL_DISCOVERABLE}; | ||
| 21 | use trouble_host::attribute::{AttributeTable, CharacteristicProp, Service, Uuid}; | ||
| 22 | use trouble_host::gatt::GattEvent; | ||
| 23 | use trouble_host::{Address, BleHost, BleHostResources, PacketQos}; | ||
| 24 | use {defmt_rtt as _, embassy_time as _, panic_probe as _}; | ||
| 25 | |||
| 26 | bind_interrupts!(struct Irqs { | ||
| 27 | PIO0_IRQ_0 => InterruptHandler<PIO0>; | ||
| 28 | }); | ||
| 29 | |||
| 30 | #[embassy_executor::task] | ||
| 31 | async fn cyw43_task(runner: cyw43::Runner<'static, Output<'static>, PioSpi<'static, PIO0, 0, DMA_CH0>>) -> ! { | ||
| 32 | runner.run().await | ||
| 33 | } | ||
| 34 | |||
| 35 | #[embassy_executor::main] | ||
| 36 | async fn main(spawner: Spawner) { | ||
| 37 | let p = embassy_rp::init(Default::default()); | ||
| 38 | let fw = include_bytes!("../../../../cyw43-firmware/43439A0.bin"); | ||
| 39 | let clm = include_bytes!("../../../../cyw43-firmware/43439A0_clm.bin"); | ||
| 40 | let btfw = include_bytes!("../../../../cyw43-firmware/43439A0_btfw.bin"); | ||
| 41 | |||
| 42 | // To make flashing faster for development, you may want to flash the firmwares independently | ||
| 43 | // at hardcoded addresses, instead of baking them into the program with `include_bytes!`: | ||
| 44 | // probe-rs download 43439A0.bin --format bin --chip RP2040 --base-address 0x10100000 | ||
| 45 | // probe-rs download 43439A0_clm.bin --format bin --chip RP2040 --base-address 0x10140000 | ||
| 46 | // probe-rs download 43439A0_btfw.bin --format bin --chip RP2040 --base-address 0x10141400 | ||
| 47 | //let fw = unsafe { core::slice::from_raw_parts(0x10100000 as *const u8, 224190) }; | ||
| 48 | //let clm = unsafe { core::slice::from_raw_parts(0x10140000 as *const u8, 4752) }; | ||
| 49 | //let btfw = unsafe { core::slice::from_raw_parts(0x10141400 as *const u8, 6164) }; | ||
| 50 | |||
| 51 | let pwr = Output::new(p.PIN_23, Level::Low); | ||
| 52 | let cs = Output::new(p.PIN_25, Level::High); | ||
| 53 | let mut pio = Pio::new(p.PIO0, Irqs); | ||
| 54 | let spi = PioSpi::new(&mut pio.common, pio.sm0, pio.irq0, cs, p.PIN_24, p.PIN_29, p.DMA_CH0); | ||
| 55 | |||
| 56 | static STATE: StaticCell<cyw43::State> = StaticCell::new(); | ||
| 57 | let state = STATE.init(cyw43::State::new()); | ||
| 58 | let (_net_device, bt_device, mut control, runner) = cyw43::new_with_bluetooth(state, pwr, spi, fw, btfw).await; | ||
| 59 | unwrap!(spawner.spawn(cyw43_task(runner))); | ||
| 60 | control.init(clm).await; | ||
| 61 | |||
| 62 | let controller: ExternalController<_, 10> = ExternalController::new(bt_device); | ||
| 63 | static HOST_RESOURCES: StaticCell<BleHostResources<4, 32, 27>> = StaticCell::new(); | ||
| 64 | let host_resources = HOST_RESOURCES.init(BleHostResources::new(PacketQos::None)); | ||
| 65 | |||
| 66 | let mut ble: BleHost<'_, _> = BleHost::new(controller, host_resources); | ||
| 67 | |||
| 68 | ble.set_random_address(Address::random([0xff, 0x9f, 0x1a, 0x05, 0xe4, 0xff])); | ||
| 69 | let mut table: AttributeTable<'_, NoopRawMutex, 10> = AttributeTable::new(); | ||
| 70 | |||
| 71 | // Generic Access Service (mandatory) | ||
| 72 | let id = b"Pico W Bluetooth"; | ||
| 73 | let appearance = [0x80, 0x07]; | ||
| 74 | let mut bat_level = [0; 1]; | ||
| 75 | let handle = { | ||
| 76 | let mut svc = table.add_service(Service::new(0x1800)); | ||
| 77 | let _ = svc.add_characteristic_ro(0x2a00, id); | ||
| 78 | let _ = svc.add_characteristic_ro(0x2a01, &appearance[..]); | ||
| 79 | svc.build(); | ||
| 80 | |||
| 81 | // Generic attribute service (mandatory) | ||
| 82 | table.add_service(Service::new(0x1801)); | ||
| 83 | |||
| 84 | // Battery service | ||
| 85 | let mut svc = table.add_service(Service::new(0x180f)); | ||
| 86 | |||
| 87 | svc.add_characteristic( | ||
| 88 | 0x2a19, | ||
| 89 | &[CharacteristicProp::Read, CharacteristicProp::Notify], | ||
| 90 | &mut bat_level, | ||
| 91 | ) | ||
| 92 | .build() | ||
| 93 | }; | ||
| 94 | |||
| 95 | let mut adv_data = [0; 31]; | ||
| 96 | AdStructure::encode_slice( | ||
| 97 | &[ | ||
| 98 | AdStructure::Flags(LE_GENERAL_DISCOVERABLE | BR_EDR_NOT_SUPPORTED), | ||
| 99 | AdStructure::ServiceUuids16(&[Uuid::Uuid16([0x0f, 0x18])]), | ||
| 100 | AdStructure::CompleteLocalName(b"Pico W Bluetooth"), | ||
| 101 | ], | ||
| 102 | &mut adv_data[..], | ||
| 103 | ) | ||
| 104 | .unwrap(); | ||
| 105 | |||
| 106 | let server = ble.gatt_server(&table); | ||
| 107 | |||
| 108 | info!("Starting advertising and GATT service"); | ||
| 109 | let _ = join3( | ||
| 110 | ble.run(), | ||
| 111 | async { | ||
| 112 | loop { | ||
| 113 | match server.next().await { | ||
| 114 | Ok(GattEvent::Write { handle, connection: _ }) => { | ||
| 115 | let _ = table.get(handle, |value| { | ||
| 116 | info!("Write event. Value written: {:?}", value); | ||
| 117 | }); | ||
| 118 | } | ||
| 119 | Ok(GattEvent::Read { .. }) => { | ||
| 120 | info!("Read event"); | ||
| 121 | } | ||
| 122 | Err(e) => { | ||
| 123 | error!("Error processing GATT events: {:?}", e); | ||
| 124 | } | ||
| 125 | } | ||
| 126 | } | ||
| 127 | }, | ||
| 128 | async { | ||
| 129 | let mut advertiser = ble | ||
| 130 | .advertise( | ||
| 131 | &Default::default(), | ||
| 132 | Advertisement::ConnectableScannableUndirected { | ||
| 133 | adv_data: &adv_data[..], | ||
| 134 | scan_data: &[], | ||
| 135 | }, | ||
| 136 | ) | ||
| 137 | .await | ||
| 138 | .unwrap(); | ||
| 139 | let conn = advertiser.accept().await.unwrap(); | ||
| 140 | // Keep connection alive | ||
| 141 | let mut tick: u8 = 0; | ||
| 142 | loop { | ||
| 143 | Timer::after(Duration::from_secs(10)).await; | ||
| 144 | tick += 1; | ||
| 145 | server.notify(handle, &conn, &[tick]).await.unwrap(); | ||
| 146 | } | ||
| 147 | }, | ||
| 148 | ) | ||
| 149 | .await; | ||
| 150 | } | ||
diff --git a/examples/rp/src/bin/pio_uart.rs b/examples/rp/src/bin/pio_uart.rs index aaf2a524f..485c65204 100644 --- a/examples/rp/src/bin/pio_uart.rs +++ b/examples/rp/src/bin/pio_uart.rs | |||
| @@ -49,13 +49,6 @@ async fn main(_spawner: Spawner) { | |||
| 49 | config.max_power = 100; | 49 | config.max_power = 100; |
| 50 | config.max_packet_size_0 = 64; | 50 | config.max_packet_size_0 = 64; |
| 51 | 51 | ||
| 52 | // Required for windows compatibility. | ||
| 53 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 54 | config.device_class = 0xEF; | ||
| 55 | config.device_sub_class = 0x02; | ||
| 56 | config.device_protocol = 0x01; | ||
| 57 | config.composite_with_iads = true; | ||
| 58 | |||
| 59 | // Create embassy-usb DeviceBuilder using the driver and config. | 52 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 60 | // It needs some buffers for building the descriptors. | 53 | // It needs some buffers for building the descriptors. |
| 61 | let mut config_descriptor = [0; 256]; | 54 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/rp/src/bin/usb_ethernet.rs b/examples/rp/src/bin/usb_ethernet.rs index 9a15125d4..2add20bc6 100644 --- a/examples/rp/src/bin/usb_ethernet.rs +++ b/examples/rp/src/bin/usb_ethernet.rs | |||
| @@ -60,12 +60,6 @@ async fn main(spawner: Spawner) { | |||
| 60 | config.max_power = 100; | 60 | config.max_power = 100; |
| 61 | config.max_packet_size_0 = 64; | 61 | config.max_packet_size_0 = 64; |
| 62 | 62 | ||
| 63 | // Required for Windows support. | ||
| 64 | config.composite_with_iads = true; | ||
| 65 | config.device_class = 0xEF; | ||
| 66 | config.device_sub_class = 0x02; | ||
| 67 | config.device_protocol = 0x01; | ||
| 68 | |||
| 69 | // Create embassy-usb DeviceBuilder using the driver and config. | 63 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 70 | static CONFIG_DESC: StaticCell<[u8; 256]> = StaticCell::new(); | 64 | static CONFIG_DESC: StaticCell<[u8; 256]> = StaticCell::new(); |
| 71 | static BOS_DESC: StaticCell<[u8; 256]> = StaticCell::new(); | 65 | static BOS_DESC: StaticCell<[u8; 256]> = StaticCell::new(); |
diff --git a/examples/rp/src/bin/usb_midi.rs b/examples/rp/src/bin/usb_midi.rs index 11db1b2e1..3b7910f8b 100644 --- a/examples/rp/src/bin/usb_midi.rs +++ b/examples/rp/src/bin/usb_midi.rs | |||
| @@ -37,13 +37,6 @@ async fn main(_spawner: Spawner) { | |||
| 37 | config.max_power = 100; | 37 | config.max_power = 100; |
| 38 | config.max_packet_size_0 = 64; | 38 | config.max_packet_size_0 = 64; |
| 39 | 39 | ||
| 40 | // Required for windows compatibility. | ||
| 41 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 42 | config.device_class = 0xEF; | ||
| 43 | config.device_sub_class = 0x02; | ||
| 44 | config.device_protocol = 0x01; | ||
| 45 | config.composite_with_iads = true; | ||
| 46 | |||
| 47 | // Create embassy-usb DeviceBuilder using the driver and config. | 40 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 48 | // It needs some buffers for building the descriptors. | 41 | // It needs some buffers for building the descriptors. |
| 49 | let mut config_descriptor = [0; 256]; | 42 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/rp/src/bin/usb_raw.rs b/examples/rp/src/bin/usb_raw.rs index 97e7e0244..5974c04c0 100644 --- a/examples/rp/src/bin/usb_raw.rs +++ b/examples/rp/src/bin/usb_raw.rs | |||
| @@ -84,13 +84,6 @@ async fn main(_spawner: Spawner) { | |||
| 84 | config.max_power = 100; | 84 | config.max_power = 100; |
| 85 | config.max_packet_size_0 = 64; | 85 | config.max_packet_size_0 = 64; |
| 86 | 86 | ||
| 87 | // // Required for windows compatibility. | ||
| 88 | // // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 89 | config.device_class = 0xEF; | ||
| 90 | config.device_sub_class = 0x02; | ||
| 91 | config.device_protocol = 0x01; | ||
| 92 | config.composite_with_iads = true; | ||
| 93 | |||
| 94 | // Create embassy-usb DeviceBuilder using the driver and config. | 87 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 95 | // It needs some buffers for building the descriptors. | 88 | // It needs some buffers for building the descriptors. |
| 96 | let mut config_descriptor = [0; 256]; | 89 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/rp/src/bin/usb_raw_bulk.rs b/examples/rp/src/bin/usb_raw_bulk.rs index 331c3da4c..103269791 100644 --- a/examples/rp/src/bin/usb_raw_bulk.rs +++ b/examples/rp/src/bin/usb_raw_bulk.rs | |||
| @@ -62,13 +62,6 @@ async fn main(_spawner: Spawner) { | |||
| 62 | config.max_power = 100; | 62 | config.max_power = 100; |
| 63 | config.max_packet_size_0 = 64; | 63 | config.max_packet_size_0 = 64; |
| 64 | 64 | ||
| 65 | // // Required for windows compatibility. | ||
| 66 | // // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 67 | config.device_class = 0xEF; | ||
| 68 | config.device_sub_class = 0x02; | ||
| 69 | config.device_protocol = 0x01; | ||
| 70 | config.composite_with_iads = true; | ||
| 71 | |||
| 72 | // Create embassy-usb DeviceBuilder using the driver and config. | 65 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 73 | // It needs some buffers for building the descriptors. | 66 | // It needs some buffers for building the descriptors. |
| 74 | let mut config_descriptor = [0; 256]; | 67 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/rp/src/bin/usb_serial.rs b/examples/rp/src/bin/usb_serial.rs index 4a802994a..5e3f0f378 100644 --- a/examples/rp/src/bin/usb_serial.rs +++ b/examples/rp/src/bin/usb_serial.rs | |||
| @@ -37,13 +37,6 @@ async fn main(spawner: Spawner) { | |||
| 37 | config.serial_number = Some("12345678"); | 37 | config.serial_number = Some("12345678"); |
| 38 | config.max_power = 100; | 38 | config.max_power = 100; |
| 39 | config.max_packet_size_0 = 64; | 39 | config.max_packet_size_0 = 64; |
| 40 | |||
| 41 | // Required for windows compatibility. | ||
| 42 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 43 | config.device_class = 0xEF; | ||
| 44 | config.device_sub_class = 0x02; | ||
| 45 | config.device_protocol = 0x01; | ||
| 46 | config.composite_with_iads = true; | ||
| 47 | config | 40 | config |
| 48 | }; | 41 | }; |
| 49 | 42 | ||
diff --git a/examples/rp/src/bin/usb_serial_with_logger.rs b/examples/rp/src/bin/usb_serial_with_logger.rs index f9cfdef94..ea13a1e27 100644 --- a/examples/rp/src/bin/usb_serial_with_logger.rs +++ b/examples/rp/src/bin/usb_serial_with_logger.rs | |||
| @@ -37,13 +37,6 @@ async fn main(_spawner: Spawner) { | |||
| 37 | config.max_power = 100; | 37 | config.max_power = 100; |
| 38 | config.max_packet_size_0 = 64; | 38 | config.max_packet_size_0 = 64; |
| 39 | 39 | ||
| 40 | // Required for windows compatibility. | ||
| 41 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 42 | config.device_class = 0xEF; | ||
| 43 | config.device_sub_class = 0x02; | ||
| 44 | config.device_protocol = 0x01; | ||
| 45 | config.composite_with_iads = true; | ||
| 46 | |||
| 47 | // Create embassy-usb DeviceBuilder using the driver and config. | 40 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 48 | // It needs some buffers for building the descriptors. | 41 | // It needs some buffers for building the descriptors. |
| 49 | let mut config_descriptor = [0; 256]; | 42 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/rp23/Cargo.toml b/examples/rp23/Cargo.toml index 72eef222d..3afd2cddb 100644 --- a/examples/rp23/Cargo.toml +++ b/examples/rp23/Cargo.toml | |||
| @@ -8,15 +8,15 @@ license = "MIT OR Apache-2.0" | |||
| 8 | [dependencies] | 8 | [dependencies] |
| 9 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal", features = ["defmt"] } | 9 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal", features = ["defmt"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-98304", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-98304", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 13 | embassy-rp = { version = "0.2.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp235xa", "binary-info"] } | 13 | embassy-rp = { version = "0.2.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp235xa", "binary-info"] } |
| 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 15 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "raw", "dhcpv4", "medium-ethernet", "dns"] } | 15 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "raw", "dhcpv4", "medium-ethernet", "dns"] } |
| 16 | embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] } | 16 | embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] } |
| 17 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 17 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 18 | embassy-usb-logger = { version = "0.2.0", path = "../../embassy-usb-logger" } | 18 | embassy-usb-logger = { version = "0.2.0", path = "../../embassy-usb-logger" } |
| 19 | cyw43 = { version = "0.2.0", path = "../../cyw43", features = ["defmt", "firmware-logs", "bluetooth"] } | 19 | cyw43 = { version = "0.2.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] } |
| 20 | cyw43-pio = { version = "0.2.0", path = "../../cyw43-pio", features = ["defmt"] } | 20 | cyw43-pio = { version = "0.2.0", path = "../../cyw43-pio", features = ["defmt"] } |
| 21 | 21 | ||
| 22 | defmt = "0.3" | 22 | defmt = "0.3" |
| @@ -60,9 +60,6 @@ pio = "0.2.1" | |||
| 60 | rand = { version = "0.8.5", default-features = false } | 60 | rand = { version = "0.8.5", default-features = false } |
| 61 | embedded-sdmmc = "0.7.0" | 61 | embedded-sdmmc = "0.7.0" |
| 62 | 62 | ||
| 63 | bt-hci = { version = "0.1.0", default-features = false, features = ["defmt"] } | ||
| 64 | trouble-host = { version = "0.1.0", features = ["defmt", "gatt"] } | ||
| 65 | |||
| 66 | [profile.release] | 63 | [profile.release] |
| 67 | debug = 2 | 64 | debug = 2 |
| 68 | 65 | ||
| @@ -71,7 +68,6 @@ lto = true | |||
| 71 | opt-level = "z" | 68 | opt-level = "z" |
| 72 | 69 | ||
| 73 | [patch.crates-io] | 70 | [patch.crates-io] |
| 74 | trouble-host = { git = "https://github.com/embassy-rs/trouble.git", rev = "4b8c0f499b34e46ca23a56e2d1640ede371722cf" } | ||
| 75 | embassy-executor = { path = "../../embassy-executor" } | 71 | embassy-executor = { path = "../../embassy-executor" } |
| 76 | embassy-sync = { path = "../../embassy-sync" } | 72 | embassy-sync = { path = "../../embassy-sync" } |
| 77 | embassy-futures = { path = "../../embassy-futures" } | 73 | embassy-futures = { path = "../../embassy-futures" } |
diff --git a/examples/rp23/src/bin/pio_uart.rs b/examples/rp23/src/bin/pio_uart.rs index f8398c22a..672732c5b 100644 --- a/examples/rp23/src/bin/pio_uart.rs +++ b/examples/rp23/src/bin/pio_uart.rs | |||
| @@ -52,13 +52,6 @@ async fn main(_spawner: Spawner) { | |||
| 52 | config.max_power = 100; | 52 | config.max_power = 100; |
| 53 | config.max_packet_size_0 = 64; | 53 | config.max_packet_size_0 = 64; |
| 54 | 54 | ||
| 55 | // Required for windows compatibility. | ||
| 56 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 57 | config.device_class = 0xEF; | ||
| 58 | config.device_sub_class = 0x02; | ||
| 59 | config.device_protocol = 0x01; | ||
| 60 | config.composite_with_iads = true; | ||
| 61 | |||
| 62 | // Create embassy-usb DeviceBuilder using the driver and config. | 55 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 63 | // It needs some buffers for building the descriptors. | 56 | // It needs some buffers for building the descriptors. |
| 64 | let mut config_descriptor = [0; 256]; | 57 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/std/Cargo.toml b/examples/std/Cargo.toml index e43fd77c8..f67422f85 100644 --- a/examples/std/Cargo.toml +++ b/examples/std/Cargo.toml | |||
| @@ -6,9 +6,9 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["log"] } | 8 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["log"] } |
| 9 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-std", "executor-thread", "log"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-std", "executor-thread", "log"] } |
| 10 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["log", "std", ] } | 10 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["log", "std", ] } |
| 11 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features=[ "std", "log", "medium-ethernet", "medium-ip", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6"] } | 11 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features=[ "log", "medium-ethernet", "medium-ip", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6"] } |
| 12 | embassy-net-tuntap = { version = "0.1.0", path = "../../embassy-net-tuntap" } | 12 | embassy-net-tuntap = { version = "0.1.0", path = "../../embassy-net-tuntap" } |
| 13 | embassy-net-ppp = { version = "0.1.0", path = "../../embassy-net-ppp", features = ["log"]} | 13 | embassy-net-ppp = { version = "0.1.0", path = "../../embassy-net-ppp", features = ["log"]} |
| 14 | embedded-io-async = { version = "0.6.1" } | 14 | embedded-io-async = { version = "0.6.1" } |
diff --git a/examples/stm32c0/Cargo.toml b/examples/stm32c0/Cargo.toml index 5ac3018e1..21a6882ac 100644 --- a/examples/stm32c0/Cargo.toml +++ b/examples/stm32c0/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32c031c6 to your chip name, if necessary. | 8 | # Change stm32c031c6 to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "time-driver-any", "stm32c031c6", "memory-x", "unstable-pac", "exti"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "time-driver-any", "stm32c031c6", "memory-x", "unstable-pac", "exti"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | 13 | ||
| 14 | defmt = "0.3" | 14 | defmt = "0.3" |
| 15 | defmt-rtt = "0.4" | 15 | defmt-rtt = "0.4" |
diff --git a/examples/stm32f0/Cargo.toml b/examples/stm32f0/Cargo.toml index af3ef7abb..9bfc9701d 100644 --- a/examples/stm32f0/Cargo.toml +++ b/examples/stm32f0/Cargo.toml | |||
| @@ -13,8 +13,8 @@ defmt = "0.3" | |||
| 13 | defmt-rtt = "0.4" | 13 | defmt-rtt = "0.4" |
| 14 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 14 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 15 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 15 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 16 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 16 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 17 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 17 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 18 | static_cell = "2" | 18 | static_cell = "2" |
| 19 | portable-atomic = { version = "1.5", features = ["unsafe-assume-single-core"] } | 19 | portable-atomic = { version = "1.5", features = ["unsafe-assume-single-core"] } |
| 20 | 20 | ||
diff --git a/examples/stm32f1/Cargo.toml b/examples/stm32f1/Cargo.toml index 538e95dfb..4211a07a7 100644 --- a/examples/stm32f1/Cargo.toml +++ b/examples/stm32f1/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32f103c8 to your chip name, if necessary. | 8 | # Change stm32f103c8 to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-any" ] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-any" ] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 15 | 15 | ||
diff --git a/examples/stm32f2/Cargo.toml b/examples/stm32f2/Cargo.toml index 48d524b90..8b53b2f90 100644 --- a/examples/stm32f2/Cargo.toml +++ b/examples/stm32f2/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32f207zg to your chip name, if necessary. | 8 | # Change stm32f207zg to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32f207zg", "unstable-pac", "memory-x", "time-driver-any", "exti"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32f207zg", "unstable-pac", "memory-x", "time-driver-any", "exti"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | 13 | ||
| 14 | defmt = "0.3" | 14 | defmt = "0.3" |
| 15 | defmt-rtt = "0.4" | 15 | defmt-rtt = "0.4" |
diff --git a/examples/stm32f3/Cargo.toml b/examples/stm32f3/Cargo.toml index 66fb34223..60ec05f36 100644 --- a/examples/stm32f3/Cargo.toml +++ b/examples/stm32f3/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32f303ze to your chip name, if necessary. | 8 | # Change stm32f303ze to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32f303ze", "unstable-pac", "memory-x", "time-driver-tim2", "exti"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32f303ze", "unstable-pac", "memory-x", "time-driver-tim2", "exti"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 15 | 15 | ||
diff --git a/examples/stm32f334/Cargo.toml b/examples/stm32f334/Cargo.toml index c6b311fa5..02306c683 100644 --- a/examples/stm32f334/Cargo.toml +++ b/examples/stm32f334/Cargo.toml | |||
| @@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 10 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32f334r8", "unstable-pac", "memory-x", "time-driver-any", "exti"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32f334r8", "unstable-pac", "memory-x", "time-driver-any", "exti"] } |
| 12 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 12 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
diff --git a/examples/stm32f4/Cargo.toml b/examples/stm32f4/Cargo.toml index 4f0629fc6..8656dbc61 100644 --- a/examples/stm32f4/Cargo.toml +++ b/examples/stm32f4/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32f429zi to your chip name, if necessary. | 8 | # Change stm32f429zi to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32f429zi", "unstable-pac", "memory-x", "time-driver-tim4", "exti", "chrono"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32f429zi", "unstable-pac", "memory-x", "time-driver-tim4", "exti", "chrono"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt" ] } | 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt" ] } |
| 14 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", ] } | 14 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", ] } |
| 15 | embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] } | 15 | embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] } |
diff --git a/examples/stm32f4/src/bin/usb_ethernet.rs b/examples/stm32f4/src/bin/usb_ethernet.rs index a9504ec04..322cb90c7 100644 --- a/examples/stm32f4/src/bin/usb_ethernet.rs +++ b/examples/stm32f4/src/bin/usb_ethernet.rs | |||
| @@ -93,12 +93,6 @@ async fn main(spawner: Spawner) { | |||
| 93 | config.max_power = 100; | 93 | config.max_power = 100; |
| 94 | config.max_packet_size_0 = 64; | 94 | config.max_packet_size_0 = 64; |
| 95 | 95 | ||
| 96 | // Required for Windows support. | ||
| 97 | config.composite_with_iads = true; | ||
| 98 | config.device_class = 0xEF; | ||
| 99 | config.device_sub_class = 0x02; | ||
| 100 | config.device_protocol = 0x01; | ||
| 101 | |||
| 102 | // Create embassy-usb DeviceBuilder using the driver and config. | 96 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 103 | static CONFIG_DESC: StaticCell<[u8; 256]> = StaticCell::new(); | 97 | static CONFIG_DESC: StaticCell<[u8; 256]> = StaticCell::new(); |
| 104 | static BOS_DESC: StaticCell<[u8; 256]> = StaticCell::new(); | 98 | static BOS_DESC: StaticCell<[u8; 256]> = StaticCell::new(); |
diff --git a/examples/stm32f4/src/bin/usb_hid_keyboard.rs b/examples/stm32f4/src/bin/usb_hid_keyboard.rs index 1270995c4..d6b4a9bc9 100644 --- a/examples/stm32f4/src/bin/usb_hid_keyboard.rs +++ b/examples/stm32f4/src/bin/usb_hid_keyboard.rs | |||
| @@ -71,13 +71,6 @@ async fn main(_spawner: Spawner) { | |||
| 71 | config.max_power = 100; | 71 | config.max_power = 100; |
| 72 | config.max_packet_size_0 = 64; | 72 | config.max_packet_size_0 = 64; |
| 73 | 73 | ||
| 74 | // Required for windows compatibility. | ||
| 75 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 76 | config.device_class = 0xEF; | ||
| 77 | config.device_sub_class = 0x02; | ||
| 78 | config.device_protocol = 0x01; | ||
| 79 | config.composite_with_iads = true; | ||
| 80 | |||
| 81 | // Create embassy-usb DeviceBuilder using the driver and config. | 74 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 82 | // It needs some buffers for building the descriptors. | 75 | // It needs some buffers for building the descriptors. |
| 83 | let mut config_descriptor = [0; 256]; | 76 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/stm32f4/src/bin/usb_hid_mouse.rs b/examples/stm32f4/src/bin/usb_hid_mouse.rs index 45136f965..badb65e98 100644 --- a/examples/stm32f4/src/bin/usb_hid_mouse.rs +++ b/examples/stm32f4/src/bin/usb_hid_mouse.rs | |||
| @@ -66,13 +66,6 @@ async fn main(_spawner: Spawner) { | |||
| 66 | config.product = Some("HID mouse example"); | 66 | config.product = Some("HID mouse example"); |
| 67 | config.serial_number = Some("12345678"); | 67 | config.serial_number = Some("12345678"); |
| 68 | 68 | ||
| 69 | // Required for windows compatibility. | ||
| 70 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 71 | config.device_class = 0xEF; | ||
| 72 | config.device_sub_class = 0x02; | ||
| 73 | config.device_protocol = 0x01; | ||
| 74 | config.composite_with_iads = true; | ||
| 75 | |||
| 76 | // Create embassy-usb DeviceBuilder using the driver and config. | 69 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 77 | // It needs some buffers for building the descriptors. | 70 | // It needs some buffers for building the descriptors. |
| 78 | let mut config_descriptor = [0; 256]; | 71 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/stm32f4/src/bin/usb_raw.rs b/examples/stm32f4/src/bin/usb_raw.rs index b2d706208..bbbcc082b 100644 --- a/examples/stm32f4/src/bin/usb_raw.rs +++ b/examples/stm32f4/src/bin/usb_raw.rs | |||
| @@ -119,13 +119,6 @@ async fn main(_spawner: Spawner) { | |||
| 119 | config.product = Some("USB-raw example"); | 119 | config.product = Some("USB-raw example"); |
| 120 | config.serial_number = Some("12345678"); | 120 | config.serial_number = Some("12345678"); |
| 121 | 121 | ||
| 122 | // Required for windows compatibility. | ||
| 123 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 124 | config.device_class = 0xEF; | ||
| 125 | config.device_sub_class = 0x02; | ||
| 126 | config.device_protocol = 0x01; | ||
| 127 | config.composite_with_iads = true; | ||
| 128 | |||
| 129 | // Create embassy-usb DeviceBuilder using the driver and config. | 122 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 130 | // It needs some buffers for building the descriptors. | 123 | // It needs some buffers for building the descriptors. |
| 131 | let mut config_descriptor = [0; 256]; | 124 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/stm32f4/src/bin/usb_serial.rs b/examples/stm32f4/src/bin/usb_serial.rs index 328b5effe..e62b2d8d6 100644 --- a/examples/stm32f4/src/bin/usb_serial.rs +++ b/examples/stm32f4/src/bin/usb_serial.rs | |||
| @@ -66,13 +66,6 @@ async fn main(_spawner: Spawner) { | |||
| 66 | config.product = Some("USB-serial example"); | 66 | config.product = Some("USB-serial example"); |
| 67 | config.serial_number = Some("12345678"); | 67 | config.serial_number = Some("12345678"); |
| 68 | 68 | ||
| 69 | // Required for windows compatibility. | ||
| 70 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 71 | config.device_class = 0xEF; | ||
| 72 | config.device_sub_class = 0x02; | ||
| 73 | config.device_protocol = 0x01; | ||
| 74 | config.composite_with_iads = true; | ||
| 75 | |||
| 76 | // Create embassy-usb DeviceBuilder using the driver and config. | 69 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 77 | // It needs some buffers for building the descriptors. | 70 | // It needs some buffers for building the descriptors. |
| 78 | let mut config_descriptor = [0; 256]; | 71 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/stm32f4/src/bin/usb_uac_speaker.rs b/examples/stm32f4/src/bin/usb_uac_speaker.rs index e22e07e63..654bec498 100644 --- a/examples/stm32f4/src/bin/usb_uac_speaker.rs +++ b/examples/stm32f4/src/bin/usb_uac_speaker.rs | |||
| @@ -315,13 +315,6 @@ async fn main(spawner: Spawner) { | |||
| 315 | config.product = Some("USB-audio-speaker example"); | 315 | config.product = Some("USB-audio-speaker example"); |
| 316 | config.serial_number = Some("12345678"); | 316 | config.serial_number = Some("12345678"); |
| 317 | 317 | ||
| 318 | // Required for windows compatibility. | ||
| 319 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 320 | config.device_class = 0xEF; | ||
| 321 | config.device_sub_class = 0x02; | ||
| 322 | config.device_protocol = 0x01; | ||
| 323 | config.composite_with_iads = true; | ||
| 324 | |||
| 325 | let mut builder = embassy_usb::Builder::new( | 318 | let mut builder = embassy_usb::Builder::new( |
| 326 | usb_driver, | 319 | usb_driver, |
| 327 | config, | 320 | config, |
diff --git a/examples/stm32f469/Cargo.toml b/examples/stm32f469/Cargo.toml index a80409801..01984f594 100644 --- a/examples/stm32f469/Cargo.toml +++ b/examples/stm32f469/Cargo.toml | |||
| @@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0" | |||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | # Specific examples only for stm32f469 | 8 | # Specific examples only for stm32f469 |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32f469ni", "unstable-pac", "memory-x", "time-driver-any", "exti", "chrono"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32f469ni", "unstable-pac", "memory-x", "time-driver-any", "exti", "chrono"] } |
| 10 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 10 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 11 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 12 | 12 | ||
| 13 | defmt = "0.3" | 13 | defmt = "0.3" |
| 14 | defmt-rtt = "0.4" | 14 | defmt-rtt = "0.4" |
diff --git a/examples/stm32f7/Cargo.toml b/examples/stm32f7/Cargo.toml index 520b8bc42..45e56b63f 100644 --- a/examples/stm32f7/Cargo.toml +++ b/examples/stm32f7/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32f777zi to your chip name, if necessary. | 8 | # Change stm32f777zi to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32f777zi", "memory-x", "unstable-pac", "time-driver-any", "exti"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32f777zi", "memory-x", "unstable-pac", "time-driver-any", "exti"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"] } | 13 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"] } |
| 14 | embedded-io-async = { version = "0.6.1" } | 14 | embedded-io-async = { version = "0.6.1" } |
| 15 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 15 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
diff --git a/examples/stm32f7/src/bin/usb_serial.rs b/examples/stm32f7/src/bin/usb_serial.rs index 1906b28ed..349012888 100644 --- a/examples/stm32f7/src/bin/usb_serial.rs +++ b/examples/stm32f7/src/bin/usb_serial.rs | |||
| @@ -66,13 +66,6 @@ async fn main(_spawner: Spawner) { | |||
| 66 | config.product = Some("USB-serial example"); | 66 | config.product = Some("USB-serial example"); |
| 67 | config.serial_number = Some("12345678"); | 67 | config.serial_number = Some("12345678"); |
| 68 | 68 | ||
| 69 | // Required for windows compatibility. | ||
| 70 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 71 | config.device_class = 0xEF; | ||
| 72 | config.device_sub_class = 0x02; | ||
| 73 | config.device_protocol = 0x01; | ||
| 74 | config.composite_with_iads = true; | ||
| 75 | |||
| 76 | // Create embassy-usb DeviceBuilder using the driver and config. | 69 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 77 | // It needs some buffers for building the descriptors. | 70 | // It needs some buffers for building the descriptors. |
| 78 | let mut config_descriptor = [0; 256]; | 71 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/stm32g0/Cargo.toml b/examples/stm32g0/Cargo.toml index 3d11610ce..4aa665d64 100644 --- a/examples/stm32g0/Cargo.toml +++ b/examples/stm32g0/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32g0b1re to your chip name, if necessary. | 8 | # Change stm32g0b1re to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "time-driver-any", "stm32g0b1re", "memory-x", "unstable-pac", "exti"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "time-driver-any", "stm32g0b1re", "memory-x", "unstable-pac", "exti"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", default-features = false, features = ["defmt"] } | 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", default-features = false, features = ["defmt"] } |
| 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 15 | 15 | ||
diff --git a/examples/stm32g4/Cargo.toml b/examples/stm32g4/Cargo.toml index 87fa2c53a..83974f1af 100644 --- a/examples/stm32g4/Cargo.toml +++ b/examples/stm32g4/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32g491re to your chip name, if necessary. | 8 | # Change stm32g491re to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "time-driver-any", "stm32g491re", "memory-x", "unstable-pac", "exti"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "time-driver-any", "stm32g491re", "memory-x", "unstable-pac", "exti"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 15 | usbd-hid = "0.8.1" | 15 | usbd-hid = "0.8.1" |
diff --git a/examples/stm32g4/src/bin/usb_serial.rs b/examples/stm32g4/src/bin/usb_serial.rs index ed2ac7fac..9f66f0c53 100644 --- a/examples/stm32g4/src/bin/usb_serial.rs +++ b/examples/stm32g4/src/bin/usb_serial.rs | |||
| @@ -51,11 +51,6 @@ async fn main(_spawner: Spawner) { | |||
| 51 | config.product = Some("USB-Serial Example"); | 51 | config.product = Some("USB-Serial Example"); |
| 52 | config.serial_number = Some("123456"); | 52 | config.serial_number = Some("123456"); |
| 53 | 53 | ||
| 54 | config.device_class = 0xEF; | ||
| 55 | config.device_sub_class = 0x02; | ||
| 56 | config.device_protocol = 0x01; | ||
| 57 | config.composite_with_iads = true; | ||
| 58 | |||
| 59 | let mut config_descriptor = [0; 256]; | 54 | let mut config_descriptor = [0; 256]; |
| 60 | let mut bos_descriptor = [0; 256]; | 55 | let mut bos_descriptor = [0; 256]; |
| 61 | let mut control_buf = [0; 64]; | 56 | let mut control_buf = [0; 64]; |
diff --git a/examples/stm32h5/Cargo.toml b/examples/stm32h5/Cargo.toml index 516d491e5..7495b88ac 100644 --- a/examples/stm32h5/Cargo.toml +++ b/examples/stm32h5/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32h563zi to your chip name, if necessary. | 8 | # Change stm32h563zi to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h563zi", "memory-x", "time-driver-any", "exti", "unstable-pac", "low-power"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h563zi", "memory-x", "time-driver-any", "exti", "unstable-pac", "low-power"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6"] } | 13 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6"] } |
| 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
diff --git a/examples/stm32h5/src/bin/usb_c_pd.rs b/examples/stm32h5/src/bin/usb_c_pd.rs new file mode 100644 index 000000000..00cb3b3da --- /dev/null +++ b/examples/stm32h5/src/bin/usb_c_pd.rs | |||
| @@ -0,0 +1,92 @@ | |||
| 1 | //! This example targets the NUCLEO-H563ZI platform. | ||
| 2 | //! USB-C CC lines are protected by a TCPP01-M12 chipset. | ||
| 3 | #![no_std] | ||
| 4 | #![no_main] | ||
| 5 | |||
| 6 | use defmt::{error, info, Format}; | ||
| 7 | use embassy_executor::Spawner; | ||
| 8 | use embassy_stm32::gpio::Output; | ||
| 9 | use embassy_stm32::ucpd::{self, CcPhy, CcPull, CcSel, CcVState, Ucpd}; | ||
| 10 | use embassy_stm32::{bind_interrupts, peripherals, Config}; | ||
| 11 | use embassy_time::{with_timeout, Duration}; | ||
| 12 | use {defmt_rtt as _, panic_probe as _}; | ||
| 13 | |||
| 14 | bind_interrupts!(struct Irqs { | ||
| 15 | UCPD1 => ucpd::InterruptHandler<peripherals::UCPD1>; | ||
| 16 | }); | ||
| 17 | |||
| 18 | #[derive(Debug, Format)] | ||
| 19 | enum CableOrientation { | ||
| 20 | Normal, | ||
| 21 | Flipped, | ||
| 22 | DebugAccessoryMode, | ||
| 23 | } | ||
| 24 | |||
| 25 | // Returns true when the cable | ||
| 26 | async fn wait_attached<T: ucpd::Instance>(cc_phy: &mut CcPhy<'_, T>) -> CableOrientation { | ||
| 27 | loop { | ||
| 28 | let (cc1, cc2) = cc_phy.vstate(); | ||
| 29 | if cc1 == CcVState::LOWEST && cc2 == CcVState::LOWEST { | ||
| 30 | // Detached, wait until attached by monitoring the CC lines. | ||
| 31 | cc_phy.wait_for_vstate_change().await; | ||
| 32 | continue; | ||
| 33 | } | ||
| 34 | |||
| 35 | // Attached, wait for CC lines to be stable for tCCDebounce (100..200ms). | ||
| 36 | if with_timeout(Duration::from_millis(100), cc_phy.wait_for_vstate_change()) | ||
| 37 | .await | ||
| 38 | .is_ok() | ||
| 39 | { | ||
| 40 | // State has changed, restart detection procedure. | ||
| 41 | continue; | ||
| 42 | }; | ||
| 43 | |||
| 44 | // State was stable for the complete debounce period, check orientation. | ||
| 45 | return match (cc1, cc2) { | ||
| 46 | (_, CcVState::LOWEST) => CableOrientation::Normal, // CC1 connected | ||
| 47 | (CcVState::LOWEST, _) => CableOrientation::Flipped, // CC2 connected | ||
| 48 | _ => CableOrientation::DebugAccessoryMode, // Both connected (special cable) | ||
| 49 | }; | ||
| 50 | } | ||
| 51 | } | ||
| 52 | |||
| 53 | #[embassy_executor::main] | ||
| 54 | async fn main(_spawner: Spawner) { | ||
| 55 | let config = Config::default(); | ||
| 56 | let p = embassy_stm32::init(config); | ||
| 57 | |||
| 58 | info!("Hello World!"); | ||
| 59 | |||
| 60 | // This pin controls the dead-battery mode on the attached TCPP01-M12. | ||
| 61 | // If low, TCPP01-M12 disconnects CC lines and presents dead-battery resistance on CC lines, thus set high. | ||
| 62 | let _tcpp01_m12_ndb = Output::new(p.PA9, embassy_stm32::gpio::Level::High, embassy_stm32::gpio::Speed::Low); | ||
| 63 | |||
| 64 | let mut ucpd = Ucpd::new(p.UCPD1, Irqs {}, p.PB13, p.PB14, Default::default()); | ||
| 65 | ucpd.cc_phy().set_pull(CcPull::Sink); | ||
| 66 | |||
| 67 | info!("Waiting for USB connection..."); | ||
| 68 | let cable_orientation = wait_attached(ucpd.cc_phy()).await; | ||
| 69 | info!("USB cable connected, orientation: {}", cable_orientation); | ||
| 70 | |||
| 71 | let cc_sel = match cable_orientation { | ||
| 72 | CableOrientation::Normal => { | ||
| 73 | info!("Starting PD communication on CC1 pin"); | ||
| 74 | CcSel::CC1 | ||
| 75 | } | ||
| 76 | CableOrientation::Flipped => { | ||
| 77 | info!("Starting PD communication on CC2 pin"); | ||
| 78 | CcSel::CC2 | ||
| 79 | } | ||
| 80 | CableOrientation::DebugAccessoryMode => panic!("No PD communication in DAM"), | ||
| 81 | }; | ||
| 82 | let (_cc_phy, mut pd_phy) = ucpd.split_pd_phy(p.GPDMA1_CH0, p.GPDMA1_CH1, cc_sel); | ||
| 83 | |||
| 84 | loop { | ||
| 85 | // Enough space for the longest non-extended data message. | ||
| 86 | let mut buf = [0_u8; 30]; | ||
| 87 | match pd_phy.receive(buf.as_mut()).await { | ||
| 88 | Ok(n) => info!("USB PD RX: {=[u8]:?}", &buf[..n]), | ||
| 89 | Err(e) => error!("USB PD RX: {}", e), | ||
| 90 | } | ||
| 91 | } | ||
| 92 | } | ||
diff --git a/examples/stm32h5/src/bin/usb_serial.rs b/examples/stm32h5/src/bin/usb_serial.rs index fbcbdb5f9..e8f536133 100644 --- a/examples/stm32h5/src/bin/usb_serial.rs +++ b/examples/stm32h5/src/bin/usb_serial.rs | |||
| @@ -56,13 +56,6 @@ async fn main(_spawner: Spawner) { | |||
| 56 | config.product = Some("USB-serial example"); | 56 | config.product = Some("USB-serial example"); |
| 57 | config.serial_number = Some("12345678"); | 57 | config.serial_number = Some("12345678"); |
| 58 | 58 | ||
| 59 | // Required for windows compatibility. | ||
| 60 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 61 | config.device_class = 0xEF; | ||
| 62 | config.device_sub_class = 0x02; | ||
| 63 | config.device_protocol = 0x01; | ||
| 64 | config.composite_with_iads = true; | ||
| 65 | |||
| 66 | // Create embassy-usb DeviceBuilder using the driver and config. | 59 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 67 | // It needs some buffers for building the descriptors. | 60 | // It needs some buffers for building the descriptors. |
| 68 | let mut config_descriptor = [0; 256]; | 61 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/stm32h5/src/bin/usb_uac_speaker.rs b/examples/stm32h5/src/bin/usb_uac_speaker.rs index 8c24fa916..5d007261c 100644 --- a/examples/stm32h5/src/bin/usb_uac_speaker.rs +++ b/examples/stm32h5/src/bin/usb_uac_speaker.rs | |||
| @@ -309,13 +309,6 @@ async fn main(spawner: Spawner) { | |||
| 309 | config.product = Some("USB-audio-speaker example"); | 309 | config.product = Some("USB-audio-speaker example"); |
| 310 | config.serial_number = Some("12345678"); | 310 | config.serial_number = Some("12345678"); |
| 311 | 311 | ||
| 312 | // Required for windows compatibility. | ||
| 313 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 314 | config.device_class = 0xEF; | ||
| 315 | config.device_sub_class = 0x02; | ||
| 316 | config.device_protocol = 0x01; | ||
| 317 | config.composite_with_iads = true; | ||
| 318 | |||
| 319 | let mut builder = embassy_usb::Builder::new( | 312 | let mut builder = embassy_usb::Builder::new( |
| 320 | usb_driver, | 313 | usb_driver, |
| 321 | config, | 314 | config, |
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml index 68a0c3d88..3cefdcd31 100644 --- a/examples/stm32h7/Cargo.toml +++ b/examples/stm32h7/Cargo.toml | |||
| @@ -9,8 +9,8 @@ license = "MIT OR Apache-2.0" | |||
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h743bi", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h743bi", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal" } | 11 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal" } |
| 12 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 12 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 13 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 13 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 14 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] } | 14 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] } |
| 15 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 15 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 16 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 16 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
diff --git a/examples/stm32h7/src/bin/usb_serial.rs b/examples/stm32h7/src/bin/usb_serial.rs index 65ae597d4..50bb964da 100644 --- a/examples/stm32h7/src/bin/usb_serial.rs +++ b/examples/stm32h7/src/bin/usb_serial.rs | |||
| @@ -67,13 +67,6 @@ async fn main(_spawner: Spawner) { | |||
| 67 | config.product = Some("USB-serial example"); | 67 | config.product = Some("USB-serial example"); |
| 68 | config.serial_number = Some("12345678"); | 68 | config.serial_number = Some("12345678"); |
| 69 | 69 | ||
| 70 | // Required for windows compatibility. | ||
| 71 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 72 | config.device_class = 0xEF; | ||
| 73 | config.device_sub_class = 0x02; | ||
| 74 | config.device_protocol = 0x01; | ||
| 75 | config.composite_with_iads = true; | ||
| 76 | |||
| 77 | // Create embassy-usb DeviceBuilder using the driver and config. | 70 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 78 | // It needs some buffers for building the descriptors. | 71 | // It needs some buffers for building the descriptors. |
| 79 | let mut config_descriptor = [0; 256]; | 72 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/stm32h723/Cargo.toml b/examples/stm32h723/Cargo.toml index 82f3cb9c2..95a9c4a3d 100644 --- a/examples/stm32h723/Cargo.toml +++ b/examples/stm32h723/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32h723zg to your chip name, if necessary. | 8 | # Change stm32h723zg to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h723zg", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h723zg", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.2", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 14 | 14 | ||
| 15 | defmt = "0.3" | 15 | defmt = "0.3" |
diff --git a/examples/stm32h735/Cargo.toml b/examples/stm32h735/Cargo.toml index a517b9727..021dff0e3 100644 --- a/examples/stm32h735/Cargo.toml +++ b/examples/stm32h735/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h735ig", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] } | 8 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h735ig", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] } |
| 9 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 9 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 10 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal" } | 10 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal" } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 14 | 14 | ||
| 15 | defmt = "0.3" | 15 | defmt = "0.3" |
diff --git a/examples/stm32h755cm4/Cargo.toml b/examples/stm32h755cm4/Cargo.toml index 1d4d3eb85..f3fd5f894 100644 --- a/examples/stm32h755cm4/Cargo.toml +++ b/examples/stm32h755cm4/Cargo.toml | |||
| @@ -9,8 +9,8 @@ license = "MIT OR Apache-2.0" | |||
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h755zi-cm4", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h755zi-cm4", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal" } | 11 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal" } |
| 12 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 12 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 13 | embassy-time = { version = "0.3.1", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 13 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 14 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] } | 14 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] } |
| 15 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 15 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 16 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 16 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
diff --git a/examples/stm32h755cm7/Cargo.toml b/examples/stm32h755cm7/Cargo.toml index 76c88c806..81c8eecc2 100644 --- a/examples/stm32h755cm7/Cargo.toml +++ b/examples/stm32h755cm7/Cargo.toml | |||
| @@ -9,8 +9,8 @@ license = "MIT OR Apache-2.0" | |||
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h755zi-cm7", "time-driver-tim3", "exti", "memory-x", "unstable-pac", "chrono"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h755zi-cm7", "time-driver-tim3", "exti", "memory-x", "unstable-pac", "chrono"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal" } | 11 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal" } |
| 12 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 12 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 13 | embassy-time = { version = "0.3.1", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 13 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 14 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] } | 14 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] } |
| 15 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 15 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 16 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 16 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
diff --git a/examples/stm32h7b0/Cargo.toml b/examples/stm32h7b0/Cargo.toml index aba398fa5..660a340cf 100644 --- a/examples/stm32h7b0/Cargo.toml +++ b/examples/stm32h7b0/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h7b0vb", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] } | 8 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h7b0vb", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] } |
| 9 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 9 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 10 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal" } | 10 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal" } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] } | 13 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] } |
| 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
diff --git a/examples/stm32h7rs/Cargo.toml b/examples/stm32h7rs/Cargo.toml index 1d957e2cc..45bfde41c 100644 --- a/examples/stm32h7rs/Cargo.toml +++ b/examples/stm32h7rs/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32h743bi to your chip name, if necessary. | 8 | # Change stm32h743bi to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h7s3l8", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32h7s3l8", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] } | 13 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] } |
| 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
diff --git a/examples/stm32h7rs/src/bin/usb_serial.rs b/examples/stm32h7rs/src/bin/usb_serial.rs index 6773f7843..56a9884af 100644 --- a/examples/stm32h7rs/src/bin/usb_serial.rs +++ b/examples/stm32h7rs/src/bin/usb_serial.rs | |||
| @@ -70,12 +70,6 @@ async fn main(_spawner: Spawner) { | |||
| 70 | config.manufacturer = Some("Embassy"); | 70 | config.manufacturer = Some("Embassy"); |
| 71 | config.product = Some("USB-serial example"); | 71 | config.product = Some("USB-serial example"); |
| 72 | config.serial_number = Some("12345678"); | 72 | config.serial_number = Some("12345678"); |
| 73 | // Required for windows compatibility. | ||
| 74 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 75 | config.device_class = 0xEF; | ||
| 76 | config.device_sub_class = 0x02; | ||
| 77 | config.device_protocol = 0x01; | ||
| 78 | config.composite_with_iads = true; | ||
| 79 | 73 | ||
| 80 | // Create embassy-usb DeviceBuilder using the driver and config. | 74 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 81 | // It needs some buffers for building the descriptors. | 75 | // It needs some buffers for building the descriptors. |
diff --git a/examples/stm32l0/Cargo.toml b/examples/stm32l0/Cargo.toml index 5cc312a50..3acc62e96 100644 --- a/examples/stm32l0/Cargo.toml +++ b/examples/stm32l0/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32l072cz to your chip name, if necessary. | 8 | # Change stm32l072cz to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32l073rz", "unstable-pac", "time-driver-any", "exti", "memory-x"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32l073rz", "unstable-pac", "time-driver-any", "exti", "memory-x"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | 13 | ||
| 14 | defmt = "0.3" | 14 | defmt = "0.3" |
| 15 | defmt-rtt = "0.4" | 15 | defmt-rtt = "0.4" |
diff --git a/examples/stm32l1/Cargo.toml b/examples/stm32l1/Cargo.toml index 31b6785fa..67a7dfbe8 100644 --- a/examples/stm32l1/Cargo.toml +++ b/examples/stm32l1/Cargo.toml | |||
| @@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 8 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 9 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 9 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 10 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32l151cb-a", "time-driver-any", "memory-x"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32l151cb-a", "time-driver-any", "memory-x"] } |
| 12 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 12 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 13 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
diff --git a/examples/stm32l1/src/bin/usb_serial.rs b/examples/stm32l1/src/bin/usb_serial.rs index 837f7fa57..a35f1d7a7 100644 --- a/examples/stm32l1/src/bin/usb_serial.rs +++ b/examples/stm32l1/src/bin/usb_serial.rs | |||
| @@ -41,11 +41,6 @@ async fn main(_spawner: Spawner) { | |||
| 41 | config.product = Some("USB-Serial Example"); | 41 | config.product = Some("USB-Serial Example"); |
| 42 | config.serial_number = Some("123456"); | 42 | config.serial_number = Some("123456"); |
| 43 | 43 | ||
| 44 | config.device_class = 0xEF; | ||
| 45 | config.device_sub_class = 0x02; | ||
| 46 | config.device_protocol = 0x01; | ||
| 47 | config.composite_with_iads = true; | ||
| 48 | |||
| 49 | let mut config_descriptor = [0; 256]; | 44 | let mut config_descriptor = [0; 256]; |
| 50 | let mut bos_descriptor = [0; 256]; | 45 | let mut bos_descriptor = [0; 256]; |
| 51 | let mut control_buf = [0; 64]; | 46 | let mut control_buf = [0; 64]; |
diff --git a/examples/stm32l4/Cargo.toml b/examples/stm32l4/Cargo.toml index 3fde18ecd..7d08a18ed 100644 --- a/examples/stm32l4/Cargo.toml +++ b/examples/stm32l4/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32l4s5vi to your chip name, if necessary. | 8 | # Change stm32l4s5vi to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "unstable-pac", "stm32l4r5zi", "memory-x", "time-driver-any", "exti", "chrono"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "unstable-pac", "stm32l4r5zi", "memory-x", "time-driver-any", "exti", "chrono"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768", ] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768", ] } |
| 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal" } |
| 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 15 | embassy-net-adin1110 = { version = "0.2.0", path = "../../embassy-net-adin1110" } | 15 | embassy-net-adin1110 = { version = "0.2.0", path = "../../embassy-net-adin1110" } |
diff --git a/examples/stm32l4/src/bin/usb_serial.rs b/examples/stm32l4/src/bin/usb_serial.rs index c3b1211d8..af90e297e 100644 --- a/examples/stm32l4/src/bin/usb_serial.rs +++ b/examples/stm32l4/src/bin/usb_serial.rs | |||
| @@ -62,13 +62,6 @@ async fn main(_spawner: Spawner) { | |||
| 62 | config.product = Some("USB-serial example"); | 62 | config.product = Some("USB-serial example"); |
| 63 | config.serial_number = Some("12345678"); | 63 | config.serial_number = Some("12345678"); |
| 64 | 64 | ||
| 65 | // Required for windows compatibility. | ||
| 66 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 67 | config.device_class = 0xEF; | ||
| 68 | config.device_sub_class = 0x02; | ||
| 69 | config.device_protocol = 0x01; | ||
| 70 | config.composite_with_iads = true; | ||
| 71 | |||
| 72 | // Create embassy-usb DeviceBuilder using the driver and config. | 65 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 73 | // It needs some buffers for building the descriptors. | 66 | // It needs some buffers for building the descriptors. |
| 74 | let mut config_descriptor = [0; 256]; | 67 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/stm32l5/Cargo.toml b/examples/stm32l5/Cargo.toml index 2b8a2c064..281dea430 100644 --- a/examples/stm32l5/Cargo.toml +++ b/examples/stm32l5/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32l552ze to your chip name, if necessary. | 8 | # Change stm32l552ze to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "unstable-pac", "stm32l552ze", "time-driver-any", "exti", "memory-x", "low-power"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "unstable-pac", "stm32l552ze", "time-driver-any", "exti", "memory-x", "low-power"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 14 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"] } | 14 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"] } |
| 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
diff --git a/examples/stm32l5/src/bin/usb_ethernet.rs b/examples/stm32l5/src/bin/usb_ethernet.rs index 095d50c73..809ec6ab1 100644 --- a/examples/stm32l5/src/bin/usb_ethernet.rs +++ b/examples/stm32l5/src/bin/usb_ethernet.rs | |||
| @@ -72,12 +72,6 @@ async fn main(spawner: Spawner) { | |||
| 72 | config.max_power = 100; | 72 | config.max_power = 100; |
| 73 | config.max_packet_size_0 = 64; | 73 | config.max_packet_size_0 = 64; |
| 74 | 74 | ||
| 75 | // Required for Windows support. | ||
| 76 | config.composite_with_iads = true; | ||
| 77 | config.device_class = 0xEF; | ||
| 78 | config.device_sub_class = 0x02; | ||
| 79 | config.device_protocol = 0x01; | ||
| 80 | |||
| 81 | // Create embassy-usb DeviceBuilder using the driver and config. | 75 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 82 | static CONFIG_DESC: StaticCell<[u8; 256]> = StaticCell::new(); | 76 | static CONFIG_DESC: StaticCell<[u8; 256]> = StaticCell::new(); |
| 83 | static BOS_DESC: StaticCell<[u8; 256]> = StaticCell::new(); | 77 | static BOS_DESC: StaticCell<[u8; 256]> = StaticCell::new(); |
diff --git a/examples/stm32u0/Cargo.toml b/examples/stm32u0/Cargo.toml index 11953acfc..1813881ba 100644 --- a/examples/stm32u0/Cargo.toml +++ b/examples/stm32u0/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32u083rc to your chip name, if necessary. | 8 | # Change stm32u083rc to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "time-driver-any", "stm32u083rc", "memory-x", "unstable-pac", "exti", "chrono"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "time-driver-any", "stm32u083rc", "memory-x", "unstable-pac", "exti", "chrono"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", default-features = false, features = ["defmt"] } | 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", default-features = false, features = ["defmt"] } |
| 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 15 | 15 | ||
diff --git a/examples/stm32u5/Cargo.toml b/examples/stm32u5/Cargo.toml index 68a17ce43..f56ee024e 100644 --- a/examples/stm32u5/Cargo.toml +++ b/examples/stm32u5/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32u5g9zj to your chip name, if necessary. | 8 | # Change stm32u5g9zj to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "unstable-pac", "stm32u5g9zj", "time-driver-any", "memory-x" ] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "unstable-pac", "stm32u5g9zj", "time-driver-any", "memory-x" ] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } | 13 | embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] } |
| 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 15 | 15 | ||
diff --git a/examples/stm32u5/src/bin/usb_hs_serial.rs b/examples/stm32u5/src/bin/usb_hs_serial.rs index 5549e2cbb..d37e7777b 100644 --- a/examples/stm32u5/src/bin/usb_hs_serial.rs +++ b/examples/stm32u5/src/bin/usb_hs_serial.rs | |||
| @@ -59,13 +59,6 @@ async fn main(_spawner: Spawner) { | |||
| 59 | config.product = Some("USB-serial example"); | 59 | config.product = Some("USB-serial example"); |
| 60 | config.serial_number = Some("12345678"); | 60 | config.serial_number = Some("12345678"); |
| 61 | 61 | ||
| 62 | // Required for windows compatibility. | ||
| 63 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 64 | config.device_class = 0xEF; | ||
| 65 | config.device_sub_class = 0x02; | ||
| 66 | config.device_protocol = 0x01; | ||
| 67 | config.composite_with_iads = true; | ||
| 68 | |||
| 69 | // Create embassy-usb DeviceBuilder using the driver and config. | 62 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 70 | // It needs some buffers for building the descriptors. | 63 | // It needs some buffers for building the descriptors. |
| 71 | let mut config_descriptor = [0; 256]; | 64 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/stm32u5/src/bin/usb_serial.rs b/examples/stm32u5/src/bin/usb_serial.rs index 4bb1a6079..ff7f4e5be 100644 --- a/examples/stm32u5/src/bin/usb_serial.rs +++ b/examples/stm32u5/src/bin/usb_serial.rs | |||
| @@ -56,13 +56,6 @@ async fn main(_spawner: Spawner) { | |||
| 56 | config.product = Some("USB-serial example"); | 56 | config.product = Some("USB-serial example"); |
| 57 | config.serial_number = Some("12345678"); | 57 | config.serial_number = Some("12345678"); |
| 58 | 58 | ||
| 59 | // Required for windows compatibility. | ||
| 60 | // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help | ||
| 61 | config.device_class = 0xEF; | ||
| 62 | config.device_sub_class = 0x02; | ||
| 63 | config.device_protocol = 0x01; | ||
| 64 | config.composite_with_iads = true; | ||
| 65 | |||
| 66 | // Create embassy-usb DeviceBuilder using the driver and config. | 59 | // Create embassy-usb DeviceBuilder using the driver and config. |
| 67 | // It needs some buffers for building the descriptors. | 60 | // It needs some buffers for building the descriptors. |
| 68 | let mut config_descriptor = [0; 256]; | 61 | let mut config_descriptor = [0; 256]; |
diff --git a/examples/stm32wb/Cargo.toml b/examples/stm32wb/Cargo.toml index ecc72397b..1b8535d8a 100644 --- a/examples/stm32wb/Cargo.toml +++ b/examples/stm32wb/Cargo.toml | |||
| @@ -9,8 +9,8 @@ license = "MIT OR Apache-2.0" | |||
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32wb55rg", "time-driver-any", "memory-x", "exti"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32wb55rg", "time-driver-any", "memory-x", "exti"] } |
| 10 | embassy-stm32-wpan = { version = "0.1.0", path = "../../embassy-stm32-wpan", features = ["defmt", "stm32wb55rg"] } | 10 | embassy-stm32-wpan = { version = "0.1.0", path = "../../embassy-stm32-wpan", features = ["defmt", "stm32wb55rg"] } |
| 11 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 11 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 12 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } | 12 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } |
| 13 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 13 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 14 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "udp", "proto-ipv6", "medium-ieee802154", ], optional=true } | 14 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "udp", "proto-ipv6", "medium-ieee802154", ], optional=true } |
| 15 | 15 | ||
| 16 | defmt = "0.3" | 16 | defmt = "0.3" |
diff --git a/examples/stm32wba/Cargo.toml b/examples/stm32wba/Cargo.toml index 7735dfdde..126f47e42 100644 --- a/examples/stm32wba/Cargo.toml +++ b/examples/stm32wba/Cargo.toml | |||
| @@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0" | |||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32wba52cg", "time-driver-any", "memory-x", "exti"] } | 8 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32wba52cg", "time-driver-any", "memory-x", "exti"] } |
| 9 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 9 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 10 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } | 10 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } |
| 11 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 12 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "udp", "proto-ipv6", "medium-ieee802154", ], optional=true } | 12 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "udp", "proto-ipv6", "medium-ieee802154", ], optional=true } |
| 13 | 13 | ||
| 14 | defmt = "0.3" | 14 | defmt = "0.3" |
diff --git a/examples/stm32wl/Cargo.toml b/examples/stm32wl/Cargo.toml index 0182745e5..7dbb40567 100644 --- a/examples/stm32wl/Cargo.toml +++ b/examples/stm32wl/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | # Change stm32wl55jc-cm4 to your chip name, if necessary. | 8 | # Change stm32wl55jc-cm4 to your chip name, if necessary. |
| 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32wl55jc-cm4", "time-driver-any", "memory-x", "unstable-pac", "exti", "chrono"] } | 9 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32wl55jc-cm4", "time-driver-any", "memory-x", "unstable-pac", "exti", "chrono"] } |
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-4096", "arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-4096", "arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal" } | 13 | embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal" } |
| 14 | 14 | ||
| 15 | defmt = "0.3" | 15 | defmt = "0.3" |
diff --git a/examples/wasm/Cargo.toml b/examples/wasm/Cargo.toml index f5dcdc0a2..8a97f4d25 100644 --- a/examples/wasm/Cargo.toml +++ b/examples/wasm/Cargo.toml | |||
| @@ -9,8 +9,8 @@ crate-type = ["cdylib"] | |||
| 9 | 9 | ||
| 10 | [dependencies] | 10 | [dependencies] |
| 11 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["log"] } | 11 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["log"] } |
| 12 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-wasm", "executor-thread", "log"] } | 12 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-wasm", "executor-thread", "log"] } |
| 13 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["log", "wasm", ] } | 13 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["log", "wasm", ] } |
| 14 | 14 | ||
| 15 | wasm-logger = "0.2.0" | 15 | wasm-logger = "0.2.0" |
| 16 | wasm-bindgen = "0.2" | 16 | wasm-bindgen = "0.2" |
diff --git a/rust-toolchain-nightly.toml b/rust-toolchain-nightly.toml index d0c92e655..6efd98956 100644 --- a/rust-toolchain-nightly.toml +++ b/rust-toolchain-nightly.toml | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | [toolchain] | 1 | [toolchain] |
| 2 | channel = "nightly-2024-11-04" | 2 | channel = "nightly-2024-12-10" |
| 3 | components = [ "rust-src", "rustfmt", "llvm-tools", "miri" ] | 3 | components = [ "rust-src", "rustfmt", "llvm-tools", "miri" ] |
| 4 | targets = [ | 4 | targets = [ |
| 5 | "thumbv7em-none-eabi", | 5 | "thumbv7em-none-eabi", |
diff --git a/tests/nrf/Cargo.toml b/tests/nrf/Cargo.toml index 7af3d0649..e0c5e90cf 100644 --- a/tests/nrf/Cargo.toml +++ b/tests/nrf/Cargo.toml | |||
| @@ -9,8 +9,8 @@ teleprobe-meta = "1" | |||
| 9 | 9 | ||
| 10 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 10 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 11 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt", ] } | 11 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt", ] } |
| 12 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 12 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 13 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 13 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 14 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "time-driver-rtc1", "gpiote", "unstable-pac"] } | 14 | embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "time-driver-rtc1", "gpiote", "unstable-pac"] } |
| 15 | embedded-io-async = { version = "0.6.1", features = ["defmt-03"] } | 15 | embedded-io-async = { version = "0.6.1", features = ["defmt-03"] } |
| 16 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", ] } | 16 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", ] } |
diff --git a/tests/perf-client/Cargo.toml b/tests/perf-client/Cargo.toml index 3bbc1b613..22137e2e7 100644 --- a/tests/perf-client/Cargo.toml +++ b/tests/perf-client/Cargo.toml | |||
| @@ -5,6 +5,6 @@ edition = "2021" | |||
| 5 | 5 | ||
| 6 | [dependencies] | 6 | [dependencies] |
| 7 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4"] } | 7 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4"] } |
| 8 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", ] } | 8 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", ] } |
| 9 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 9 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 10 | defmt = "0.3.0" | 10 | defmt = "0.3.0" |
diff --git a/tests/riscv32/Cargo.toml b/tests/riscv32/Cargo.toml index e76e07d7c..51a113115 100644 --- a/tests/riscv32/Cargo.toml +++ b/tests/riscv32/Cargo.toml | |||
| @@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0" | |||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | critical-section = { version = "1.1.1", features = ["restore-state-bool"] } | 8 | critical-section = { version = "1.1.1", features = ["restore-state-bool"] } |
| 9 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync" } | 9 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync" } |
| 10 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-riscv32", "executor-thread"] } | 10 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-riscv32", "executor-thread"] } |
| 11 | embassy-time = { version = "0.3.2", path = "../../embassy-time" } | 11 | embassy-time = { version = "0.4.0", path = "../../embassy-time" } |
| 12 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 12 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 13 | 13 | ||
| 14 | riscv-rt = "0.12.2" | 14 | riscv-rt = "0.12.2" |
diff --git a/tests/rp/Cargo.toml b/tests/rp/Cargo.toml index 8cd40418a..d5aabc6ac 100644 --- a/tests/rp/Cargo.toml +++ b/tests/rp/Cargo.toml | |||
| @@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0" | |||
| 8 | teleprobe-meta = "1.1" | 8 | teleprobe-meta = "1.1" |
| 9 | 9 | ||
| 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } | 11 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] } |
| 12 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", ] } | 12 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", ] } |
| 13 | embassy-rp = { version = "0.2.0", path = "../../embassy-rp", features = [ "defmt", "unstable-pac", "time-driver", "critical-section-impl", "intrinsics", "rom-v2-intrinsics", "run-from-ram", "rp2040"] } | 13 | embassy-rp = { version = "0.2.0", path = "../../embassy-rp", features = [ "defmt", "unstable-pac", "time-driver", "critical-section-impl", "intrinsics", "rom-v2-intrinsics", "run-from-ram", "rp2040"] } |
| 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 14 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 15 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "dhcpv4", "medium-ethernet"] } | 15 | embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "dhcpv4", "medium-ethernet"] } |
diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml index 5ae6878cc..afc96cb61 100644 --- a/tests/stm32/Cargo.toml +++ b/tests/stm32/Cargo.toml | |||
| @@ -60,8 +60,8 @@ cm0 = ["portable-atomic/unsafe-assume-single-core"] | |||
| 60 | teleprobe-meta = "1" | 60 | teleprobe-meta = "1" |
| 61 | 61 | ||
| 62 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } | 62 | embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] } |
| 63 | embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } | 63 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] } |
| 64 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "tick-hz-131_072", "defmt-timestamp-uptime"] } | 64 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "tick-hz-131_072", "defmt-timestamp-uptime"] } |
| 65 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "unstable-pac", "memory-x", "time-driver-any"] } | 65 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "unstable-pac", "memory-x", "time-driver-any"] } |
| 66 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 66 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 67 | embassy-stm32-wpan = { version = "0.1.0", path = "../../embassy-stm32-wpan", optional = true, features = ["defmt", "stm32wb55rg", "ble"] } | 67 | embassy-stm32-wpan = { version = "0.1.0", path = "../../embassy-stm32-wpan", optional = true, features = ["defmt", "stm32wb55rg", "ble"] } |
