mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-10-03 15:14:40 +00:00
Merge branch 'embassy-rs:main' into u5_adc
This commit is contained in:
commit
0836392219
2
.github/ci/build-xtensa.sh
vendored
2
.github/ci/build-xtensa.sh
vendored
@ -13,7 +13,7 @@ export CARGO_TARGET_DIR=/ci/cache/target
|
||||
export CARGO_NET_GIT_FETCH_WITH_CLI=true
|
||||
|
||||
cargo install espup
|
||||
/ci/cache/cargo/bin/espup install
|
||||
/ci/cache/cargo/bin/espup install --toolchain-version 1.83.0.1
|
||||
|
||||
# Restore lockfiles
|
||||
if [ -f /ci/cache/lockfiles.tar ]; then
|
||||
|
2
.github/ci/doc.sh
vendored
2
.github/ci/doc.sh
vendored
@ -32,7 +32,7 @@ docserver-builder -i ./embassy-stm32-wpan -o webroot/crates/embassy-stm32-wpan/g
|
||||
|
||||
docserver-builder -i ./embassy-time -o webroot/crates/embassy-time/git.zup
|
||||
docserver-builder -i ./embassy-time-driver -o webroot/crates/embassy-time-driver/git.zup
|
||||
docserver-builder -i ./embassy-time-queue-driver -o webroot/crates/embassy-time-queue-driver/git.zup
|
||||
docserver-builder -i ./embassy-time-queue-utils -o webroot/crates/embassy-time-queue-utils/git.zup
|
||||
|
||||
docserver-builder -i ./embassy-usb -o webroot/crates/embassy-usb/git.zup
|
||||
docserver-builder -i ./embassy-usb-dfu -o webroot/crates/embassy-usb-dfu/git.zup
|
||||
|
2
.github/ci/test.sh
vendored
2
.github/ci/test.sh
vendored
@ -17,7 +17,7 @@ cargo test --manifest-path ./embassy-futures/Cargo.toml
|
||||
cargo test --manifest-path ./embassy-sync/Cargo.toml
|
||||
cargo test --manifest-path ./embassy-embedded-hal/Cargo.toml
|
||||
cargo test --manifest-path ./embassy-hal-internal/Cargo.toml
|
||||
cargo test --manifest-path ./embassy-time/Cargo.toml --features mock-driver,embassy-time-queue-driver/generic-queue-8
|
||||
cargo test --manifest-path ./embassy-time/Cargo.toml --features mock-driver,embassy-time-queue-utils/generic-queue-8
|
||||
cargo test --manifest-path ./embassy-time-driver/Cargo.toml
|
||||
|
||||
cargo test --manifest-path ./embassy-boot/Cargo.toml
|
||||
|
@ -22,8 +22,8 @@ cargo batch \
|
||||
--- build --release --manifest-path embassy-executor/Cargo.toml --target xtensa-esp32-none-elf --features arch-spin,executor-thread \
|
||||
--- build --release --manifest-path embassy-sync/Cargo.toml --target xtensa-esp32s2-none-elf --features defmt \
|
||||
--- build --release --manifest-path embassy-time/Cargo.toml --target xtensa-esp32s2-none-elf --features defmt,defmt-timestamp-uptime,mock-driver \
|
||||
--- build --release --manifest-path embassy-time-queue-driver/Cargo.toml --target xtensa-esp32s2-none-elf \
|
||||
--- build --release --manifest-path embassy-time-queue-driver/Cargo.toml --target xtensa-esp32s2-none-elf --features generic-queue-8 \
|
||||
--- build --release --manifest-path embassy-time-queue-utils/Cargo.toml --target xtensa-esp32s2-none-elf \
|
||||
--- build --release --manifest-path embassy-time-queue-utils/Cargo.toml --target xtensa-esp32s2-none-elf --features generic-queue-8 \
|
||||
--- build --release --manifest-path embassy-net/Cargo.toml --target xtensa-esp32-none-elf --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet,packet-trace \
|
||||
--- build --release --manifest-path embassy-net/Cargo.toml --target xtensa-esp32-none-elf --features defmt,tcp,udp,dns,proto-ipv4,multicast,medium-ethernet \
|
||||
--- build --release --manifest-path embassy-net/Cargo.toml --target xtensa-esp32-none-elf --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \
|
||||
|
4
ci.sh
4
ci.sh
@ -39,8 +39,8 @@ cargo batch \
|
||||
--- build --release --manifest-path embassy-executor/Cargo.toml --target riscv32imac-unknown-none-elf --features arch-riscv32,executor-thread \
|
||||
--- build --release --manifest-path embassy-sync/Cargo.toml --target thumbv6m-none-eabi --features defmt \
|
||||
--- build --release --manifest-path embassy-time/Cargo.toml --target thumbv6m-none-eabi --features defmt,defmt-timestamp-uptime,mock-driver \
|
||||
--- build --release --manifest-path embassy-time-queue-driver/Cargo.toml --target thumbv6m-none-eabi \
|
||||
--- build --release --manifest-path embassy-time-queue-driver/Cargo.toml --target thumbv6m-none-eabi --features generic-queue-8 \
|
||||
--- build --release --manifest-path embassy-time-queue-utils/Cargo.toml --target thumbv6m-none-eabi \
|
||||
--- build --release --manifest-path embassy-time-queue-utils/Cargo.toml --target thumbv6m-none-eabi --features generic-queue-8 \
|
||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,medium-ethernet,packet-trace \
|
||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,proto-ipv4,multicast,medium-ethernet \
|
||||
--- build --release --manifest-path embassy-net/Cargo.toml --target thumbv7em-none-eabi --features defmt,tcp,udp,dns,dhcpv4,medium-ethernet \
|
||||
|
@ -18,7 +18,7 @@ bluetooth = ["dep:bt-hci", "dep:embedded-io-async"]
|
||||
firmware-logs = []
|
||||
|
||||
[dependencies]
|
||||
embassy-time = { version = "0.3.2", path = "../embassy-time"}
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time"}
|
||||
embassy-sync = { version = "0.6.1", path = "../embassy-sync"}
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures"}
|
||||
embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel"}
|
||||
|
@ -6,8 +6,8 @@ version = "0.1.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-executor = { version = "0.6.3", path = "../../../embassy-executor", features = ["defmt", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../../embassy-time", features = ["defmt"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../../embassy-executor", features = ["defmt", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../../embassy-time", features = ["defmt"] }
|
||||
embassy-nrf = { version = "0.2.0", path = "../../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote"] }
|
||||
|
||||
defmt = "0.3"
|
||||
|
@ -140,9 +140,9 @@ Example:
|
||||
[source,toml]
|
||||
----
|
||||
[patch.crates-io]
|
||||
embassy-time-queue-driver = { git = "https://github.com/embassy-rs/embassy.git", rev = "e5fdd35" }
|
||||
embassy-time-driver = { git = "https://github.com/embassy-rs/embassy.git", rev = "e5fdd35" }
|
||||
# embassy-time = { git = "https://github.com/embassy-rs/embassy.git", rev = "e5fdd35" }
|
||||
embassy-time-queue-utils = { git = "https://github.com/embassy-rs/embassy.git", rev = "7f8af8a" }
|
||||
embassy-time-driver = { git = "https://github.com/embassy-rs/embassy.git", rev = "7f8af8a" }
|
||||
# embassy-time = { git = "https://github.com/embassy-rs/embassy.git", rev = "7f8af8a" }
|
||||
----
|
||||
|
||||
Note that the git revision should match any other embassy patches or git dependencies that you are using!
|
||||
|
@ -27,7 +27,7 @@ log = { version = "0.4", optional = true }
|
||||
embassy-sync = { version = "0.6.1", path = "../embassy-sync" }
|
||||
embassy-rp = { version = "0.2.0", path = "../embassy-rp", default-features = false }
|
||||
embassy-boot = { version = "0.3.0", path = "../embassy-boot" }
|
||||
embassy-time = { version = "0.3.2", path = "../embassy-time" }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
|
||||
cortex-m = { version = "0.7.6" }
|
||||
cortex-m-rt = { version = "0.7" }
|
||||
|
@ -14,7 +14,10 @@ use embassy_time::Duration;
|
||||
use embedded_storage::nor_flash::{ErrorType, NorFlash, ReadNorFlash};
|
||||
|
||||
/// A bootloader for RP2040 devices.
|
||||
pub struct BootLoader<const BUFFER_SIZE: usize = ERASE_SIZE>;
|
||||
pub struct BootLoader<const BUFFER_SIZE: usize = ERASE_SIZE> {
|
||||
/// The reported state of the bootloader after preparing for boot
|
||||
pub state: State,
|
||||
}
|
||||
|
||||
impl<const BUFFER_SIZE: usize> BootLoader<BUFFER_SIZE> {
|
||||
/// 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> {
|
||||
) -> Result<Self, BootError> {
|
||||
let mut aligned_buf = AlignedBuffer([0; BUFFER_SIZE]);
|
||||
let mut boot = embassy_boot::BootLoader::new(config);
|
||||
let _state = boot.prepare_boot(aligned_buf.as_mut())?;
|
||||
Ok(Self)
|
||||
let state = boot.prepare_boot(aligned_buf.as_mut())?;
|
||||
Ok(Self { state })
|
||||
}
|
||||
|
||||
/// Boots the application.
|
||||
|
@ -15,21 +15,16 @@ categories = [
|
||||
[package.metadata.embassy_docs]
|
||||
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-embedded-hal-v$VERSION/embassy-embedded-hal/src/"
|
||||
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-embedded-hal/src/"
|
||||
features = ["std"]
|
||||
target = "x86_64-unknown-linux-gnu"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = ["std"]
|
||||
|
||||
[features]
|
||||
std = []
|
||||
time = ["dep:embassy-time"]
|
||||
default = ["time"]
|
||||
|
||||
[dependencies]
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
|
||||
embassy-sync = { version = "0.6.1", path = "../embassy-sync" }
|
||||
embassy-time = { version = "0.3.2", path = "../embassy-time", optional = true }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time", optional = true }
|
||||
embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = [
|
||||
"unproven",
|
||||
] }
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![no_std]
|
||||
#![allow(async_fn_in_trait)]
|
||||
#![warn(missing_docs)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
@ -5,12 +5,13 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## Unreleased
|
||||
## 0.7.0 - 2024-12-22
|
||||
|
||||
- embassy-executor no longer provides an `embassy-time-queue-driver` implementation
|
||||
- Added `TaskRef::executor` to obtain a reference to a task's executor
|
||||
- integrated-timers are no longer processed when polling the executor.
|
||||
- Added the option to store data in timer queue items
|
||||
- Added `timer-item-payload-size-X` features for time driver implementors
|
||||
|
||||
## 0.6.3 - 2024-11-12
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "embassy-executor"
|
||||
version = "0.6.3"
|
||||
version = "0.7.0"
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "async/await executor designed for embedded usage"
|
||||
@ -34,7 +34,7 @@ log = { version = "0.4.14", optional = true }
|
||||
rtos-trace = { version = "0.1.3", optional = true }
|
||||
|
||||
embassy-executor-macros = { version = "0.6.2", path = "../embassy-executor-macros" }
|
||||
embassy-time-driver = { version = "0.1.0", path = "../embassy-time-driver", optional = true }
|
||||
embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", optional = true }
|
||||
critical-section = "1.1"
|
||||
|
||||
document-features = "0.2.7"
|
||||
|
@ -62,6 +62,16 @@ pub enum SpawnError {
|
||||
Busy,
|
||||
}
|
||||
|
||||
impl core::fmt::Display for SpawnError {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
match self {
|
||||
SpawnError::Busy => write!(f, "Busy"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl core::error::Error for SpawnError {}
|
||||
|
||||
/// Handle to spawn tasks into an executor.
|
||||
///
|
||||
/// This Spawner can spawn any task (Send and non-Send ones), but it can
|
||||
|
@ -14,6 +14,18 @@ pub enum Either<A, B> {
|
||||
Second(B),
|
||||
}
|
||||
|
||||
impl<A, B> Either<A, B> {
|
||||
/// Did the first future complete first?
|
||||
pub fn is_first(&self) -> bool {
|
||||
matches!(self, Either::First(_))
|
||||
}
|
||||
|
||||
/// Did the second future complete first?
|
||||
pub fn is_second(&self) -> bool {
|
||||
matches!(self, Either::Second(_))
|
||||
}
|
||||
}
|
||||
|
||||
/// Wait for one of two futures to complete.
|
||||
///
|
||||
/// This function returns a new future which polls all the futures.
|
||||
@ -73,6 +85,23 @@ pub enum Either3<A, B, C> {
|
||||
Third(C),
|
||||
}
|
||||
|
||||
impl<A, B, C> Either3<A, B, C> {
|
||||
/// Did the first future complete first?
|
||||
pub fn is_first(&self) -> bool {
|
||||
matches!(self, Either3::First(_))
|
||||
}
|
||||
|
||||
/// Did the second future complete first?
|
||||
pub fn is_second(&self) -> bool {
|
||||
matches!(self, Either3::Second(_))
|
||||
}
|
||||
|
||||
/// Did the third future complete first?
|
||||
pub fn is_third(&self) -> bool {
|
||||
matches!(self, Either3::Third(_))
|
||||
}
|
||||
}
|
||||
|
||||
/// Same as [`select`], but with more futures.
|
||||
pub fn select3<A, B, C>(a: A, b: B, c: C) -> Select3<A, B, C>
|
||||
where
|
||||
@ -134,6 +163,28 @@ pub enum Either4<A, B, C, D> {
|
||||
Fourth(D),
|
||||
}
|
||||
|
||||
impl<A, B, C, D> Either4<A, B, C, D> {
|
||||
/// Did the first future complete first?
|
||||
pub fn is_first(&self) -> bool {
|
||||
matches!(self, Either4::First(_))
|
||||
}
|
||||
|
||||
/// Did the second future complete first?
|
||||
pub fn is_second(&self) -> bool {
|
||||
matches!(self, Either4::Second(_))
|
||||
}
|
||||
|
||||
/// Did the third future complete first?
|
||||
pub fn is_third(&self) -> bool {
|
||||
matches!(self, Either4::Third(_))
|
||||
}
|
||||
|
||||
/// Did the fourth future complete first?
|
||||
pub fn is_fourth(&self) -> bool {
|
||||
matches!(self, Either4::Fourth(_))
|
||||
}
|
||||
}
|
||||
|
||||
/// Same as [`select`], but with more futures.
|
||||
pub fn select4<A, B, C, D>(a: A, b: B, c: C, d: D) -> Select4<A, B, C, D>
|
||||
where
|
||||
@ -204,6 +255,33 @@ pub enum Either5<A, B, C, D, E> {
|
||||
Fifth(E),
|
||||
}
|
||||
|
||||
impl<A, B, C, D, E> Either5<A, B, C, D, E> {
|
||||
/// Did the first future complete first?
|
||||
pub fn is_first(&self) -> bool {
|
||||
matches!(self, Either5::First(_))
|
||||
}
|
||||
|
||||
/// Did the second future complete first?
|
||||
pub fn is_second(&self) -> bool {
|
||||
matches!(self, Either5::Second(_))
|
||||
}
|
||||
|
||||
/// Did the third future complete first?
|
||||
pub fn is_third(&self) -> bool {
|
||||
matches!(self, Either5::Third(_))
|
||||
}
|
||||
|
||||
/// Did the fourth future complete first?
|
||||
pub fn is_fourth(&self) -> bool {
|
||||
matches!(self, Either5::Fourth(_))
|
||||
}
|
||||
|
||||
/// Did the fifth future complete first?
|
||||
pub fn is_fifth(&self) -> bool {
|
||||
matches!(self, Either5::Fifth(_))
|
||||
}
|
||||
}
|
||||
|
||||
/// Same as [`select`], but with more futures.
|
||||
pub fn select5<A, B, C, D, E>(a: A, b: B, c: C, d: D, e: E) -> Select5<A, B, C, D, E>
|
||||
where
|
||||
@ -283,6 +361,38 @@ pub enum Either6<A, B, C, D, E, F> {
|
||||
Sixth(F),
|
||||
}
|
||||
|
||||
impl<A, B, C, D, E, F> Either6<A, B, C, D, E, F> {
|
||||
/// Did the first future complete first?
|
||||
pub fn is_first(&self) -> bool {
|
||||
matches!(self, Either6::First(_))
|
||||
}
|
||||
|
||||
/// Did the second future complete first?
|
||||
pub fn is_second(&self) -> bool {
|
||||
matches!(self, Either6::Second(_))
|
||||
}
|
||||
|
||||
/// Did the third future complete first?
|
||||
pub fn is_third(&self) -> bool {
|
||||
matches!(self, Either6::Third(_))
|
||||
}
|
||||
|
||||
/// Did the fourth future complete first?
|
||||
pub fn is_fourth(&self) -> bool {
|
||||
matches!(self, Either6::Fourth(_))
|
||||
}
|
||||
|
||||
/// Did the fifth future complete first?
|
||||
pub fn is_fifth(&self) -> bool {
|
||||
matches!(self, Either6::Fifth(_))
|
||||
}
|
||||
|
||||
/// Did the sixth future complete first?
|
||||
pub fn is_sixth(&self) -> bool {
|
||||
matches!(self, Either6::Sixth(_))
|
||||
}
|
||||
}
|
||||
|
||||
/// Same as [`select`], but with more futures.
|
||||
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>
|
||||
where
|
||||
|
@ -17,7 +17,7 @@ embedded-hal-1 = { package = "embedded-hal", version = "1.0" }
|
||||
embedded-hal-async = { version = "1.0" }
|
||||
embedded-hal-bus = { version = "0.1", features = ["async"] }
|
||||
embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel" }
|
||||
embassy-time = { version = "0.3.2", path = "../embassy-time" }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
|
||||
bitfield = "0.14.0"
|
||||
|
||||
|
@ -13,7 +13,7 @@ documentation = "https://docs.embassy.dev/embassy-net-enc28j60"
|
||||
embedded-hal = { version = "1.0" }
|
||||
embedded-hal-async = { version = "1.0" }
|
||||
embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" }
|
||||
embassy-time = { version = "0.3.2", path = "../embassy-time" }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
|
||||
|
||||
defmt = { version = "0.3", optional = true }
|
||||
|
@ -17,7 +17,7 @@ log = [ "dep:log" ]
|
||||
defmt = { version = "0.3", optional = true }
|
||||
log = { version = "0.4.14", optional = true }
|
||||
|
||||
embassy-time = { version = "0.3.2", path = "../embassy-time" }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
embassy-sync = { version = "0.6.1", path = "../embassy-sync"}
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures"}
|
||||
embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel"}
|
||||
|
@ -20,7 +20,7 @@ log = { version = "0.4.14", optional = true }
|
||||
nrf-pac = { git = "https://github.com/embassy-rs/nrf-pac", rev = "52e3a757f06035c94291bfc42b0c03f71e4d677e" }
|
||||
cortex-m = "0.7.7"
|
||||
|
||||
embassy-time = { version = "0.3.1", path = "../embassy-time" }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
embassy-sync = { version = "0.6.1", path = "../embassy-sync"}
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures"}
|
||||
embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel"}
|
||||
|
@ -13,7 +13,7 @@ documentation = "https://docs.embassy.dev/embassy-net-wiznet"
|
||||
embedded-hal = { version = "1.0" }
|
||||
embedded-hal-async = { version = "1.0" }
|
||||
embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel" }
|
||||
embassy-time = { version = "0.3.2", path = "../embassy-time" }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
|
||||
defmt = { version = "0.3", optional = true }
|
||||
|
||||
|
@ -23,9 +23,6 @@ target = "thumbv7em-none-eabi"
|
||||
features = ["defmt", "tcp", "udp", "raw", "dns", "dhcpv4", "proto-ipv6", "medium-ethernet", "medium-ip", "medium-ieee802154", "multicast", "dhcpv4-hostname"]
|
||||
|
||||
[features]
|
||||
default = []
|
||||
std = []
|
||||
|
||||
## Enable defmt
|
||||
defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt", "heapless/defmt-03", "defmt?/ip_in_core"]
|
||||
|
||||
@ -74,7 +71,7 @@ smoltcp = { version = "0.12.0", default-features = false, features = [
|
||||
] }
|
||||
|
||||
embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" }
|
||||
embassy-time = { version = "0.3.2", path = "../embassy-time" }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
embassy-sync = { version = "0.6.1", path = "../embassy-sync" }
|
||||
embedded-io-async = { version = "0.6.1" }
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![no_std]
|
||||
#![allow(async_fn_in_trait)]
|
||||
#![warn(missing_docs)]
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
@ -119,7 +119,7 @@ _nrf52 = ["_ppi"]
|
||||
_nrf51 = ["_ppi"]
|
||||
_nrf91 = []
|
||||
|
||||
_time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-32_768", "dep:embassy-time-queue-driver"]
|
||||
_time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-32_768", "dep:embassy-time-queue-utils"]
|
||||
|
||||
# trustzone state.
|
||||
_s = []
|
||||
@ -134,9 +134,9 @@ _gpio-p2 = []
|
||||
_nrf52832_anomaly_109 = []
|
||||
|
||||
[dependencies]
|
||||
embassy-time-driver = { version = "0.1", path = "../embassy-time-driver", optional = true }
|
||||
embassy-time-queue-driver = { version = "0.1", path = "../embassy-time-queue-driver", optional = true }
|
||||
embassy-time = { version = "0.3.2", path = "../embassy-time", optional = true }
|
||||
embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", optional = true }
|
||||
embassy-time-queue-utils = { version = "0.1", path = "../embassy-time-queue-utils", optional = true }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time", optional = true }
|
||||
embassy-sync = { version = "0.6.1", path = "../embassy-sync" }
|
||||
embassy-hal-internal = {version = "0.2.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-3"] }
|
||||
embassy-embedded-hal = {version = "0.2.0", path = "../embassy-embedded-hal" }
|
||||
|
@ -507,7 +507,6 @@ pub fn init(config: config::Config) -> Peripherals {
|
||||
let mut needs_reset = false;
|
||||
|
||||
// Setup debug protection.
|
||||
#[cfg(not(feature = "_nrf54l"))] // TODO
|
||||
#[cfg(not(feature = "_nrf51"))]
|
||||
match config.debug {
|
||||
config::Debug::Allowed => {
|
||||
@ -549,18 +548,77 @@ pub fn init(config: config::Config) -> Peripherals {
|
||||
}
|
||||
}
|
||||
|
||||
// TAMPC is only accessible for secure code
|
||||
#[cfg(all(feature = "_nrf54l", feature = "_s"))]
|
||||
{
|
||||
use crate::pac::tampc::vals;
|
||||
|
||||
// UICR cannot be written here, because it can only be written once after an erase all.
|
||||
// The erase all value means that debug access is allowed if permitted by the firmware.
|
||||
|
||||
// Write to TAMPC to permit debug access
|
||||
//
|
||||
// See https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/debug.html#ariaid-title6
|
||||
|
||||
let p = pac::TAMPC;
|
||||
|
||||
// Unlock dbgen
|
||||
p.protect().domain(0).dbgen().ctrl().write(|w| {
|
||||
w.set_key(vals::DomainDbgenCtrlKey::KEY);
|
||||
w.set_writeprotection(vals::DomainDbgenCtrlWriteprotection::CLEAR);
|
||||
});
|
||||
p.protect().domain(0).dbgen().ctrl().write(|w| {
|
||||
w.set_key(vals::DomainDbgenCtrlKey::KEY);
|
||||
w.set_value(vals::DomainDbgenCtrlValue::HIGH);
|
||||
});
|
||||
|
||||
// Unlock niden
|
||||
p.protect().domain(0).niden().ctrl().write(|w| {
|
||||
w.set_key(vals::NidenCtrlKey::KEY);
|
||||
w.set_writeprotection(vals::NidenCtrlWriteprotection::CLEAR);
|
||||
});
|
||||
p.protect().domain(0).niden().ctrl().write(|w| {
|
||||
w.set_key(vals::NidenCtrlKey::KEY);
|
||||
w.set_value(vals::NidenCtrlValue::HIGH);
|
||||
});
|
||||
|
||||
p.protect().domain(0).spiden().ctrl().write(|w| {
|
||||
w.set_key(vals::SpidenCtrlKey::KEY);
|
||||
w.set_writeprotection(vals::SpidenCtrlWriteprotection::CLEAR);
|
||||
});
|
||||
p.protect().domain(0).spiden().ctrl().write(|w| {
|
||||
w.set_key(vals::SpidenCtrlKey::KEY);
|
||||
w.set_value(vals::SpidenCtrlValue::HIGH);
|
||||
});
|
||||
|
||||
p.protect().domain(0).spniden().ctrl().write(|w| {
|
||||
w.set_key(vals::SpnidenCtrlKey::KEY);
|
||||
w.set_writeprotection(vals::SpnidenCtrlWriteprotection::CLEAR);
|
||||
});
|
||||
p.protect().domain(0).spniden().ctrl().write(|w| {
|
||||
w.set_key(vals::SpnidenCtrlKey::KEY);
|
||||
w.set_value(vals::SpnidenCtrlValue::HIGH);
|
||||
});
|
||||
}
|
||||
|
||||
// nothing to do on the nrf9160, debug is allowed by default.
|
||||
}
|
||||
config::Debug::Disallowed => unsafe {
|
||||
// UICR.APPROTECT = Enabled
|
||||
let res = uicr_write(consts::UICR_APPROTECT, consts::APPROTECT_ENABLED);
|
||||
needs_reset |= res == WriteResult::Written;
|
||||
#[cfg(any(feature = "_nrf5340-app", feature = "_nrf91"))]
|
||||
{
|
||||
let res = uicr_write(consts::UICR_SECUREAPPROTECT, consts::APPROTECT_ENABLED);
|
||||
config::Debug::Disallowed => {
|
||||
// TODO: Handle nRF54L
|
||||
// By default, debug access is not allowed if the firmware doesn't allow it.
|
||||
// Code could be added here to disable debug access in UICR as well.
|
||||
#[cfg(not(feature = "_nrf54l"))]
|
||||
unsafe {
|
||||
// UICR.APPROTECT = Enabled
|
||||
let res = uicr_write(consts::UICR_APPROTECT, consts::APPROTECT_ENABLED);
|
||||
needs_reset |= res == WriteResult::Written;
|
||||
#[cfg(any(feature = "_nrf5340-app", feature = "_nrf91"))]
|
||||
{
|
||||
let res = uicr_write(consts::UICR_SECUREAPPROTECT, consts::APPROTECT_ENABLED);
|
||||
needs_reset |= res == WriteResult::Written;
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
config::Debug::NotConfigured => {}
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ use critical_section::CriticalSection;
|
||||
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
|
||||
use embassy_sync::blocking_mutex::CriticalSectionMutex as Mutex;
|
||||
use embassy_time_driver::Driver;
|
||||
use embassy_time_queue_driver::Queue;
|
||||
use embassy_time_queue_utils::Queue;
|
||||
|
||||
use crate::interrupt::InterruptExt;
|
||||
use crate::{interrupt, pac};
|
||||
|
@ -40,7 +40,7 @@ critical-section-impl = ["critical-section/restore-state-u8"]
|
||||
unstable-pac = []
|
||||
|
||||
## Enable the timer for use with `embassy-time` with a 1MHz tick rate.
|
||||
time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-1_000_000", "dep:embassy-time-queue-driver"]
|
||||
time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-1_000_000", "dep:embassy-time-queue-utils"]
|
||||
|
||||
## Enable ROM function cache. This will store the address of a ROM function when first used, improving performance of subsequent calls.
|
||||
rom-func-cache = []
|
||||
@ -109,9 +109,9 @@ binary-info = ["rt", "dep:rp-binary-info", "rp-binary-info?/binary-info"]
|
||||
|
||||
[dependencies]
|
||||
embassy-sync = { version = "0.6.1", path = "../embassy-sync" }
|
||||
embassy-time-driver = { version = "0.1", path = "../embassy-time-driver", optional = true }
|
||||
embassy-time-queue-driver = { version = "0.1", path = "../embassy-time-queue-driver", optional = true }
|
||||
embassy-time = { version = "0.3.2", path = "../embassy-time" }
|
||||
embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", optional = true }
|
||||
embassy-time-queue-utils = { version = "0.1", path = "../embassy-time-queue-utils", optional = true }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
|
||||
embassy-hal-internal = {version = "0.2.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-2"] }
|
||||
embassy-embedded-hal = {version = "0.2.0", path = "../embassy-embedded-hal" }
|
||||
@ -148,5 +148,5 @@ rp-binary-info = { version = "0.1.0", optional = true }
|
||||
smart-leds = "0.4.0"
|
||||
|
||||
[dev-dependencies]
|
||||
embassy-executor = { version = "0.6.3", path = "../embassy-executor", features = ["arch-std", "executor-thread"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../embassy-executor", features = ["arch-std", "executor-thread"] }
|
||||
static_cell = { version = "2" }
|
||||
|
@ -5,7 +5,7 @@ use critical_section::CriticalSection;
|
||||
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
|
||||
use embassy_sync::blocking_mutex::Mutex;
|
||||
use embassy_time_driver::Driver;
|
||||
use embassy_time_queue_driver::Queue;
|
||||
use embassy_time_queue_utils::Queue;
|
||||
#[cfg(feature = "rp2040")]
|
||||
use pac::TIMER;
|
||||
#[cfg(feature = "_rp235x")]
|
||||
|
@ -21,7 +21,7 @@ features = ["stm32wb55rg"]
|
||||
[dependencies]
|
||||
embassy-stm32 = { version = "0.1.0", path = "../embassy-stm32" }
|
||||
embassy-sync = { version = "0.6.1", path = "../embassy-sync" }
|
||||
embassy-time = { version = "0.3.2", path = "../embassy-time", optional = true }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time", optional = true }
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
|
||||
embassy-hal-internal = { version = "0.2.0", path = "../embassy-hal-internal" }
|
||||
embassy-embedded-hal = { version = "0.2.0", path = "../embassy-embedded-hal" }
|
||||
|
@ -43,16 +43,16 @@ rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[dependencies]
|
||||
embassy-sync = { version = "0.6.1", path = "../embassy-sync" }
|
||||
embassy-time = { version = "0.3.2", path = "../embassy-time", optional = true }
|
||||
embassy-time-driver = { version = "0.1", path = "../embassy-time-driver", optional = true }
|
||||
embassy-time-queue-driver = { version = "0.1", path = "../embassy-time-queue-driver", optional = true }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time", optional = true }
|
||||
embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", optional = true }
|
||||
embassy-time-queue-utils = { version = "0.1", path = "../embassy-time-queue-utils", optional = true }
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
|
||||
embassy-hal-internal = {version = "0.2.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-4"] }
|
||||
embassy-embedded-hal = {version = "0.2.0", path = "../embassy-embedded-hal", default-features = false }
|
||||
embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver" }
|
||||
embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver" }
|
||||
embassy-usb-synopsys-otg = {version = "0.2.0", path = "../embassy-usb-synopsys-otg" }
|
||||
embassy-executor = { version = "0.6.3", path = "../embassy-executor", optional = true }
|
||||
embassy-executor = { version = "0.7.0", path = "../embassy-executor", optional = true }
|
||||
|
||||
embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
|
||||
embedded-hal-1 = { package = "embedded-hal", version = "1.0" }
|
||||
@ -150,7 +150,7 @@ time = ["dep:embassy-time", "embassy-embedded-hal/time"]
|
||||
|
||||
# Features starting with `_` are for internal use only. They're not intended
|
||||
# to be enabled by other crates, and are not covered by semver guarantees.
|
||||
_time-driver = ["dep:embassy-time-driver", "time", "dep:embassy-time-queue-driver"]
|
||||
_time-driver = ["dep:embassy-time-driver", "time", "dep:embassy-time-queue-utils"]
|
||||
|
||||
## Use any time driver
|
||||
time-driver-any = ["_time-driver"]
|
||||
|
@ -658,6 +658,16 @@ fn set_as_af(pin_port: u8, af_num: u8, af_type: AfType) {
|
||||
r.moder().modify(|w| w.set_moder(n, vals::Moder::ALTERNATE));
|
||||
}
|
||||
|
||||
#[inline(never)]
|
||||
#[cfg(gpio_v2)]
|
||||
fn set_speed(pin_port: u8, speed: Speed) {
|
||||
let pin = unsafe { AnyPin::steal(pin_port) };
|
||||
let r = pin.block();
|
||||
let n = pin._pin() as usize;
|
||||
|
||||
r.ospeedr().modify(|w| w.set_ospeedr(n, speed.to_ospeedr()));
|
||||
}
|
||||
|
||||
#[inline(never)]
|
||||
fn set_as_analog(pin_port: u8) {
|
||||
let pin = unsafe { AnyPin::steal(pin_port) };
|
||||
@ -738,6 +748,12 @@ pub(crate) trait SealedPin {
|
||||
set_as_af(self.pin_port(), af_num, af_type)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(gpio_v2)]
|
||||
fn set_speed(&self, speed: Speed) {
|
||||
set_speed(self.pin_port(), speed)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn set_as_analog(&self) {
|
||||
set_as_analog(self.pin_port());
|
||||
|
@ -332,10 +332,11 @@ mod dual_core {
|
||||
/// ```
|
||||
///
|
||||
/// This static must be placed in the same position for both cores. How and where this is done is left to the user.
|
||||
#[repr(C)]
|
||||
pub struct SharedData {
|
||||
init_flag: AtomicUsize,
|
||||
clocks: UnsafeCell<MaybeUninit<Clocks>>,
|
||||
config: UnsafeCell<MaybeUninit<Config>>,
|
||||
config: UnsafeCell<MaybeUninit<SharedConfig>>,
|
||||
}
|
||||
|
||||
unsafe impl Sync for SharedData {}
|
||||
@ -355,10 +356,15 @@ mod dual_core {
|
||||
pub fn init_primary(config: Config, shared_data: &'static MaybeUninit<SharedData>) -> Peripherals {
|
||||
let shared_data = unsafe { shared_data.assume_init_ref() };
|
||||
|
||||
// Write the flag as soon as possible. Reading this flag uninitialized in the `init_secondary`
|
||||
// is maybe unsound? Unclear. If it is indeed unsound, writing it sooner doesn't fix it all,
|
||||
// but improves the odds of it going right
|
||||
shared_data.init_flag.store(0, Ordering::SeqCst);
|
||||
|
||||
rcc::set_freqs_ptr(shared_data.clocks.get());
|
||||
let p = init_hw(config);
|
||||
|
||||
unsafe { *shared_data.config.get() }.write(config);
|
||||
unsafe { *shared_data.config.get() }.write(config.into());
|
||||
|
||||
shared_data.init_flag.store(INIT_DONE_FLAG, Ordering::SeqCst);
|
||||
|
||||
@ -430,6 +436,40 @@ mod dual_core {
|
||||
|
||||
Peripherals::take()
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy)]
|
||||
struct SharedConfig {
|
||||
#[cfg(bdma)]
|
||||
bdma_interrupt_priority: Priority,
|
||||
#[cfg(dma)]
|
||||
dma_interrupt_priority: Priority,
|
||||
#[cfg(gpdma)]
|
||||
gpdma_interrupt_priority: Priority,
|
||||
}
|
||||
|
||||
impl From<Config> for SharedConfig {
|
||||
fn from(value: Config) -> Self {
|
||||
let Config {
|
||||
#[cfg(bdma)]
|
||||
bdma_interrupt_priority,
|
||||
#[cfg(dma)]
|
||||
dma_interrupt_priority,
|
||||
#[cfg(gpdma)]
|
||||
gpdma_interrupt_priority,
|
||||
..
|
||||
} = value;
|
||||
|
||||
SharedConfig {
|
||||
#[cfg(bdma)]
|
||||
bdma_interrupt_priority,
|
||||
#[cfg(dma)]
|
||||
dma_interrupt_priority,
|
||||
#[cfg(gpdma)]
|
||||
gpdma_interrupt_priority,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "_dual-core")]
|
||||
|
@ -55,6 +55,9 @@ pub struct Config {
|
||||
/// There are some ICs that require a pull-up on the MISO pin for some applications.
|
||||
/// If you are unsure, you probably don't need this.
|
||||
pub miso_pull: Pull,
|
||||
/// signal rise/fall speed (slew rate) - defaults to `Medium`.
|
||||
/// Increase for high SPI speeds. Change to `Low` to reduce ringing.
|
||||
pub rise_fall_speed: Speed,
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
@ -64,6 +67,7 @@ impl Default for Config {
|
||||
bit_order: BitOrder::MsbFirst,
|
||||
frequency: Hertz(1_000_000),
|
||||
miso_pull: Pull::None,
|
||||
rise_fall_speed: Speed::VeryHigh,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -92,14 +96,14 @@ impl Config {
|
||||
|
||||
#[cfg(gpio_v1)]
|
||||
fn sck_af(&self) -> AfType {
|
||||
AfType::output(OutputType::PushPull, Speed::VeryHigh)
|
||||
AfType::output(OutputType::PushPull, self.rise_fall_speed)
|
||||
}
|
||||
|
||||
#[cfg(gpio_v2)]
|
||||
fn sck_af(&self) -> AfType {
|
||||
AfType::output_pull(
|
||||
OutputType::PushPull,
|
||||
Speed::VeryHigh,
|
||||
self.rise_fall_speed,
|
||||
match self.mode.polarity {
|
||||
Polarity::IdleLow => Pull::Down,
|
||||
Polarity::IdleHigh => Pull::Up,
|
||||
@ -118,6 +122,7 @@ pub struct Spi<'d, M: PeriMode> {
|
||||
rx_dma: Option<ChannelAndRequest<'d>>,
|
||||
_phantom: PhantomData<M>,
|
||||
current_word_size: word_impl::Config,
|
||||
rise_fall_speed: Speed,
|
||||
}
|
||||
|
||||
impl<'d, M: PeriMode> Spi<'d, M> {
|
||||
@ -140,6 +145,7 @@ impl<'d, M: PeriMode> Spi<'d, M> {
|
||||
rx_dma,
|
||||
current_word_size: <u8 as SealedWord>::CONFIG,
|
||||
_phantom: PhantomData,
|
||||
rise_fall_speed: config.rise_fall_speed,
|
||||
};
|
||||
this.enable_and_init(config);
|
||||
this
|
||||
@ -243,6 +249,17 @@ impl<'d, M: PeriMode> Spi<'d, M> {
|
||||
|
||||
let br = compute_baud_rate(self.kernel_clock, config.frequency);
|
||||
|
||||
#[cfg(gpio_v2)]
|
||||
{
|
||||
self.rise_fall_speed = config.rise_fall_speed;
|
||||
if let Some(sck) = self.sck.as_ref() {
|
||||
sck.set_speed(config.rise_fall_speed);
|
||||
}
|
||||
if let Some(mosi) = self.mosi.as_ref() {
|
||||
mosi.set_speed(config.rise_fall_speed);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(spi_v1, spi_f1, spi_v2))]
|
||||
self.info.regs.cr1().modify(|w| {
|
||||
w.set_cpha(cpha);
|
||||
@ -308,6 +325,7 @@ impl<'d, M: PeriMode> Spi<'d, M> {
|
||||
bit_order,
|
||||
frequency,
|
||||
miso_pull,
|
||||
rise_fall_speed: self.rise_fall_speed,
|
||||
}
|
||||
}
|
||||
|
||||
@ -441,7 +459,7 @@ impl<'d> Spi<'d, Blocking> {
|
||||
Self::new_inner(
|
||||
peri,
|
||||
new_pin!(sck, config.sck_af()),
|
||||
new_pin!(mosi, AfType::output(OutputType::PushPull, Speed::VeryHigh)),
|
||||
new_pin!(mosi, AfType::output(OutputType::PushPull, config.rise_fall_speed)),
|
||||
new_pin!(miso, AfType::input(config.miso_pull)),
|
||||
None,
|
||||
None,
|
||||
@ -477,7 +495,7 @@ impl<'d> Spi<'d, Blocking> {
|
||||
Self::new_inner(
|
||||
peri,
|
||||
new_pin!(sck, config.sck_af()),
|
||||
new_pin!(mosi, AfType::output(OutputType::PushPull, Speed::VeryHigh)),
|
||||
new_pin!(mosi, AfType::output(OutputType::PushPull, config.rise_fall_speed)),
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
@ -496,7 +514,7 @@ impl<'d> Spi<'d, Blocking> {
|
||||
Self::new_inner(
|
||||
peri,
|
||||
None,
|
||||
new_pin!(mosi, AfType::output(OutputType::PushPull, Speed::VeryHigh)),
|
||||
new_pin!(mosi, AfType::output(OutputType::PushPull, config.rise_fall_speed)),
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
@ -519,7 +537,7 @@ impl<'d> Spi<'d, Async> {
|
||||
Self::new_inner(
|
||||
peri,
|
||||
new_pin!(sck, config.sck_af()),
|
||||
new_pin!(mosi, AfType::output(OutputType::PushPull, Speed::VeryHigh)),
|
||||
new_pin!(mosi, AfType::output(OutputType::PushPull, config.rise_fall_speed)),
|
||||
new_pin!(miso, AfType::input(config.miso_pull)),
|
||||
new_dma!(tx_dma),
|
||||
new_dma!(rx_dma),
|
||||
@ -561,7 +579,7 @@ impl<'d> Spi<'d, Async> {
|
||||
Self::new_inner(
|
||||
peri,
|
||||
new_pin!(sck, config.sck_af()),
|
||||
new_pin!(mosi, AfType::output(OutputType::PushPull, Speed::VeryHigh)),
|
||||
new_pin!(mosi, AfType::output(OutputType::PushPull, config.rise_fall_speed)),
|
||||
None,
|
||||
new_dma!(tx_dma),
|
||||
None,
|
||||
@ -581,7 +599,7 @@ impl<'d> Spi<'d, Async> {
|
||||
Self::new_inner(
|
||||
peri,
|
||||
None,
|
||||
new_pin!(mosi, AfType::output(OutputType::PushPull, Speed::VeryHigh)),
|
||||
new_pin!(mosi, AfType::output(OutputType::PushPull, config.rise_fall_speed)),
|
||||
None,
|
||||
new_dma!(tx_dma),
|
||||
None,
|
||||
|
@ -7,7 +7,7 @@ use critical_section::CriticalSection;
|
||||
use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex;
|
||||
use embassy_sync::blocking_mutex::Mutex;
|
||||
use embassy_time_driver::{Driver, TICK_HZ};
|
||||
use embassy_time_queue_driver::Queue;
|
||||
use embassy_time_queue_utils::Queue;
|
||||
use stm32_metapac::timer::{regs, TimGp16};
|
||||
|
||||
use crate::interrupt::typelevel::Interrupt;
|
||||
|
@ -175,6 +175,23 @@ impl<'d, T: Instance> Ucpd<'d, T> {
|
||||
w.set_ucpden(true);
|
||||
});
|
||||
|
||||
#[cfg(stm32h5)]
|
||||
r.cfgr2().write(|w| {
|
||||
w.set_rxafilten(true);
|
||||
});
|
||||
|
||||
// Software trim according to RM0481, p. 2650/2668
|
||||
#[cfg(stm32h5)]
|
||||
{
|
||||
let trim_rd_cc1 = unsafe { *(0x4002_242C as *const u32) & 0xF };
|
||||
let trim_rd_cc2 = unsafe { ((*(0x4002_242C as *const u32)) >> 8) & 0xF };
|
||||
|
||||
r.cfgr3().write(|w| {
|
||||
w.set_trim_cc1_rd(trim_rd_cc1 as u8);
|
||||
w.set_trim_cc2_rd(trim_rd_cc2 as u8);
|
||||
});
|
||||
}
|
||||
|
||||
Self {
|
||||
cc_phy: CcPhy { _lifetime: PhantomData },
|
||||
}
|
||||
@ -278,6 +295,31 @@ impl<'d, T: Instance> CcPhy<'d, T> {
|
||||
});
|
||||
});
|
||||
|
||||
// Software trim according to RM0481, p. 2650/2668
|
||||
#[cfg(stm32h5)]
|
||||
T::REGS.cfgr3().modify(|w| match cc_pull {
|
||||
CcPull::Source1_5A => {
|
||||
#[cfg(stm32h5)]
|
||||
{
|
||||
let trim_1a5_cc1 = unsafe { *(0x08FF_F844 as *const u32) & 0xF };
|
||||
let trim_1a5_cc2 = unsafe { ((*(0x08FF_F844 as *const u32)) >> 16) & 0xF };
|
||||
|
||||
w.set_trim_cc1_rp(trim_1a5_cc1 as u8);
|
||||
w.set_trim_cc2_rp(trim_1a5_cc2 as u8);
|
||||
};
|
||||
}
|
||||
_ => {
|
||||
#[cfg(stm32h5)]
|
||||
{
|
||||
let trim_3a0_cc1 = unsafe { (*(0x4002_242C as *const u32) >> 4) & 0xF };
|
||||
let trim_3a0_cc2 = unsafe { ((*(0x4002_242C as *const u32)) >> 12) & 0xF };
|
||||
|
||||
w.set_trim_cc1_rp(trim_3a0_cc1 as u8);
|
||||
w.set_trim_cc2_rp(trim_3a0_cc2 as u8);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// Disable dead-battery pull-down resistors which are enabled by default on boot.
|
||||
critical_section::with(|cs| {
|
||||
init(
|
||||
|
@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## Unreleased
|
||||
## 0.2.0 - 2024-12-22
|
||||
|
||||
- The `allocate_alarm`, `set_alarm_callback`, `set_alarm` functions have been removed.
|
||||
- `schedule_wake` has been added to the `Driver` trait.
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "embassy-time-driver"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
edition = "2021"
|
||||
description = "Driver trait for embassy-time"
|
||||
repository = "https://github.com/embassy-rs/embassy"
|
||||
|
@ -53,7 +53,7 @@
|
||||
//! use core::cell::RefCell;
|
||||
//! use core::task::Waker;
|
||||
//!
|
||||
//! use embassy_time_queue_driver::Queue;
|
||||
//! use embassy_time_queue_utils::Queue;
|
||||
//! use embassy_time_driver::Driver;
|
||||
//!
|
||||
//! struct MyDriver {
|
||||
|
@ -1,8 +0,0 @@
|
||||
# embassy-time-queue-driver
|
||||
|
||||
This crate contains the driver trait used by the [`embassy-time`](https://crates.io/crates/embassy-time) timer queue.
|
||||
|
||||
You should rarely need to use this crate directly. Only use it when implementing your own timer queue.
|
||||
|
||||
There is two timer queue implementations, one in `embassy-time` enabled by the `generic-queue` feature, and
|
||||
another in `embassy-executor` enabled by the `integrated-timers` feature.
|
@ -1,21 +0,0 @@
|
||||
#![no_std]
|
||||
#![doc = include_str!("../README.md")]
|
||||
#![warn(missing_docs)]
|
||||
|
||||
//! This crate is an implementation detail of `embassy-time-driver`.
|
||||
//!
|
||||
//! As a HAL user, you should only depend on this crate if your application does not use
|
||||
//! `embassy-executor` and your HAL does not configure a generic queue by itself.
|
||||
//!
|
||||
//! As a HAL implementer, you need to depend on this crate if you want to implement a time driver,
|
||||
//! but how you should do so is documented in `embassy-time-driver`.
|
||||
|
||||
#[cfg(feature = "_generic-queue")]
|
||||
pub mod queue_generic;
|
||||
#[cfg(not(feature = "_generic-queue"))]
|
||||
pub mod queue_integrated;
|
||||
|
||||
#[cfg(feature = "_generic-queue")]
|
||||
pub use queue_generic::Queue;
|
||||
#[cfg(not(feature = "_generic-queue"))]
|
||||
pub use queue_integrated::Queue;
|
@ -1,15 +1,10 @@
|
||||
# Changelog for embassy-time-queue-driver
|
||||
# Changelog for embassy-time-queue-utils
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## Unreleased
|
||||
|
||||
- Added `generic-queue-N` features.
|
||||
- Added `embassy_time_queue_driver::Queue` struct which uses integrated or a generic storage (configured using `generic-queue-N`).
|
||||
|
||||
## 0.1.0 - 2024-01-11
|
||||
|
||||
Initial release
|
@ -1,10 +1,10 @@
|
||||
[package]
|
||||
name = "embassy-time-queue-driver"
|
||||
name = "embassy-time-queue-utils"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "Timer queue driver trait for embassy-time"
|
||||
repository = "https://github.com/embassy-rs/embassy"
|
||||
documentation = "https://docs.embassy.dev/embassy-time-queue-driver"
|
||||
documentation = "https://docs.embassy.dev/embassy-time-queue-utils"
|
||||
readme = "README.md"
|
||||
license = "MIT OR Apache-2.0"
|
||||
categories = [
|
||||
@ -22,7 +22,7 @@ links = "embassy-time-queue"
|
||||
|
||||
[dependencies]
|
||||
heapless = "0.8"
|
||||
embassy-executor = { version = "0.6.3", path = "../embassy-executor" }
|
||||
embassy-executor = { version = "0.7.0", path = "../embassy-executor" }
|
||||
|
||||
[features]
|
||||
#! ### Generic Queue
|
||||
@ -36,7 +36,7 @@ embassy-executor = { version = "0.6.3", path = "../embassy-executor" }
|
||||
#! The features also set how many timers are used for the generic queue. At most one
|
||||
#! `generic-queue-*` feature can be enabled. If none is enabled, a default of 64 timers is used.
|
||||
#!
|
||||
#! When using embassy-time from libraries, you should *not* enable any `generic-queue-*` feature, to allow the
|
||||
#! When using embassy-time-queue-driver from libraries, you should *not* enable any `generic-queue-*` feature, to allow the
|
||||
#! end user to pick.
|
||||
|
||||
## Generic Queue with 8 timers
|
||||
@ -53,6 +53,6 @@ generic-queue-128 = ["_generic-queue"]
|
||||
_generic-queue = []
|
||||
|
||||
[package.metadata.embassy_docs]
|
||||
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-time-queue-driver-v$VERSION/embassy-time-queue-driver/src/"
|
||||
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-time-queue-driver/src/"
|
||||
src_base = "https://github.com/embassy-rs/embassy/blob/embassy-time-queue-utils-v$VERSION/embassy-time-queue-utils/src/"
|
||||
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-time-queue-utils/src/"
|
||||
target = "x86_64-unknown-linux-gnu"
|
8
embassy-time-queue-utils/README.md
Normal file
8
embassy-time-queue-utils/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
# embassy-time-queue-utils
|
||||
|
||||
This crate contains timer queues to help implementing an [`embassy-time-driver`](https://crates.io/crates/embassy-time-driver).
|
||||
|
||||
As a HAL user, you should not need to depend on this crate.
|
||||
|
||||
As a HAL implementer, you need to depend on this crate if you want to implement a time driver,
|
||||
but how you should do so is documented in `embassy-time-driver`.
|
13
embassy-time-queue-utils/src/lib.rs
Normal file
13
embassy-time-queue-utils/src/lib.rs
Normal file
@ -0,0 +1,13 @@
|
||||
#![no_std]
|
||||
#![doc = include_str!("../README.md")]
|
||||
#![warn(missing_docs)]
|
||||
|
||||
#[cfg(feature = "_generic-queue")]
|
||||
pub mod queue_generic;
|
||||
#[cfg(not(feature = "_generic-queue"))]
|
||||
pub mod queue_integrated;
|
||||
|
||||
#[cfg(feature = "_generic-queue")]
|
||||
pub use queue_generic::Queue;
|
||||
#[cfg(not(feature = "_generic-queue"))]
|
||||
pub use queue_integrated::Queue;
|
@ -5,9 +5,8 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## Unreleased
|
||||
## 0.4.0 - 2024-12-22
|
||||
|
||||
- The `generic-queue` and related features have been removed (moved to embassy-time-queue-driver)
|
||||
- embassy-time no longer provides an `embassy-time-queue-driver` implementation
|
||||
|
||||
## 0.3.2 - 2024-08-05
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "embassy-time"
|
||||
version = "0.3.2"
|
||||
version = "0.4.0"
|
||||
edition = "2021"
|
||||
description = "Instant and Duration for embedded no-std systems, with async timer support"
|
||||
repository = "https://github.com/embassy-rs/embassy"
|
||||
@ -24,8 +24,8 @@ target = "x86_64-unknown-linux-gnu"
|
||||
features = ["defmt", "std"]
|
||||
|
||||
[features]
|
||||
std = ["tick-hz-1_000_000", "critical-section/std", "dep:embassy-time-queue-driver"]
|
||||
wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:wasm-timer", "tick-hz-1_000_000", "dep:embassy-time-queue-driver"]
|
||||
std = ["tick-hz-1_000_000", "critical-section/std", "dep:embassy-time-queue-utils"]
|
||||
wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:wasm-timer", "tick-hz-1_000_000", "dep:embassy-time-queue-utils"]
|
||||
|
||||
## Display the time since startup next to defmt log messages.
|
||||
## At most 1 `defmt-timestamp-uptime-*` feature can be used.
|
||||
@ -40,7 +40,32 @@ defmt-timestamp-uptime-tms = ["defmt"]
|
||||
defmt-timestamp-uptime-tus = ["defmt"]
|
||||
|
||||
## Create a `MockDriver` that can be manually advanced for testing purposes.
|
||||
mock-driver = ["tick-hz-1_000_000", "dep:embassy-time-queue-driver"]
|
||||
mock-driver = ["tick-hz-1_000_000", "dep:embassy-time-queue-utils"]
|
||||
|
||||
#! ### Generic Queue
|
||||
|
||||
#! By default embassy-time uses a timer queue implementation that is faster but depends on `embassy-executor`.
|
||||
#! It will panic if you try to await any timer when using another executor.
|
||||
#!
|
||||
#! Alternatively, you can choose to use a "generic" timer queue implementation that works on any executor.
|
||||
#! To enable it, enable any of the features below.
|
||||
#!
|
||||
#! The features also set how many timers are used for the generic queue. At most one
|
||||
#! `generic-queue-*` feature can be enabled. If none is enabled, a default of 64 timers is used.
|
||||
#!
|
||||
#! When using embassy-time from libraries, you should *not* enable any `generic-queue-*` feature, to allow the
|
||||
#! end user to pick.
|
||||
|
||||
## Generic Queue with 8 timers
|
||||
generic-queue-8 = ["embassy-time-queue-utils/generic-queue-8"]
|
||||
## Generic Queue with 16 timers
|
||||
generic-queue-16 = ["embassy-time-queue-utils/generic-queue-16"]
|
||||
## Generic Queue with 32 timers
|
||||
generic-queue-32 = ["embassy-time-queue-utils/generic-queue-32"]
|
||||
## Generic Queue with 64 timers
|
||||
generic-queue-64 = ["embassy-time-queue-utils/generic-queue-64"]
|
||||
## Generic Queue with 128 timers
|
||||
generic-queue-128 = ["embassy-time-queue-utils/generic-queue-128"]
|
||||
|
||||
#! ### Tick Rate
|
||||
#!
|
||||
@ -383,8 +408,8 @@ tick-hz-5_242_880_000 = ["embassy-time-driver/tick-hz-5_242_880_000"]
|
||||
#! </details>
|
||||
|
||||
[dependencies]
|
||||
embassy-time-driver = { version = "0.1.0", path = "../embassy-time-driver" }
|
||||
embassy-time-queue-driver = { version = "0.1.0", path = "../embassy-time-queue-driver", optional = true}
|
||||
embassy-time-driver = { version = "0.2", path = "../embassy-time-driver" }
|
||||
embassy-time-queue-utils = { version = "0.1", path = "../embassy-time-queue-utils", optional = true}
|
||||
|
||||
defmt = { version = "0.3", optional = true }
|
||||
log = { version = "0.4.14", optional = true }
|
||||
@ -407,4 +432,4 @@ wasm-timer = { version = "0.2.5", optional = true }
|
||||
[dev-dependencies]
|
||||
serial_test = "0.9"
|
||||
critical-section = { version = "1.1", features = ["std"] }
|
||||
embassy-executor = { version = "0.6.3", path = "../embassy-executor" }
|
||||
embassy-executor = { version = "0.7.0", path = "../embassy-executor" }
|
||||
|
@ -3,7 +3,7 @@ use core::task::Waker;
|
||||
|
||||
use critical_section::Mutex as CsMutex;
|
||||
use embassy_time_driver::Driver;
|
||||
use embassy_time_queue_driver::Queue;
|
||||
use embassy_time_queue_utils::Queue;
|
||||
|
||||
use crate::{Duration, Instant};
|
||||
|
||||
|
@ -3,7 +3,7 @@ use std::thread;
|
||||
use std::time::{Duration as StdDuration, Instant as StdInstant};
|
||||
|
||||
use embassy_time_driver::Driver;
|
||||
use embassy_time_queue_driver::Queue;
|
||||
use embassy_time_queue_utils::Queue;
|
||||
|
||||
struct TimeDriver {
|
||||
signaler: Signaler,
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std::sync::Mutex;
|
||||
|
||||
use embassy_time_driver::Driver;
|
||||
use embassy_time_queue_driver::Queue;
|
||||
use embassy_time_queue_utils::Queue;
|
||||
use wasm_bindgen::prelude::*;
|
||||
use wasm_timer::Instant as StdInstant;
|
||||
|
||||
|
@ -34,7 +34,7 @@ cortex-m = { version = "0.7.7", features = ["inline-asm"], optional = true }
|
||||
embassy-boot = { version = "0.3.0", path = "../embassy-boot" }
|
||||
embassy-futures = { version = "0.1.1", path = "../embassy-futures" }
|
||||
embassy-sync = { version = "0.6.1", path = "../embassy-sync" }
|
||||
embassy-time = { version = "0.3.2", path = "../embassy-time" }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
embassy-usb = { version = "0.3.0", path = "../embassy-usb", default-features = false }
|
||||
embedded-storage = { version = "0.3.1" }
|
||||
esp32c3-hal = { version = "0.13.0", optional = true, default-features = false }
|
||||
|
@ -102,13 +102,6 @@ impl<const N: usize, T: ReceiverHandler + Send + Sync> UsbLogger<N, T> {
|
||||
config.max_power = 100;
|
||||
config.max_packet_size_0 = MAX_PACKET_SIZE;
|
||||
|
||||
// Required for windows compatiblity.
|
||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||
config.device_class = 0xEF;
|
||||
config.device_sub_class = 0x02;
|
||||
config.device_protocol = 0x01;
|
||||
config.composite_with_iads = true;
|
||||
|
||||
let mut builder = Builder::new(
|
||||
driver,
|
||||
config,
|
||||
|
@ -34,17 +34,20 @@ pub struct Config<'a> {
|
||||
/// Device class code assigned by USB.org. Set to `0xff` for vendor-specific
|
||||
/// devices that do not conform to any class.
|
||||
///
|
||||
/// Default: `0x00` (class code specified by interfaces)
|
||||
/// Default: `0xEF`
|
||||
/// See also: `composite_with_iads`
|
||||
pub device_class: u8,
|
||||
|
||||
/// Device sub-class code. Depends on class.
|
||||
///
|
||||
/// Default: `0x00`
|
||||
/// Default: `0x02`
|
||||
/// See also: `composite_with_iads`
|
||||
pub device_sub_class: u8,
|
||||
|
||||
/// Device protocol code. Depends on class and sub-class.
|
||||
///
|
||||
/// Default: `0x00`
|
||||
/// Default: `0x01`
|
||||
/// See also: `composite_with_iads`
|
||||
pub device_protocol: u8,
|
||||
|
||||
/// Device release version in BCD.
|
||||
@ -84,11 +87,14 @@ pub struct Config<'a> {
|
||||
|
||||
/// Configures the device as a composite device with interface association descriptors.
|
||||
///
|
||||
/// If set to `true`, the following fields should have the given values:
|
||||
/// If set to `true` (default), the following fields should have the given values:
|
||||
///
|
||||
/// - `device_class` = `0xEF`
|
||||
/// - `device_sub_class` = `0x02`
|
||||
/// - `device_protocol` = `0x01`
|
||||
///
|
||||
/// If set to `false`, those fields must be set correctly for the classes that will be
|
||||
/// installed on the USB device.
|
||||
pub composite_with_iads: bool,
|
||||
|
||||
/// Whether the device has its own power source.
|
||||
@ -117,9 +123,9 @@ impl<'a> Config<'a> {
|
||||
/// Create default configuration with the provided vid and pid values.
|
||||
pub const fn new(vid: u16, pid: u16) -> Self {
|
||||
Self {
|
||||
device_class: 0x00,
|
||||
device_sub_class: 0x00,
|
||||
device_protocol: 0x00,
|
||||
device_class: 0xEF,
|
||||
device_sub_class: 0x02,
|
||||
device_protocol: 0x01,
|
||||
max_packet_size_0: 64,
|
||||
vendor_id: vid,
|
||||
product_id: pid,
|
||||
@ -130,7 +136,7 @@ impl<'a> Config<'a> {
|
||||
serial_number: None,
|
||||
self_powered: false,
|
||||
supports_remote_wakeup: false,
|
||||
composite_with_iads: false,
|
||||
composite_with_iads: true,
|
||||
max_power: 100,
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" }
|
||||
embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-16384", "arch-cortex-m", "executor-thread", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-16384", "arch-cortex-m", "executor-thread", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [] }
|
||||
embassy-nrf = { version = "0.2.0", path = "../../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", ] }
|
||||
embassy-boot = { version = "0.3.0", path = "../../../../embassy-boot", features = [] }
|
||||
embassy-boot-nrf = { version = "0.3.0", path = "../../../../embassy-boot-nrf", features = [] }
|
||||
|
@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" }
|
||||
embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-16384", "arch-cortex-m", "executor-thread", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-16384", "arch-cortex-m", "executor-thread", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [] }
|
||||
embassy-rp = { version = "0.2.0", path = "../../../../embassy-rp", features = ["time-driver", "rp2040"] }
|
||||
embassy-boot-rp = { version = "0.3.0", path = "../../../../embassy-boot-rp", features = [] }
|
||||
embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" }
|
||||
|
@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" }
|
||||
embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32f303re", "time-driver-any", "exti"] }
|
||||
embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32" }
|
||||
embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" }
|
||||
|
@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" }
|
||||
embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32f767zi", "time-driver-any", "exti"] }
|
||||
embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] }
|
||||
embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" }
|
||||
|
@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" }
|
||||
embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32h743zi", "time-driver-any", "exti"] }
|
||||
embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] }
|
||||
embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" }
|
||||
|
@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" }
|
||||
embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32l072cz", "time-driver-any", "exti", "memory-x"] }
|
||||
embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] }
|
||||
embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" }
|
||||
|
@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" }
|
||||
embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32l151cb-a", "time-driver-any", "exti"] }
|
||||
embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] }
|
||||
embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" }
|
||||
|
@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" }
|
||||
embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32l475vg", "time-driver-any", "exti"] }
|
||||
embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] }
|
||||
embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" }
|
||||
|
@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" }
|
||||
embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32wb55rg", "time-driver-any", "exti"] }
|
||||
embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] }
|
||||
embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" }
|
||||
|
@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-sync = { version = "0.6.1", path = "../../../../embassy-sync" }
|
||||
embassy-executor = { version = "0.6.3", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../../../embassy-stm32", features = ["stm32wl55jc-cm4", "time-driver-any", "exti"] }
|
||||
embassy-boot-stm32 = { version = "0.2.0", path = "../../../../embassy-boot-stm32", features = [] }
|
||||
embassy-embedded-hal = { version = "0.2.0", path = "../../../../embassy-embedded-hal" }
|
||||
|
@ -7,9 +7,9 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-nxp = { version = "0.1.0", path = "../../embassy-nxp", features = ["rt"] }
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt"] }
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-time = { version = "0.3.0", path = "../../embassy-time", features = ["defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt"] }
|
||||
panic-halt = "0.2.0"
|
||||
cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] }
|
||||
cortex-m-rt = {version = "0.7.0"}
|
||||
|
@ -16,8 +16,8 @@ log = [
|
||||
|
||||
[dependencies]
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync" }
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "rtos-trace"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time" }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "rtos-trace"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time" }
|
||||
embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] }
|
||||
|
||||
cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] }
|
||||
|
@ -5,8 +5,8 @@ version = "0.1.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-4096", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-4096", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf51", "gpiote", "time-driver-rtc1", "unstable-pac", "time", "rt"] }
|
||||
|
||||
defmt = "0.3"
|
||||
|
@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0"
|
||||
[dependencies]
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-8192", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf52810", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
|
||||
defmt = "0.3"
|
||||
|
@ -9,8 +9,8 @@ rtic = { version = "2", features = ["thumbv7-backend"] }
|
||||
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = [ "defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-time-queue-driver = { version = "0.1.0", path = "../../embassy-time-queue-driver", features = ["generic-queue-8"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = [ "defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-time-queue-utils = { version = "0.1", path = "../../embassy-time-queue-utils", features = ["generic-queue-8"] }
|
||||
embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = [ "defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
|
||||
defmt = "0.3"
|
||||
|
@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0"
|
||||
[dependencies]
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"] }
|
||||
embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
|
@ -60,12 +60,6 @@ async fn main(spawner: Spawner) {
|
||||
config.max_power = 100;
|
||||
config.max_packet_size_0 = 64;
|
||||
|
||||
// Required for Windows support.
|
||||
config.composite_with_iads = true;
|
||||
config.device_class = 0xEF;
|
||||
config.device_sub_class = 0x02;
|
||||
config.device_protocol = 0x01;
|
||||
|
||||
// Create embassy-usb DeviceBuilder using the driver and config.
|
||||
static CONFIG_DESC: StaticCell<[u8; 256]> = StaticCell::new();
|
||||
static BOS_DESC: StaticCell<[u8; 256]> = StaticCell::new();
|
||||
|
@ -36,13 +36,6 @@ async fn main(_spawner: Spawner) {
|
||||
config.max_power = 100;
|
||||
config.max_packet_size_0 = 64;
|
||||
|
||||
// Required for windows compatibility.
|
||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||
config.device_class = 0xEF;
|
||||
config.device_sub_class = 0x02;
|
||||
config.device_protocol = 0x01;
|
||||
config.composite_with_iads = true;
|
||||
|
||||
// Create embassy-usb DeviceBuilder using the driver and config.
|
||||
// It needs some buffers for building the descriptors.
|
||||
let mut config_descriptor = [0; 256];
|
||||
|
@ -53,13 +53,6 @@ async fn main(spawner: Spawner) {
|
||||
config.max_power = 100;
|
||||
config.max_packet_size_0 = 64;
|
||||
|
||||
// Required for windows compatibility.
|
||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||
config.device_class = 0xEF;
|
||||
config.device_sub_class = 0x02;
|
||||
config.device_protocol = 0x01;
|
||||
config.composite_with_iads = true;
|
||||
|
||||
static STATE: StaticCell<State> = StaticCell::new();
|
||||
let state = STATE.init(State::new());
|
||||
|
||||
|
@ -41,13 +41,6 @@ async fn main(_spawner: Spawner) {
|
||||
config.max_power = 100;
|
||||
config.max_packet_size_0 = 64;
|
||||
|
||||
// Required for windows compatibility.
|
||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||
config.device_class = 0xEF;
|
||||
config.device_sub_class = 0x02;
|
||||
config.device_protocol = 0x01;
|
||||
config.composite_with_iads = true;
|
||||
|
||||
// Create embassy-usb DeviceBuilder using the driver and config.
|
||||
// It needs some buffers for building the descriptors.
|
||||
let mut config_descriptor = [0; 256];
|
||||
|
@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0"
|
||||
[dependencies]
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf5340-app-s", "time-driver-rtc1", "gpiote", "unstable-pac"] }
|
||||
embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"] }
|
||||
embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
|
@ -1,6 +1,6 @@
|
||||
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
|
||||
# replace nRF82840_xxAA with your chip as listed in `probe-rs chip list`
|
||||
runner = "../../sshprobe.sh"
|
||||
runner = "probe-rs run --chip nrf54l15"
|
||||
|
||||
[build]
|
||||
target = "thumbv8m.main-none-eabihf"
|
||||
|
@ -5,8 +5,8 @@ version = "0.1.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf54l15-app-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
|
||||
defmt = "0.3"
|
||||
|
@ -5,8 +5,8 @@ version = "0.1.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-executor = { version = "0.6.3", path = "../../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-nrf = { version = "0.2.0", path = "../../../embassy-nrf", features = ["defmt", "nrf9120-ns", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
|
||||
defmt = "0.3"
|
||||
|
@ -5,8 +5,8 @@ version = "0.1.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-executor = { version = "0.6.3", path = "../../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-nrf = { version = "0.2.0", path = "../../../embassy-nrf", features = ["defmt", "nrf9120-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
|
||||
defmt = "0.3"
|
||||
|
@ -5,8 +5,8 @@ version = "0.1.0"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-nrf = { version = "0.2.0", path = "../../embassy-nrf", features = ["defmt", "nrf9160-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
embassy-net-nrf91 = { version = "0.1.0", path = "../../embassy-net-nrf91", features = ["defmt"] }
|
||||
embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "proto-ipv4", "medium-ip"] }
|
||||
|
@ -8,15 +8,15 @@ license = "MIT OR Apache-2.0"
|
||||
[dependencies]
|
||||
embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal", features = ["defmt"] }
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-98304", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-98304", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-rp = { version = "0.2.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp2040"] }
|
||||
embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "raw", "dhcpv4", "medium-ethernet", "dns", "proto-ipv4", "proto-ipv6", "multicast"] }
|
||||
embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
embassy-usb-logger = { version = "0.2.0", path = "../../embassy-usb-logger" }
|
||||
cyw43 = { version = "0.2.0", path = "../../cyw43", features = ["defmt", "firmware-logs", "bluetooth"] }
|
||||
cyw43 = { version = "0.2.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] }
|
||||
cyw43-pio = { version = "0.2.0", path = "../../cyw43-pio", features = ["defmt"] }
|
||||
|
||||
defmt = "0.3"
|
||||
@ -60,9 +60,6 @@ pio = "0.2.1"
|
||||
rand = { version = "0.8.5", default-features = false }
|
||||
embedded-sdmmc = "0.7.0"
|
||||
|
||||
bt-hci = { version = "0.1.0", default-features = false, features = ["defmt"] }
|
||||
trouble-host = { version = "0.1.0", features = ["defmt", "gatt"] }
|
||||
|
||||
[profile.release]
|
||||
debug = 2
|
||||
lto = true
|
||||
@ -74,7 +71,6 @@ lto = true
|
||||
opt-level = "z"
|
||||
|
||||
[patch.crates-io]
|
||||
trouble-host = { git = "https://github.com/embassy-rs/trouble.git", rev = "4b8c0f499b34e46ca23a56e2d1640ede371722cf" }
|
||||
embassy-executor = { path = "../../embassy-executor" }
|
||||
embassy-sync = { path = "../../embassy-sync" }
|
||||
embassy-futures = { path = "../../embassy-futures" }
|
||||
|
@ -1,150 +0,0 @@
|
||||
//! This example test the RP Pico W on board LED.
|
||||
//!
|
||||
//! It does not work with the RP Pico board. See blinky.rs.
|
||||
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use bt_hci::controller::ExternalController;
|
||||
use cyw43_pio::PioSpi;
|
||||
use defmt::*;
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_futures::join::join3;
|
||||
use embassy_rp::bind_interrupts;
|
||||
use embassy_rp::gpio::{Level, Output};
|
||||
use embassy_rp::peripherals::{DMA_CH0, PIO0};
|
||||
use embassy_rp::pio::{InterruptHandler, Pio};
|
||||
use embassy_sync::blocking_mutex::raw::NoopRawMutex;
|
||||
use embassy_time::{Duration, Timer};
|
||||
use static_cell::StaticCell;
|
||||
use trouble_host::advertise::{AdStructure, Advertisement, BR_EDR_NOT_SUPPORTED, LE_GENERAL_DISCOVERABLE};
|
||||
use trouble_host::attribute::{AttributeTable, CharacteristicProp, Service, Uuid};
|
||||
use trouble_host::gatt::GattEvent;
|
||||
use trouble_host::{Address, BleHost, BleHostResources, PacketQos};
|
||||
use {defmt_rtt as _, embassy_time as _, panic_probe as _};
|
||||
|
||||
bind_interrupts!(struct Irqs {
|
||||
PIO0_IRQ_0 => InterruptHandler<PIO0>;
|
||||
});
|
||||
|
||||
#[embassy_executor::task]
|
||||
async fn cyw43_task(runner: cyw43::Runner<'static, Output<'static>, PioSpi<'static, PIO0, 0, DMA_CH0>>) -> ! {
|
||||
runner.run().await
|
||||
}
|
||||
|
||||
#[embassy_executor::main]
|
||||
async fn main(spawner: Spawner) {
|
||||
let p = embassy_rp::init(Default::default());
|
||||
let fw = include_bytes!("../../../../cyw43-firmware/43439A0.bin");
|
||||
let clm = include_bytes!("../../../../cyw43-firmware/43439A0_clm.bin");
|
||||
let btfw = include_bytes!("../../../../cyw43-firmware/43439A0_btfw.bin");
|
||||
|
||||
// To make flashing faster for development, you may want to flash the firmwares independently
|
||||
// at hardcoded addresses, instead of baking them into the program with `include_bytes!`:
|
||||
// probe-rs download 43439A0.bin --format bin --chip RP2040 --base-address 0x10100000
|
||||
// probe-rs download 43439A0_clm.bin --format bin --chip RP2040 --base-address 0x10140000
|
||||
// probe-rs download 43439A0_btfw.bin --format bin --chip RP2040 --base-address 0x10141400
|
||||
//let fw = unsafe { core::slice::from_raw_parts(0x10100000 as *const u8, 224190) };
|
||||
//let clm = unsafe { core::slice::from_raw_parts(0x10140000 as *const u8, 4752) };
|
||||
//let btfw = unsafe { core::slice::from_raw_parts(0x10141400 as *const u8, 6164) };
|
||||
|
||||
let pwr = Output::new(p.PIN_23, Level::Low);
|
||||
let cs = Output::new(p.PIN_25, Level::High);
|
||||
let mut pio = Pio::new(p.PIO0, Irqs);
|
||||
let spi = PioSpi::new(&mut pio.common, pio.sm0, pio.irq0, cs, p.PIN_24, p.PIN_29, p.DMA_CH0);
|
||||
|
||||
static STATE: StaticCell<cyw43::State> = StaticCell::new();
|
||||
let state = STATE.init(cyw43::State::new());
|
||||
let (_net_device, bt_device, mut control, runner) = cyw43::new_with_bluetooth(state, pwr, spi, fw, btfw).await;
|
||||
unwrap!(spawner.spawn(cyw43_task(runner)));
|
||||
control.init(clm).await;
|
||||
|
||||
let controller: ExternalController<_, 10> = ExternalController::new(bt_device);
|
||||
static HOST_RESOURCES: StaticCell<BleHostResources<4, 32, 27>> = StaticCell::new();
|
||||
let host_resources = HOST_RESOURCES.init(BleHostResources::new(PacketQos::None));
|
||||
|
||||
let mut ble: BleHost<'_, _> = BleHost::new(controller, host_resources);
|
||||
|
||||
ble.set_random_address(Address::random([0xff, 0x9f, 0x1a, 0x05, 0xe4, 0xff]));
|
||||
let mut table: AttributeTable<'_, NoopRawMutex, 10> = AttributeTable::new();
|
||||
|
||||
// Generic Access Service (mandatory)
|
||||
let id = b"Pico W Bluetooth";
|
||||
let appearance = [0x80, 0x07];
|
||||
let mut bat_level = [0; 1];
|
||||
let handle = {
|
||||
let mut svc = table.add_service(Service::new(0x1800));
|
||||
let _ = svc.add_characteristic_ro(0x2a00, id);
|
||||
let _ = svc.add_characteristic_ro(0x2a01, &appearance[..]);
|
||||
svc.build();
|
||||
|
||||
// Generic attribute service (mandatory)
|
||||
table.add_service(Service::new(0x1801));
|
||||
|
||||
// Battery service
|
||||
let mut svc = table.add_service(Service::new(0x180f));
|
||||
|
||||
svc.add_characteristic(
|
||||
0x2a19,
|
||||
&[CharacteristicProp::Read, CharacteristicProp::Notify],
|
||||
&mut bat_level,
|
||||
)
|
||||
.build()
|
||||
};
|
||||
|
||||
let mut adv_data = [0; 31];
|
||||
AdStructure::encode_slice(
|
||||
&[
|
||||
AdStructure::Flags(LE_GENERAL_DISCOVERABLE | BR_EDR_NOT_SUPPORTED),
|
||||
AdStructure::ServiceUuids16(&[Uuid::Uuid16([0x0f, 0x18])]),
|
||||
AdStructure::CompleteLocalName(b"Pico W Bluetooth"),
|
||||
],
|
||||
&mut adv_data[..],
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let server = ble.gatt_server(&table);
|
||||
|
||||
info!("Starting advertising and GATT service");
|
||||
let _ = join3(
|
||||
ble.run(),
|
||||
async {
|
||||
loop {
|
||||
match server.next().await {
|
||||
Ok(GattEvent::Write { handle, connection: _ }) => {
|
||||
let _ = table.get(handle, |value| {
|
||||
info!("Write event. Value written: {:?}", value);
|
||||
});
|
||||
}
|
||||
Ok(GattEvent::Read { .. }) => {
|
||||
info!("Read event");
|
||||
}
|
||||
Err(e) => {
|
||||
error!("Error processing GATT events: {:?}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async {
|
||||
let mut advertiser = ble
|
||||
.advertise(
|
||||
&Default::default(),
|
||||
Advertisement::ConnectableScannableUndirected {
|
||||
adv_data: &adv_data[..],
|
||||
scan_data: &[],
|
||||
},
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
let conn = advertiser.accept().await.unwrap();
|
||||
// Keep connection alive
|
||||
let mut tick: u8 = 0;
|
||||
loop {
|
||||
Timer::after(Duration::from_secs(10)).await;
|
||||
tick += 1;
|
||||
server.notify(handle, &conn, &[tick]).await.unwrap();
|
||||
}
|
||||
},
|
||||
)
|
||||
.await;
|
||||
}
|
@ -49,13 +49,6 @@ async fn main(_spawner: Spawner) {
|
||||
config.max_power = 100;
|
||||
config.max_packet_size_0 = 64;
|
||||
|
||||
// Required for windows compatibility.
|
||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||
config.device_class = 0xEF;
|
||||
config.device_sub_class = 0x02;
|
||||
config.device_protocol = 0x01;
|
||||
config.composite_with_iads = true;
|
||||
|
||||
// Create embassy-usb DeviceBuilder using the driver and config.
|
||||
// It needs some buffers for building the descriptors.
|
||||
let mut config_descriptor = [0; 256];
|
||||
|
@ -60,12 +60,6 @@ async fn main(spawner: Spawner) {
|
||||
config.max_power = 100;
|
||||
config.max_packet_size_0 = 64;
|
||||
|
||||
// Required for Windows support.
|
||||
config.composite_with_iads = true;
|
||||
config.device_class = 0xEF;
|
||||
config.device_sub_class = 0x02;
|
||||
config.device_protocol = 0x01;
|
||||
|
||||
// Create embassy-usb DeviceBuilder using the driver and config.
|
||||
static CONFIG_DESC: StaticCell<[u8; 256]> = StaticCell::new();
|
||||
static BOS_DESC: StaticCell<[u8; 256]> = StaticCell::new();
|
||||
|
@ -37,13 +37,6 @@ async fn main(_spawner: Spawner) {
|
||||
config.max_power = 100;
|
||||
config.max_packet_size_0 = 64;
|
||||
|
||||
// Required for windows compatibility.
|
||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||
config.device_class = 0xEF;
|
||||
config.device_sub_class = 0x02;
|
||||
config.device_protocol = 0x01;
|
||||
config.composite_with_iads = true;
|
||||
|
||||
// Create embassy-usb DeviceBuilder using the driver and config.
|
||||
// It needs some buffers for building the descriptors.
|
||||
let mut config_descriptor = [0; 256];
|
||||
|
@ -84,13 +84,6 @@ async fn main(_spawner: Spawner) {
|
||||
config.max_power = 100;
|
||||
config.max_packet_size_0 = 64;
|
||||
|
||||
// // Required for windows compatibility.
|
||||
// // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||
config.device_class = 0xEF;
|
||||
config.device_sub_class = 0x02;
|
||||
config.device_protocol = 0x01;
|
||||
config.composite_with_iads = true;
|
||||
|
||||
// Create embassy-usb DeviceBuilder using the driver and config.
|
||||
// It needs some buffers for building the descriptors.
|
||||
let mut config_descriptor = [0; 256];
|
||||
|
@ -62,13 +62,6 @@ async fn main(_spawner: Spawner) {
|
||||
config.max_power = 100;
|
||||
config.max_packet_size_0 = 64;
|
||||
|
||||
// // Required for windows compatibility.
|
||||
// // https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||
config.device_class = 0xEF;
|
||||
config.device_sub_class = 0x02;
|
||||
config.device_protocol = 0x01;
|
||||
config.composite_with_iads = true;
|
||||
|
||||
// Create embassy-usb DeviceBuilder using the driver and config.
|
||||
// It needs some buffers for building the descriptors.
|
||||
let mut config_descriptor = [0; 256];
|
||||
|
@ -37,13 +37,6 @@ async fn main(spawner: Spawner) {
|
||||
config.serial_number = Some("12345678");
|
||||
config.max_power = 100;
|
||||
config.max_packet_size_0 = 64;
|
||||
|
||||
// Required for windows compatibility.
|
||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||
config.device_class = 0xEF;
|
||||
config.device_sub_class = 0x02;
|
||||
config.device_protocol = 0x01;
|
||||
config.composite_with_iads = true;
|
||||
config
|
||||
};
|
||||
|
||||
|
@ -37,13 +37,6 @@ async fn main(_spawner: Spawner) {
|
||||
config.max_power = 100;
|
||||
config.max_packet_size_0 = 64;
|
||||
|
||||
// Required for windows compatibility.
|
||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||
config.device_class = 0xEF;
|
||||
config.device_sub_class = 0x02;
|
||||
config.device_protocol = 0x01;
|
||||
config.composite_with_iads = true;
|
||||
|
||||
// Create embassy-usb DeviceBuilder using the driver and config.
|
||||
// It needs some buffers for building the descriptors.
|
||||
let mut config_descriptor = [0; 256];
|
||||
|
@ -8,15 +8,15 @@ license = "MIT OR Apache-2.0"
|
||||
[dependencies]
|
||||
embassy-embedded-hal = { version = "0.2.0", path = "../../embassy-embedded-hal", features = ["defmt"] }
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-98304", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-98304", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] }
|
||||
embassy-rp = { version = "0.2.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp235xa", "binary-info"] }
|
||||
embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "raw", "dhcpv4", "medium-ethernet", "dns"] }
|
||||
embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
embassy-usb-logger = { version = "0.2.0", path = "../../embassy-usb-logger" }
|
||||
cyw43 = { version = "0.2.0", path = "../../cyw43", features = ["defmt", "firmware-logs", "bluetooth"] }
|
||||
cyw43 = { version = "0.2.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] }
|
||||
cyw43-pio = { version = "0.2.0", path = "../../cyw43-pio", features = ["defmt"] }
|
||||
|
||||
defmt = "0.3"
|
||||
@ -60,9 +60,6 @@ pio = "0.2.1"
|
||||
rand = { version = "0.8.5", default-features = false }
|
||||
embedded-sdmmc = "0.7.0"
|
||||
|
||||
bt-hci = { version = "0.1.0", default-features = false, features = ["defmt"] }
|
||||
trouble-host = { version = "0.1.0", features = ["defmt", "gatt"] }
|
||||
|
||||
[profile.release]
|
||||
debug = 2
|
||||
|
||||
@ -71,7 +68,6 @@ lto = true
|
||||
opt-level = "z"
|
||||
|
||||
[patch.crates-io]
|
||||
trouble-host = { git = "https://github.com/embassy-rs/trouble.git", rev = "4b8c0f499b34e46ca23a56e2d1640ede371722cf" }
|
||||
embassy-executor = { path = "../../embassy-executor" }
|
||||
embassy-sync = { path = "../../embassy-sync" }
|
||||
embassy-futures = { path = "../../embassy-futures" }
|
||||
|
@ -52,13 +52,6 @@ async fn main(_spawner: Spawner) {
|
||||
config.max_power = 100;
|
||||
config.max_packet_size_0 = 64;
|
||||
|
||||
// Required for windows compatibility.
|
||||
// https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_CDC_ACM_IAD.html#help
|
||||
config.device_class = 0xEF;
|
||||
config.device_sub_class = 0x02;
|
||||
config.device_protocol = 0x01;
|
||||
config.composite_with_iads = true;
|
||||
|
||||
// Create embassy-usb DeviceBuilder using the driver and config.
|
||||
// It needs some buffers for building the descriptors.
|
||||
let mut config_descriptor = [0; 256];
|
||||
|
@ -6,9 +6,9 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["log"] }
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-std", "executor-thread", "log"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["log", "std", ] }
|
||||
embassy-net = { version = "0.5.0", path = "../../embassy-net", features=[ "std", "log", "medium-ethernet", "medium-ip", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-std", "executor-thread", "log"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["log", "std", ] }
|
||||
embassy-net = { version = "0.5.0", path = "../../embassy-net", features=[ "log", "medium-ethernet", "medium-ip", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6"] }
|
||||
embassy-net-tuntap = { version = "0.1.0", path = "../../embassy-net-tuntap" }
|
||||
embassy-net-ppp = { version = "0.1.0", path = "../../embassy-net-ppp", features = ["log"]}
|
||||
embedded-io-async = { version = "0.6.1" }
|
||||
|
@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0"
|
||||
# Change stm32c031c6 to your chip name, if necessary.
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "time-driver-any", "stm32c031c6", "memory-x", "unstable-pac", "exti"] }
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
|
||||
defmt = "0.3"
|
||||
defmt-rtt = "0.4"
|
||||
|
@ -13,8 +13,8 @@ defmt = "0.3"
|
||||
defmt-rtt = "0.4"
|
||||
panic-probe = { version = "0.3", features = ["print-defmt"] }
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
static_cell = "2"
|
||||
portable-atomic = { version = "1.5", features = ["unsafe-assume-single-core"] }
|
||||
|
||||
|
@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0"
|
||||
# Change stm32f103c8 to your chip name, if necessary.
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-any" ] }
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
|
@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0"
|
||||
# Change stm32f207zg to your chip name, if necessary.
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32f207zg", "unstable-pac", "memory-x", "time-driver-any", "exti"] }
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
|
||||
defmt = "0.3"
|
||||
defmt-rtt = "0.4"
|
||||
|
@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0"
|
||||
# Change stm32f303ze to your chip name, if necessary.
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32f303ze", "unstable-pac", "memory-x", "time-driver-tim2", "exti"] }
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
|
@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32f334r8", "unstable-pac", "memory-x", "time-driver-any", "exti"] }
|
||||
embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
@ -8,8 +8,8 @@ license = "MIT OR Apache-2.0"
|
||||
# Change stm32f429zi to your chip name, if necessary.
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32f429zi", "unstable-pac", "memory-x", "time-driver-tim4", "exti", "chrono"] }
|
||||
embassy-sync = { version = "0.6.1", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-executor = { version = "0.6.3", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
embassy-usb = { version = "0.3.0", path = "../../embassy-usb", features = ["defmt" ] }
|
||||
embassy-net = { version = "0.5.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", ] }
|
||||
embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] }
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user