mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-28 04:40:39 +00:00
Merge branch 'main' into feat/adc4-stm32wba
This commit is contained in:
commit
6d0927b174
4
ci.sh
4
ci.sh
@ -155,6 +155,7 @@ cargo batch \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f303c8,defmt,exti,time-driver-any,time \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f398ve,defmt,exti,time-driver-any,time \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32f378cc,defmt,exti,time-driver-any,time \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32g0b0ce,defmt,exti,time-driver-any,time \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32g0c1ve,defmt,exti,time-driver-any,time \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features stm32f217zg,defmt,exti,time-driver-any,time \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32l552ze,dual-bank,defmt,exti,time-driver-any,low-power,time \
|
||||
@ -372,6 +373,9 @@ rm out/tests/pimoroni-pico-plus-2/adc
|
||||
# temporarily disabled
|
||||
rm out/tests/pimoroni-pico-plus-2/pwm
|
||||
|
||||
# flaky
|
||||
rm out/tests/rpi-pico/pwm
|
||||
|
||||
if [[ -z "${TELEPROBE_TOKEN-}" ]]; then
|
||||
echo No teleprobe token found, skipping running HIL tests
|
||||
exit
|
||||
|
@ -5,9 +5,14 @@ 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
|
||||
<!-- next-header -->
|
||||
## Unreleased - ReleaseDate
|
||||
|
||||
- Update embassy-rp to 0.4.0
|
||||
## 0.5.1 - 2025-07-16
|
||||
|
||||
## 0.5.0 - 2025-07-15
|
||||
|
||||
- Update embassy-rp to 0.5.0
|
||||
|
||||
## 0.3.0 - 2025-01-05
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cyw43-pio"
|
||||
version = "0.4.0"
|
||||
version = "0.5.1"
|
||||
edition = "2021"
|
||||
description = "RP2040 PIO SPI implementation for cyw43"
|
||||
keywords = ["embedded", "cyw43", "embassy-net", "embedded-hal-async", "wifi"]
|
||||
@ -10,8 +10,8 @@ repository = "https://github.com/embassy-rs/embassy"
|
||||
documentation = "https://docs.embassy.dev/cyw43-pio"
|
||||
|
||||
[dependencies]
|
||||
cyw43 = { version = "0.3.0", path = "../cyw43" }
|
||||
embassy-rp = { version = "0.4.0", path = "../embassy-rp" }
|
||||
cyw43 = { version = "0.4.0", path = "../cyw43" }
|
||||
embassy-rp = { version = "0.6.0", path = "../embassy-rp" }
|
||||
fixed = "1.23.1"
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
|
||||
|
5
cyw43-pio/release.toml
Normal file
5
cyw43-pio/release.toml
Normal file
@ -0,0 +1,5 @@
|
||||
pre-release-replacements = [
|
||||
{file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1},
|
||||
{file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1},
|
||||
{file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n## Unreleased - ReleaseDate\n", exactly=1},
|
||||
]
|
@ -5,7 +5,14 @@ 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
|
||||
<!-- next-header -->
|
||||
## Unreleased - ReleaseDate
|
||||
|
||||
## 0.4.0 - 2025-07-15
|
||||
|
||||
- bump embassy-sync to 0.7.0
|
||||
- bump bt-hci to 0.3.0
|
||||
- make State::new const fn
|
||||
|
||||
## 0.3.0 - 2025-01-05
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "cyw43"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
edition = "2021"
|
||||
description = "Rust driver for the CYW43439 WiFi chip, used in the Raspberry Pi Pico W."
|
||||
keywords = ["embedded", "cyw43", "embassy-net", "embedded-hal-async", "wifi"]
|
||||
@ -21,7 +21,7 @@ firmware-logs = []
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time"}
|
||||
embassy-sync = { version = "0.7.0", 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"}
|
||||
embassy-net-driver-channel = { version = "0.3.1", path = "../embassy-net-driver-channel"}
|
||||
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
log = { version = "0.4.17", optional = true }
|
||||
|
5
cyw43/release.toml
Normal file
5
cyw43/release.toml
Normal file
@ -0,0 +1,5 @@
|
||||
pre-release-replacements = [
|
||||
{file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1},
|
||||
{file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1},
|
||||
{file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n## Unreleased - ReleaseDate\n", exactly=1},
|
||||
]
|
@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
|
||||
[dependencies]
|
||||
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.4.0", path = "../../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote"] }
|
||||
embassy-nrf = { version = "0.5.0", path = "../../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote"] }
|
||||
|
||||
defmt = "1.0.1"
|
||||
defmt-rtt = "1.0.0"
|
||||
|
@ -25,7 +25,7 @@ defmt = { version = "1.0.1", optional = true }
|
||||
log = { version = "0.4.17", optional = true }
|
||||
|
||||
embassy-sync = { version = "0.7.0", path = "../embassy-sync" }
|
||||
embassy-nrf = { version = "0.4.0", path = "../embassy-nrf", default-features = false }
|
||||
embassy-nrf = { version = "0.5.0", path = "../embassy-nrf", default-features = false }
|
||||
embassy-boot = { version = "0.4.0", path = "../embassy-boot" }
|
||||
cortex-m = { version = "0.7.6" }
|
||||
cortex-m-rt = { version = "0.7" }
|
||||
|
@ -25,7 +25,7 @@ defmt = { version = "1.0.1", optional = true }
|
||||
log = { version = "0.4", optional = true }
|
||||
|
||||
embassy-sync = { version = "0.7.0", path = "../embassy-sync" }
|
||||
embassy-rp = { version = "0.4.0", path = "../embassy-rp", default-features = false }
|
||||
embassy-rp = { version = "0.6.0", path = "../embassy-rp", default-features = false }
|
||||
embassy-boot = { version = "0.4.0", path = "../embassy-boot" }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
|
||||
|
@ -28,7 +28,7 @@ defmt = { version = "1.0.1", optional = true }
|
||||
digest = "0.10"
|
||||
log = { version = "0.4", optional = true }
|
||||
ed25519-dalek = { version = "2", default-features = false, features = ["digest"], optional = true }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../embassy-embedded-hal" }
|
||||
embassy-sync = { version = "0.7.0", path = "../embassy-sync" }
|
||||
embedded-storage = "0.3.1"
|
||||
embedded-storage-async = { version = "0.4.1" }
|
||||
|
@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
<!-- next-header -->
|
||||
## Unreleased - ReleaseDate
|
||||
|
||||
## 0.3.1 - 2025-07-16
|
||||
|
||||
- `SpiDevice` cancel safety: always set CS pin to high on drop
|
||||
- Update `embassy-sync` to v0.7.0
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "embassy-embedded-hal"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "Collection of utilities to use `embedded-hal` and `embedded-storage` traits with Embassy."
|
||||
|
@ -68,7 +68,7 @@ embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", option
|
||||
embassy-time-queue-utils = { version = "0.1", path = "../embassy-time-queue-utils", optional = true }
|
||||
embassy-time = { version = "0.4", path = "../embassy-time", optional = true }
|
||||
embassy-hal-internal = { version = "0.3.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-3"] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../embassy-embedded-hal", default-features = false }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../embassy-embedded-hal", default-features = false }
|
||||
embassy-futures = { version = "0.1.1", path = "../embassy-futures" }
|
||||
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
|
@ -32,7 +32,7 @@ embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", option
|
||||
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.3.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-2"] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../embassy-embedded-hal", default-features = false }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../embassy-embedded-hal", default-features = false }
|
||||
embassy-executor = { version = "0.7.0", path = "../embassy-executor", optional = true }
|
||||
|
||||
embedded-hal = { version = "1.0" }
|
||||
|
@ -16,7 +16,7 @@ log = { version = "0.4", default-features = false, optional = true }
|
||||
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-net-driver-channel = { version = "0.3.1", path = "../embassy-net-driver-channel" }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
|
||||
bitfield = "0.14.0"
|
||||
|
@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
<!-- next-header -->
|
||||
## Unreleased - ReleaseDate
|
||||
|
||||
## 0.3.1 - 2025-07-16
|
||||
|
||||
- Update `embassy-sync` to v0.7.0
|
||||
|
||||
## 0.3.0 - 2024-08-05
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "embassy-net-driver-channel"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "High-level channel-based driver for the `embassy-net` async TCP/IP network stack."
|
||||
|
@ -20,7 +20,7 @@ log = { version = "0.4.14", optional = true }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
embassy-sync = { version = "0.7.0", 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"}
|
||||
embassy-net-driver-channel = { version = "0.3.1", path = "../embassy-net-driver-channel"}
|
||||
|
||||
embedded-hal = { version = "1.0" }
|
||||
embedded-hal-async = { version = "1.0" }
|
||||
|
@ -23,7 +23,7 @@ cortex-m = "0.7.7"
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
embassy-sync = { version = "0.7.0", 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" }
|
||||
embassy-net-driver-channel = { version = "0.3.1", path = "../embassy-net-driver-channel" }
|
||||
|
||||
heapless = "0.8"
|
||||
embedded-io = "0.6.1"
|
||||
|
@ -18,7 +18,7 @@ defmt = { version = "1.0.1", optional = true }
|
||||
log = { version = "0.4.14", optional = true }
|
||||
|
||||
embedded-io-async = { version = "0.6.1" }
|
||||
embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel" }
|
||||
embassy-net-driver-channel = { version = "0.3.1", path = "../embassy-net-driver-channel" }
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
|
||||
ppproto = { version = "0.2.1"}
|
||||
embassy-sync = { version = "0.7.0", path = "../embassy-sync" }
|
||||
|
@ -12,7 +12,7 @@ documentation = "https://docs.embassy.dev/embassy-net-wiznet"
|
||||
[dependencies]
|
||||
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-net-driver-channel = { version = "0.3.1", path = "../embassy-net-driver-channel" }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
|
@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
<!-- next-header -->
|
||||
## Unreleased - ReleaseDate
|
||||
|
||||
## 0.5.0 - 2025-07-16
|
||||
|
||||
- changed: update to latest embassy-usb-driver
|
||||
|
||||
## 0.4.1 - 2025-07-14
|
||||
|
||||
- changed: nrf52833: configure internal LDO
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "embassy-nrf"
|
||||
version = "0.4.1"
|
||||
version = "0.5.0"
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "Embassy Hardware Abstraction Layer (HAL) for nRF series microcontrollers"
|
||||
@ -145,8 +145,8 @@ embassy-time-queue-utils = { version = "0.1", path = "../embassy-time-queue-util
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time", optional = true }
|
||||
embassy-sync = { version = "0.7.0", path = "../embassy-sync" }
|
||||
embassy-hal-internal = { version = "0.3.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-3"] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../embassy-embedded-hal", default-features = false }
|
||||
embassy-usb-driver = { version = "0.1.0", path = "../embassy-usb-driver" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../embassy-embedded-hal", default-features = false }
|
||||
embassy-usb-driver = { version = "0.2.0", path = "../embassy-usb-driver" }
|
||||
|
||||
embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
|
||||
embedded-hal-1 = { package = "embedded-hal", version = "1.0" }
|
||||
|
@ -586,6 +586,8 @@ mod consts {
|
||||
pub const UICR_APPROTECT: *mut u32 = 0x00FF8000 as *mut u32;
|
||||
pub const UICR_SECUREAPPROTECT: *mut u32 = 0x00FF802C as *mut u32;
|
||||
pub const APPROTECT_ENABLED: u32 = 0x0000_0000;
|
||||
#[cfg(feature = "_nrf9120")]
|
||||
pub const APPROTECT_DISABLED: u32 = 0x50FA50FA;
|
||||
}
|
||||
|
||||
#[cfg(feature = "_nrf5340-app")]
|
||||
@ -768,6 +770,28 @@ pub fn init(config: config::Config) -> Peripherals {
|
||||
}
|
||||
|
||||
// nothing to do on the nrf9160, debug is allowed by default.
|
||||
|
||||
// nrf9151, nrf9161 use the new-style approtect that requires writing a register.
|
||||
#[cfg(feature = "nrf9120-s")]
|
||||
unsafe {
|
||||
let p = pac::APPROTECT_S;
|
||||
|
||||
let res = uicr_write(consts::UICR_APPROTECT, consts::APPROTECT_DISABLED);
|
||||
needs_reset |= res == WriteResult::Written;
|
||||
p.approtect()
|
||||
.disable()
|
||||
.write(|w| w.set_disable(pac::approtect::vals::ApprotectDisableDisable::SW_UNPROTECTED));
|
||||
|
||||
let res = uicr_write(consts::UICR_SECUREAPPROTECT, consts::APPROTECT_DISABLED);
|
||||
needs_reset |= res == WriteResult::Written;
|
||||
p.secureapprotect()
|
||||
.disable()
|
||||
.write(|w| w.set_disable(pac::approtect::vals::SecureapprotectDisableDisable::SW_UNPROTECTED));
|
||||
|
||||
// TODO: maybe add workaround for this errata
|
||||
// It uses extra power, not sure how to let the user choose.
|
||||
// https://docs.nordicsemi.com/bundle/errata_nRF9151_Rev1/page/ERR/nRF9151/Rev1/latest/anomaly_151_36.html#anomaly_151_36
|
||||
}
|
||||
}
|
||||
config::Debug::Disallowed => {
|
||||
// TODO: Handle nRF54L
|
||||
@ -783,6 +807,13 @@ pub fn init(config: config::Config) -> Peripherals {
|
||||
let res = uicr_write(consts::UICR_SECUREAPPROTECT, consts::APPROTECT_ENABLED);
|
||||
needs_reset |= res == WriteResult::Written;
|
||||
}
|
||||
|
||||
#[cfg(feature = "nrf9120-s")]
|
||||
{
|
||||
let p = pac::APPROTECT_S;
|
||||
p.approtect().forceprotect().write(|w| w.set_forceprotect(true));
|
||||
p.secureapprotect().forceprotect().write(|w| w.set_forceprotect(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
config::Debug::NotConfigured => {}
|
||||
|
@ -121,10 +121,11 @@ impl<'d, T: Instance, V: VbusDetect + 'd> driver::Driver<'d> for Driver<'d, T, V
|
||||
fn alloc_endpoint_in(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> Result<Self::EndpointIn, driver::EndpointAllocError> {
|
||||
let index = self.alloc_in.allocate(ep_type)?;
|
||||
let index = self.alloc_in.allocate(ep_type, ep_addr)?;
|
||||
let ep_addr = EndpointAddress::from_parts(index, Direction::In);
|
||||
Ok(Endpoint::new(EndpointInfo {
|
||||
addr: ep_addr,
|
||||
@ -137,10 +138,11 @@ impl<'d, T: Instance, V: VbusDetect + 'd> driver::Driver<'d> for Driver<'d, T, V
|
||||
fn alloc_endpoint_out(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> Result<Self::EndpointOut, driver::EndpointAllocError> {
|
||||
let index = self.alloc_out.allocate(ep_type)?;
|
||||
let index = self.alloc_out.allocate(ep_type, ep_addr)?;
|
||||
let ep_addr = EndpointAddress::from_parts(index, Direction::Out);
|
||||
Ok(Endpoint::new(EndpointInfo {
|
||||
addr: ep_addr,
|
||||
@ -734,7 +736,11 @@ impl Allocator {
|
||||
Self { used: 0 }
|
||||
}
|
||||
|
||||
fn allocate(&mut self, ep_type: EndpointType) -> Result<usize, driver::EndpointAllocError> {
|
||||
fn allocate(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
) -> Result<usize, driver::EndpointAllocError> {
|
||||
// Endpoint addresses are fixed in hardware:
|
||||
// - 0x80 / 0x00 - Control EP0
|
||||
// - 0x81 / 0x01 - Bulk/Interrupt EP1
|
||||
@ -748,16 +754,37 @@ impl Allocator {
|
||||
|
||||
// Endpoint directions are allocated individually.
|
||||
|
||||
let alloc_index = match ep_type {
|
||||
EndpointType::Isochronous => 8,
|
||||
EndpointType::Control => return Err(driver::EndpointAllocError),
|
||||
EndpointType::Interrupt | EndpointType::Bulk => {
|
||||
// Find rightmost zero bit in 1..=7
|
||||
let ones = (self.used >> 1).trailing_ones() as usize;
|
||||
if ones >= 7 {
|
||||
return Err(driver::EndpointAllocError);
|
||||
let alloc_index = if let Some(addr) = ep_addr {
|
||||
// Use the specified endpoint address
|
||||
let requested_index = addr.index();
|
||||
// Validate the requested index based on endpoint type
|
||||
match ep_type {
|
||||
EndpointType::Isochronous => {
|
||||
if requested_index != 8 {
|
||||
return Err(driver::EndpointAllocError);
|
||||
}
|
||||
}
|
||||
EndpointType::Control => return Err(driver::EndpointAllocError),
|
||||
EndpointType::Interrupt | EndpointType::Bulk => {
|
||||
if requested_index < 1 || requested_index > 7 {
|
||||
return Err(driver::EndpointAllocError);
|
||||
}
|
||||
}
|
||||
}
|
||||
requested_index
|
||||
} else {
|
||||
// Allocate any available endpoint
|
||||
match ep_type {
|
||||
EndpointType::Isochronous => 8,
|
||||
EndpointType::Control => return Err(driver::EndpointAllocError),
|
||||
EndpointType::Interrupt | EndpointType::Bulk => {
|
||||
// Find rightmost zero bit in 1..=7
|
||||
let ones = (self.used >> 1).trailing_ones() as usize;
|
||||
if ones >= 7 {
|
||||
return Err(driver::EndpointAllocError);
|
||||
}
|
||||
ones + 1
|
||||
}
|
||||
ones + 1
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
<!-- next-header -->
|
||||
## Unreleased - ReleaseDate
|
||||
|
||||
## 0.6.0 - 2025-07-16
|
||||
|
||||
- update to latest embassy-usb-driver
|
||||
|
||||
## 0.5.0 - 2025-07-15
|
||||
|
||||
- Fix wrong `funcsel` on RP2350 gpout/gpin ([#3975](https://github.com/embassy-rs/embassy/pull/3975))
|
||||
- Fix potential race condition in `ADC::wait_for_ready` ([#4012](https://github.com/embassy-rs/embassy/pull/4012))
|
||||
- `flash`: rename `BOOTROM_BASE` to `BOOTRAM_BASE` ([#4014](https://github.com/embassy-rs/embassy/pull/4014))
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "embassy-rp"
|
||||
version = "0.4.0"
|
||||
version = "0.6.0"
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "Embassy Hardware Abstraction Layer (HAL) for the Raspberry Pi RP2040 or RP235x microcontroller"
|
||||
@ -142,8 +142,8 @@ embassy-time-queue-utils = { version = "0.1", path = "../embassy-time-queue-util
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
|
||||
embassy-hal-internal = { version = "0.3.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-2"] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../embassy-embedded-hal" }
|
||||
embassy-usb-driver = { version = "0.1.0", path = "../embassy-usb-driver" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../embassy-embedded-hal" }
|
||||
embassy-usb-driver = { version = "0.2.0", path = "../embassy-usb-driver" }
|
||||
atomic-polyfill = "1.0.1"
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
log = { version = "0.4.14", optional = true }
|
||||
|
@ -76,6 +76,7 @@ impl Default for Config {
|
||||
pub const FIFO_SIZE: u8 = 16;
|
||||
|
||||
/// I2C driver.
|
||||
#[derive(Debug)]
|
||||
pub struct I2c<'d, T: Instance, M: Mode> {
|
||||
phantom: PhantomData<(&'d mut T, M)>,
|
||||
}
|
||||
|
@ -153,6 +153,7 @@ impl<'d, T: Instance> Driver<'d, T> {
|
||||
fn alloc_endpoint<D: Dir>(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> Result<Endpoint<'d, T, D>, driver::EndpointAllocError> {
|
||||
@ -169,12 +170,25 @@ impl<'d, T: Instance> Driver<'d, T> {
|
||||
Direction::In => &mut self.ep_in,
|
||||
};
|
||||
|
||||
let index = alloc.iter_mut().enumerate().find(|(i, ep)| {
|
||||
if *i == 0 {
|
||||
return false; // reserved for control pipe
|
||||
let index = if let Some(addr) = ep_addr {
|
||||
// Use the specified endpoint address
|
||||
let requested_index = addr.index();
|
||||
if requested_index == 0 || requested_index >= EP_COUNT {
|
||||
return Err(EndpointAllocError);
|
||||
}
|
||||
!ep.used
|
||||
});
|
||||
if alloc[requested_index].used {
|
||||
return Err(EndpointAllocError);
|
||||
}
|
||||
Some((requested_index, &mut alloc[requested_index]))
|
||||
} else {
|
||||
// Find any available endpoint
|
||||
alloc.iter_mut().enumerate().find(|(i, ep)| {
|
||||
if *i == 0 {
|
||||
return false; // reserved for control pipe
|
||||
}
|
||||
!ep.used
|
||||
})
|
||||
};
|
||||
|
||||
let (index, ep) = index.ok_or(EndpointAllocError)?;
|
||||
assert!(!ep.used);
|
||||
@ -299,19 +313,21 @@ impl<'d, T: Instance> driver::Driver<'d> for Driver<'d, T> {
|
||||
fn alloc_endpoint_in(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> Result<Self::EndpointIn, driver::EndpointAllocError> {
|
||||
self.alloc_endpoint(ep_type, max_packet_size, interval_ms)
|
||||
self.alloc_endpoint(ep_type, ep_addr, max_packet_size, interval_ms)
|
||||
}
|
||||
|
||||
fn alloc_endpoint_out(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> Result<Self::EndpointOut, driver::EndpointAllocError> {
|
||||
self.alloc_endpoint(ep_type, max_packet_size, interval_ms)
|
||||
self.alloc_endpoint(ep_type, ep_addr, max_packet_size, interval_ms)
|
||||
}
|
||||
|
||||
fn start(self, control_max_packet_size: u16) -> (Self::Bus, Self::ControlPipe) {
|
||||
|
@ -24,7 +24,7 @@ embassy-sync = { version = "0.7.0", path = "../embassy-sync" }
|
||||
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.3.0", path = "../embassy-hal-internal" }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../embassy-embedded-hal" }
|
||||
embassy-net-driver = { version = "0.2.0", path = "../embassy-net-driver", optional=true }
|
||||
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
|
@ -54,9 +54,9 @@ embassy-time-driver = { version = "0.2", path = "../embassy-time-driver", option
|
||||
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.3.0", path = "../embassy-hal-internal", features = ["cortex-m", "prio-bits-4"] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../embassy-embedded-hal", default-features = false }
|
||||
embassy-embedded-hal = { version = "0.3.1", 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-driver = { version = "0.2.0", path = "../embassy-usb-driver" }
|
||||
embassy-usb-synopsys-otg = { version = "0.2.0", path = "../embassy-usb-synopsys-otg" }
|
||||
embassy-executor = { version = "0.7.0", path = "../embassy-executor", optional = true }
|
||||
|
||||
@ -81,7 +81,7 @@ futures-util = { version = "0.3.30", default-features = false }
|
||||
sdio-host = "0.9.0"
|
||||
critical-section = "1.1"
|
||||
#stm32-metapac = { version = "16" }
|
||||
stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-60582dd866b34e690f156cd72b91300a9a8057c0" }
|
||||
stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-85e2c0f43f3460b3305a2f97962bd39deed09d13" }
|
||||
|
||||
vcell = "0.1.3"
|
||||
nb = "1.0.0"
|
||||
@ -110,7 +110,7 @@ proc-macro2 = "1.0.36"
|
||||
quote = "1.0.15"
|
||||
|
||||
#stm32-metapac = { version = "16", default-features = false, features = ["metadata"]}
|
||||
stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-60582dd866b34e690f156cd72b91300a9a8057c0", default-features = false, features = ["metadata"] }
|
||||
stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-85e2c0f43f3460b3305a2f97962bd39deed09d13", default-features = false, features = ["metadata"] }
|
||||
|
||||
[features]
|
||||
default = ["rt"]
|
||||
|
@ -74,7 +74,7 @@ macro_rules! impl_peri {
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(any(rcc_c0, rcc_g0, rcc_u0))]
|
||||
#[cfg(any(rcc_c0, rcc_g0x0, rcc_g0x1, rcc_u0))]
|
||||
#[allow(unused_imports)]
|
||||
use self::{McoSource as Mco1Source, McoSource as Mco2Source};
|
||||
|
||||
|
@ -87,6 +87,8 @@ unsafe fn on_interrupt(r: Regs, state: &'static State) {
|
||||
|
||||
r.cr1().modify(|w| {
|
||||
w.set_tcie(false);
|
||||
// Reenable receiver for half-duplex if it was disabled
|
||||
w.set_re(true);
|
||||
});
|
||||
|
||||
state.tx_done.store(true, Ordering::Release);
|
||||
|
@ -651,7 +651,7 @@ pub fn send_break(regs: &Regs) {
|
||||
/// In case of readback, keep Receiver enabled
|
||||
fn half_duplex_set_rx_tx_before_write(r: &Regs, enable_readback: bool) {
|
||||
let mut cr1 = r.cr1().read();
|
||||
if r.cr3().read().hdsel() && !cr1.te() {
|
||||
if r.cr3().read().hdsel() {
|
||||
cr1.set_te(true);
|
||||
cr1.set_re(enable_readback);
|
||||
r.cr1().write_value(cr1);
|
||||
|
@ -231,19 +231,23 @@ impl<'d, T: Instance> embassy_usb_driver::Driver<'d> for Driver<'d, T> {
|
||||
fn alloc_endpoint_in(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> Result<Self::EndpointIn, EndpointAllocError> {
|
||||
self.inner.alloc_endpoint_in(ep_type, max_packet_size, interval_ms)
|
||||
self.inner
|
||||
.alloc_endpoint_in(ep_type, ep_addr, max_packet_size, interval_ms)
|
||||
}
|
||||
|
||||
fn alloc_endpoint_out(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> Result<Self::EndpointOut, EndpointAllocError> {
|
||||
self.inner.alloc_endpoint_out(ep_type, max_packet_size, interval_ms)
|
||||
self.inner
|
||||
.alloc_endpoint_out(ep_type, ep_addr, max_packet_size, interval_ms)
|
||||
}
|
||||
|
||||
fn start(self, control_max_packet_size: u16) -> (Self::Bus, Self::ControlPipe) {
|
||||
@ -538,7 +542,7 @@ foreach_interrupt!(
|
||||
))] {
|
||||
const FIFO_DEPTH_WORDS: u16 = 1024;
|
||||
const ENDPOINT_COUNT: usize = 9;
|
||||
} else if #[cfg(any(stm32wba, stm32u5))] {
|
||||
} else if #[cfg(any(stm32u5, stm32wba))] {
|
||||
const FIFO_DEPTH_WORDS: u16 = 1024;
|
||||
const ENDPOINT_COUNT: usize = 9;
|
||||
} else {
|
||||
|
@ -359,9 +359,38 @@ impl<'d, T: Instance> Driver<'d, T> {
|
||||
addr
|
||||
}
|
||||
|
||||
fn is_endpoint_available<D: Dir>(&self, index: usize, ep_type: EndpointType) -> bool {
|
||||
if index == 0 && ep_type != EndpointType::Control {
|
||||
return false; // EP0 is reserved for control
|
||||
}
|
||||
|
||||
let ep = match self.alloc.get(index) {
|
||||
Some(ep) => ep,
|
||||
None => return false,
|
||||
};
|
||||
|
||||
let used = ep.used_out || ep.used_in;
|
||||
|
||||
if used && ep.ep_type == EndpointType::Isochronous {
|
||||
// Isochronous endpoints are always double-buffered.
|
||||
// Their corresponding endpoint/channel registers are forced to be unidirectional.
|
||||
// Do not reuse this index.
|
||||
// FIXME: Bulk endpoints can be double buffered, but are not in the current implementation.
|
||||
return false;
|
||||
}
|
||||
|
||||
let used_dir = match D::dir() {
|
||||
Direction::Out => ep.used_out,
|
||||
Direction::In => ep.used_in,
|
||||
};
|
||||
|
||||
!used || (ep.ep_type == ep_type && !used_dir)
|
||||
}
|
||||
|
||||
fn alloc_endpoint<D: Dir>(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> Result<Endpoint<'d, T, D>, driver::EndpointAllocError> {
|
||||
@ -373,28 +402,17 @@ impl<'d, T: Instance> Driver<'d, T> {
|
||||
D::dir()
|
||||
);
|
||||
|
||||
let index = self.alloc.iter_mut().enumerate().find(|(i, ep)| {
|
||||
if *i == 0 && ep_type != EndpointType::Control {
|
||||
return false; // reserved for control pipe
|
||||
}
|
||||
let used = ep.used_out || ep.used_in;
|
||||
if used && (ep.ep_type == EndpointType::Isochronous) {
|
||||
// Isochronous endpoints are always double-buffered.
|
||||
// Their corresponding endpoint/channel registers are forced to be unidirectional.
|
||||
// Do not reuse this index.
|
||||
// FIXME: Bulk endpoints can be double buffered, but are not in the current implementation.
|
||||
return false;
|
||||
}
|
||||
|
||||
let used_dir = match D::dir() {
|
||||
Direction::Out => ep.used_out,
|
||||
Direction::In => ep.used_in,
|
||||
};
|
||||
!used || (ep.ep_type == ep_type && !used_dir)
|
||||
});
|
||||
let index = if let Some(addr) = ep_addr {
|
||||
// Use the specified endpoint address
|
||||
self.is_endpoint_available::<D>(addr.index(), ep_type)
|
||||
.then_some(addr.index())
|
||||
} else {
|
||||
// Find any available endpoint
|
||||
(0..self.alloc.len()).find(|&i| self.is_endpoint_available::<D>(i, ep_type))
|
||||
};
|
||||
|
||||
let (index, ep) = match index {
|
||||
Some(x) => x,
|
||||
Some(i) => (i, &mut self.alloc[i]),
|
||||
None => return Err(EndpointAllocError),
|
||||
};
|
||||
|
||||
@ -479,27 +497,29 @@ impl<'d, T: Instance> driver::Driver<'d> for Driver<'d, T> {
|
||||
fn alloc_endpoint_in(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> Result<Self::EndpointIn, driver::EndpointAllocError> {
|
||||
self.alloc_endpoint(ep_type, max_packet_size, interval_ms)
|
||||
self.alloc_endpoint(ep_type, ep_addr, max_packet_size, interval_ms)
|
||||
}
|
||||
|
||||
fn alloc_endpoint_out(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> Result<Self::EndpointOut, driver::EndpointAllocError> {
|
||||
self.alloc_endpoint(ep_type, max_packet_size, interval_ms)
|
||||
self.alloc_endpoint(ep_type, ep_addr, max_packet_size, interval_ms)
|
||||
}
|
||||
|
||||
fn start(mut self, control_max_packet_size: u16) -> (Self::Bus, Self::ControlPipe) {
|
||||
let ep_out = self
|
||||
.alloc_endpoint(EndpointType::Control, control_max_packet_size, 0)
|
||||
.alloc_endpoint(EndpointType::Control, None, control_max_packet_size, 0)
|
||||
.unwrap();
|
||||
let ep_in = self
|
||||
.alloc_endpoint(EndpointType::Control, control_max_packet_size, 0)
|
||||
.alloc_endpoint(EndpointType::Control, None, control_max_packet_size, 0)
|
||||
.unwrap();
|
||||
assert_eq!(ep_out.info.addr.index(), 0);
|
||||
assert_eq!(ep_in.info.addr.index(), 0);
|
||||
|
@ -35,7 +35,7 @@ embassy-boot = { version = "0.4.0", path = "../embassy-boot" }
|
||||
embassy-futures = { version = "0.1.1", path = "../embassy-futures" }
|
||||
embassy-sync = { version = "0.7.0", path = "../embassy-sync" }
|
||||
embassy-time = { version = "0.4.0", path = "../embassy-time" }
|
||||
embassy-usb = { version = "0.4.0", path = "../embassy-usb", default-features = false }
|
||||
embassy-usb = { version = "0.5.0", path = "../embassy-usb", default-features = false }
|
||||
embedded-storage = { version = "0.3.1" }
|
||||
esp32c3-hal = { version = "0.13.0", optional = true, default-features = false }
|
||||
|
||||
|
@ -8,4 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
<!-- next-header -->
|
||||
## Unreleased - ReleaseDate
|
||||
|
||||
## 0.2.0 - 2025-07-16
|
||||
|
||||
- Make USB endpoint allocator methods accept an optional `EndpointAddress`.
|
||||
|
||||
## 0.1.1 - 2025-07-15
|
||||
|
||||
- Add `embedded_io_async::Error` implementation for `EndpointError` ([#4176](https://github.com/embassy-rs/embassy/pull/4176))
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "embassy-usb-driver"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "Driver trait for `embassy-usb`, an async USB device stack for embedded devices."
|
||||
|
@ -136,6 +136,7 @@ pub trait Driver<'a> {
|
||||
fn alloc_endpoint_out(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> Result<Self::EndpointOut, EndpointAllocError>;
|
||||
@ -153,6 +154,7 @@ pub trait Driver<'a> {
|
||||
fn alloc_endpoint_in(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> Result<Self::EndpointIn, EndpointAllocError>;
|
||||
|
@ -15,7 +15,7 @@ src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-usb-l
|
||||
target = "thumbv7em-none-eabi"
|
||||
|
||||
[dependencies]
|
||||
embassy-usb = { version = "0.4.0", path = "../embassy-usb" }
|
||||
embassy-usb = { version = "0.5.0", path = "../embassy-usb" }
|
||||
embassy-sync = { version = "0.7.0", path = "../embassy-sync" }
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
|
||||
log = "0.4"
|
||||
|
@ -19,7 +19,7 @@ target = "thumbv7em-none-eabi"
|
||||
critical-section = "1.1"
|
||||
|
||||
embassy-sync = { version = "0.7.0", path = "../embassy-sync" }
|
||||
embassy-usb-driver = { version = "0.1.0", path = "../embassy-usb-driver" }
|
||||
embassy-usb-driver = { version = "0.2.0", path = "../embassy-usb-driver" }
|
||||
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
log = { version = "0.4.14", optional = true }
|
||||
|
@ -345,6 +345,7 @@ impl<'d, const MAX_EP_COUNT: usize> Driver<'d, MAX_EP_COUNT> {
|
||||
fn alloc_endpoint<D: Dir>(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> Result<Endpoint<'d, D>, EndpointAllocError> {
|
||||
@ -379,15 +380,31 @@ impl<'d, const MAX_EP_COUNT: usize> Driver<'d, MAX_EP_COUNT> {
|
||||
Direction::In => &mut self.ep_in[..self.instance.endpoint_count],
|
||||
};
|
||||
|
||||
// Find free endpoint slot
|
||||
let slot = eps.iter_mut().enumerate().find(|(i, ep)| {
|
||||
if *i == 0 && ep_type != EndpointType::Control {
|
||||
// reserved for control pipe
|
||||
false
|
||||
} else {
|
||||
ep.is_none()
|
||||
// Find endpoint slot
|
||||
let slot = if let Some(addr) = ep_addr {
|
||||
// Use the specified endpoint address
|
||||
let requested_index = addr.index();
|
||||
if requested_index >= self.instance.endpoint_count {
|
||||
return Err(EndpointAllocError);
|
||||
}
|
||||
});
|
||||
if requested_index == 0 && ep_type != EndpointType::Control {
|
||||
return Err(EndpointAllocError); // EP0 is reserved for control
|
||||
}
|
||||
if eps[requested_index].is_some() {
|
||||
return Err(EndpointAllocError); // Already allocated
|
||||
}
|
||||
Some((requested_index, &mut eps[requested_index]))
|
||||
} else {
|
||||
// Find any free endpoint slot
|
||||
eps.iter_mut().enumerate().find(|(i, ep)| {
|
||||
if *i == 0 && ep_type != EndpointType::Control {
|
||||
// reserved for control pipe
|
||||
false
|
||||
} else {
|
||||
ep.is_none()
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
let index = match slot {
|
||||
Some((index, ep)) => {
|
||||
@ -438,27 +455,29 @@ impl<'d, const MAX_EP_COUNT: usize> embassy_usb_driver::Driver<'d> for Driver<'d
|
||||
fn alloc_endpoint_in(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> Result<Self::EndpointIn, EndpointAllocError> {
|
||||
self.alloc_endpoint(ep_type, max_packet_size, interval_ms)
|
||||
self.alloc_endpoint(ep_type, ep_addr, max_packet_size, interval_ms)
|
||||
}
|
||||
|
||||
fn alloc_endpoint_out(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> Result<Self::EndpointOut, EndpointAllocError> {
|
||||
self.alloc_endpoint(ep_type, max_packet_size, interval_ms)
|
||||
self.alloc_endpoint(ep_type, ep_addr, max_packet_size, interval_ms)
|
||||
}
|
||||
|
||||
fn start(mut self, control_max_packet_size: u16) -> (Self::Bus, Self::ControlPipe) {
|
||||
let ep_out = self
|
||||
.alloc_endpoint(EndpointType::Control, control_max_packet_size, 0)
|
||||
.alloc_endpoint(EndpointType::Control, None, control_max_packet_size, 0)
|
||||
.unwrap();
|
||||
let ep_in = self
|
||||
.alloc_endpoint(EndpointType::Control, control_max_packet_size, 0)
|
||||
.alloc_endpoint(EndpointType::Control, None, control_max_packet_size, 0)
|
||||
.unwrap();
|
||||
assert_eq!(ep_out.info.addr.index(), 0);
|
||||
assert_eq!(ep_in.info.addr.index(), 0);
|
||||
@ -1210,10 +1229,23 @@ impl<'d> embassy_usb_driver::EndpointIn for Endpoint<'d, In> {
|
||||
});
|
||||
|
||||
// Write data to FIFO
|
||||
for chunk in buf.chunks(4) {
|
||||
let chunks = buf.chunks_exact(4);
|
||||
// Stash the last partial chunk
|
||||
let rem = chunks.remainder();
|
||||
let last_chunk = (!rem.is_empty()).then(|| {
|
||||
let mut tmp = [0u8; 4];
|
||||
tmp[0..chunk.len()].copy_from_slice(chunk);
|
||||
self.regs.fifo(index).write_value(regs::Fifo(u32::from_ne_bytes(tmp)));
|
||||
tmp[0..rem.len()].copy_from_slice(rem);
|
||||
u32::from_ne_bytes(tmp)
|
||||
});
|
||||
|
||||
let fifo = self.regs.fifo(index);
|
||||
for chunk in chunks {
|
||||
let val = u32::from_ne_bytes(chunk.try_into().unwrap());
|
||||
fifo.write_value(regs::Fifo(val));
|
||||
}
|
||||
// Write any last chunk
|
||||
if let Some(val) = last_chunk {
|
||||
fifo.write_value(regs::Fifo(val));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -8,12 +8,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
<!-- next-header -->
|
||||
## Unreleased - ReleaseDate
|
||||
|
||||
## 0.5.0 - 2025-07-16
|
||||
|
||||
- `UAC1`: unmute by default ([#3992](https://github.com/embassy-rs/embassy/pull/3992))
|
||||
- `cdc_acm`: `State::new` is now `const` ([#4000](https://github.com/embassy-rs/embassy/pull/4000))
|
||||
- Add support for CMSIS-DAP v2 USB class ([#4107](https://github.com/embassy-rs/embassy/pull/4107))
|
||||
- Reduce `UsbDevice` builder logs to `trace` ([#4130](https://github.com/embassy-rs/embassy/pull/4130))
|
||||
- Implement `embedded-io-async` traits for USB CDC ACM ([#4176](https://github.com/embassy-rs/embassy/pull/4176))
|
||||
- Update `embassy-sync` to v0.7.0
|
||||
- Fix CDC ACM BufferedReceiver buffer calculation
|
||||
|
||||
## 0.4.0 - 2025-01-15
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "embassy-usb"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0"
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
description = "Async USB device stack for embedded devices in Rust."
|
||||
@ -47,9 +47,9 @@ max-handler-count-8 = []
|
||||
|
||||
[dependencies]
|
||||
embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
|
||||
embassy-usb-driver = { version = "0.1.0", path = "../embassy-usb-driver" }
|
||||
embassy-usb-driver = { version = "0.2.0", path = "../embassy-usb-driver" }
|
||||
embassy-sync = { version = "0.7.0", path = "../embassy-sync" }
|
||||
embassy-net-driver-channel = { version = "0.3.0", path = "../embassy-net-driver-channel" }
|
||||
embassy-net-driver-channel = { version = "0.3.1", path = "../embassy-net-driver-channel" }
|
||||
|
||||
defmt = { version = "1", optional = true }
|
||||
log = { version = "0.4.14", optional = true }
|
||||
|
@ -2,7 +2,7 @@ use heapless::Vec;
|
||||
|
||||
use crate::config::MAX_HANDLER_COUNT;
|
||||
use crate::descriptor::{BosWriter, DescriptorWriter, SynchronizationType, UsageType};
|
||||
use crate::driver::{Driver, Endpoint, EndpointInfo, EndpointType};
|
||||
use crate::driver::{Driver, Endpoint, EndpointAddress, EndpointInfo, EndpointType};
|
||||
use crate::msos::{DeviceLevelDescriptor, FunctionLevelDescriptor, MsOsDescriptorWriter};
|
||||
use crate::types::{InterfaceNumber, StringIndex};
|
||||
use crate::{Handler, Interface, UsbDevice, MAX_INTERFACE_COUNT, STRING_INDEX_CUSTOM_START};
|
||||
@ -465,11 +465,17 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> {
|
||||
/// Allocate an IN endpoint, without writing its descriptor.
|
||||
///
|
||||
/// Used for granular control over the order of endpoint and descriptor creation.
|
||||
pub fn alloc_endpoint_in(&mut self, ep_type: EndpointType, max_packet_size: u16, interval_ms: u8) -> D::EndpointIn {
|
||||
pub fn alloc_endpoint_in(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> D::EndpointIn {
|
||||
let ep = self
|
||||
.builder
|
||||
.driver
|
||||
.alloc_endpoint_in(ep_type, max_packet_size, interval_ms)
|
||||
.alloc_endpoint_in(ep_type, ep_addr, max_packet_size, interval_ms)
|
||||
.expect("alloc_endpoint_in failed");
|
||||
|
||||
ep
|
||||
@ -478,13 +484,14 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> {
|
||||
fn endpoint_in(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
synchronization_type: SynchronizationType,
|
||||
usage_type: UsageType,
|
||||
extra_fields: &[u8],
|
||||
) -> D::EndpointIn {
|
||||
let ep = self.alloc_endpoint_in(ep_type, max_packet_size, interval_ms);
|
||||
let ep = self.alloc_endpoint_in(ep_type, ep_addr, max_packet_size, interval_ms);
|
||||
self.endpoint_descriptor(ep.info(), synchronization_type, usage_type, extra_fields);
|
||||
|
||||
ep
|
||||
@ -496,13 +503,14 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> {
|
||||
pub fn alloc_endpoint_out(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> D::EndpointOut {
|
||||
let ep = self
|
||||
.builder
|
||||
.driver
|
||||
.alloc_endpoint_out(ep_type, max_packet_size, interval_ms)
|
||||
.alloc_endpoint_out(ep_type, ep_addr, max_packet_size, interval_ms)
|
||||
.expect("alloc_endpoint_out failed");
|
||||
|
||||
ep
|
||||
@ -511,13 +519,14 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> {
|
||||
fn endpoint_out(
|
||||
&mut self,
|
||||
ep_type: EndpointType,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
synchronization_type: SynchronizationType,
|
||||
usage_type: UsageType,
|
||||
extra_fields: &[u8],
|
||||
) -> D::EndpointOut {
|
||||
let ep = self.alloc_endpoint_out(ep_type, max_packet_size, interval_ms);
|
||||
let ep = self.alloc_endpoint_out(ep_type, ep_addr, max_packet_size, interval_ms);
|
||||
self.endpoint_descriptor(ep.info(), synchronization_type, usage_type, extra_fields);
|
||||
|
||||
ep
|
||||
@ -527,9 +536,10 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> {
|
||||
///
|
||||
/// Descriptors are written in the order builder functions are called. Note that some
|
||||
/// classes care about the order.
|
||||
pub fn endpoint_bulk_in(&mut self, max_packet_size: u16) -> D::EndpointIn {
|
||||
pub fn endpoint_bulk_in(&mut self, ep_addr: Option<EndpointAddress>, max_packet_size: u16) -> D::EndpointIn {
|
||||
self.endpoint_in(
|
||||
EndpointType::Bulk,
|
||||
ep_addr,
|
||||
max_packet_size,
|
||||
0,
|
||||
SynchronizationType::NoSynchronization,
|
||||
@ -542,9 +552,10 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> {
|
||||
///
|
||||
/// Descriptors are written in the order builder functions are called. Note that some
|
||||
/// classes care about the order.
|
||||
pub fn endpoint_bulk_out(&mut self, max_packet_size: u16) -> D::EndpointOut {
|
||||
pub fn endpoint_bulk_out(&mut self, ep_addr: Option<EndpointAddress>, max_packet_size: u16) -> D::EndpointOut {
|
||||
self.endpoint_out(
|
||||
EndpointType::Bulk,
|
||||
ep_addr,
|
||||
max_packet_size,
|
||||
0,
|
||||
SynchronizationType::NoSynchronization,
|
||||
@ -557,9 +568,15 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> {
|
||||
///
|
||||
/// Descriptors are written in the order builder functions are called. Note that some
|
||||
/// classes care about the order.
|
||||
pub fn endpoint_interrupt_in(&mut self, max_packet_size: u16, interval_ms: u8) -> D::EndpointIn {
|
||||
pub fn endpoint_interrupt_in(
|
||||
&mut self,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> D::EndpointIn {
|
||||
self.endpoint_in(
|
||||
EndpointType::Interrupt,
|
||||
ep_addr,
|
||||
max_packet_size,
|
||||
interval_ms,
|
||||
SynchronizationType::NoSynchronization,
|
||||
@ -569,9 +586,15 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> {
|
||||
}
|
||||
|
||||
/// Allocate a INTERRUPT OUT endpoint and write its descriptor.
|
||||
pub fn endpoint_interrupt_out(&mut self, max_packet_size: u16, interval_ms: u8) -> D::EndpointOut {
|
||||
pub fn endpoint_interrupt_out(
|
||||
&mut self,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
) -> D::EndpointOut {
|
||||
self.endpoint_out(
|
||||
EndpointType::Interrupt,
|
||||
ep_addr,
|
||||
max_packet_size,
|
||||
interval_ms,
|
||||
SynchronizationType::NoSynchronization,
|
||||
@ -586,6 +609,7 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> {
|
||||
/// classes care about the order.
|
||||
pub fn endpoint_isochronous_in(
|
||||
&mut self,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
synchronization_type: SynchronizationType,
|
||||
@ -594,6 +618,7 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> {
|
||||
) -> D::EndpointIn {
|
||||
self.endpoint_in(
|
||||
EndpointType::Isochronous,
|
||||
ep_addr,
|
||||
max_packet_size,
|
||||
interval_ms,
|
||||
synchronization_type,
|
||||
@ -605,6 +630,7 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> {
|
||||
/// Allocate a ISOCHRONOUS OUT endpoint and write its descriptor.
|
||||
pub fn endpoint_isochronous_out(
|
||||
&mut self,
|
||||
ep_addr: Option<EndpointAddress>,
|
||||
max_packet_size: u16,
|
||||
interval_ms: u8,
|
||||
synchronization_type: SynchronizationType,
|
||||
@ -613,6 +639,7 @@ impl<'a, 'd, D: Driver<'d>> InterfaceAltBuilder<'a, 'd, D> {
|
||||
) -> D::EndpointOut {
|
||||
self.endpoint_out(
|
||||
EndpointType::Isochronous,
|
||||
ep_addr,
|
||||
max_packet_size,
|
||||
interval_ms,
|
||||
synchronization_type,
|
||||
|
@ -254,14 +254,14 @@ impl<'d, D: Driver<'d>> CdcAcmClass<'d, D> {
|
||||
],
|
||||
);
|
||||
|
||||
let comm_ep = alt.endpoint_interrupt_in(8, 255);
|
||||
let comm_ep = alt.endpoint_interrupt_in(None, 8, 255);
|
||||
|
||||
// Data interface
|
||||
let mut iface = func.interface();
|
||||
let data_if = iface.interface_number();
|
||||
let mut alt = iface.alt_setting(USB_CLASS_CDC_DATA, 0x00, CDC_PROTOCOL_NONE, None);
|
||||
let read_ep = alt.endpoint_bulk_out(max_packet_size);
|
||||
let write_ep = alt.endpoint_bulk_in(max_packet_size);
|
||||
let read_ep = alt.endpoint_bulk_out(None, max_packet_size);
|
||||
let write_ep = alt.endpoint_bulk_in(None, max_packet_size);
|
||||
|
||||
drop(func);
|
||||
|
||||
@ -501,7 +501,7 @@ impl<'d, D: Driver<'d>> BufferedReceiver<'d, D> {
|
||||
fn read_from_buffer(&mut self, buf: &mut [u8]) -> usize {
|
||||
let available = &self.buffer[self.start..self.end];
|
||||
let len = core::cmp::min(available.len(), buf.len());
|
||||
buf[..len].copy_from_slice(&self.buffer[..len]);
|
||||
buf[..len].copy_from_slice(&available[..len]);
|
||||
self.start += len;
|
||||
len
|
||||
}
|
||||
|
@ -313,15 +313,15 @@ impl<'d, D: Driver<'d>> CdcNcmClass<'d, D> {
|
||||
],
|
||||
);
|
||||
|
||||
let comm_ep = alt.endpoint_interrupt_in(8, 255);
|
||||
let comm_ep = alt.endpoint_interrupt_in(None, 8, 255);
|
||||
|
||||
// Data interface
|
||||
let mut iface = func.interface();
|
||||
let data_if = iface.interface_number();
|
||||
let _alt = iface.alt_setting(USB_CLASS_CDC_DATA, 0x00, CDC_PROTOCOL_NTB, None);
|
||||
let mut alt = iface.alt_setting(USB_CLASS_CDC_DATA, 0x00, CDC_PROTOCOL_NTB, None);
|
||||
let read_ep = alt.endpoint_bulk_out(max_packet_size);
|
||||
let write_ep = alt.endpoint_bulk_in(max_packet_size);
|
||||
let read_ep = alt.endpoint_bulk_out(None, max_packet_size);
|
||||
let write_ep = alt.endpoint_bulk_in(None, max_packet_size);
|
||||
|
||||
drop(func);
|
||||
|
||||
|
@ -61,10 +61,10 @@ impl<'d, D: Driver<'d>> CmsisDapV2Class<'d, D> {
|
||||
));
|
||||
let mut interface = function.interface();
|
||||
let mut alt = interface.alt_setting(0xFF, 0, 0, Some(iface_string));
|
||||
let read_ep = alt.endpoint_bulk_out(max_packet_size);
|
||||
let write_ep = alt.endpoint_bulk_in(max_packet_size);
|
||||
let read_ep = alt.endpoint_bulk_out(None, max_packet_size);
|
||||
let write_ep = alt.endpoint_bulk_in(None, max_packet_size);
|
||||
let trace_ep = if trace {
|
||||
Some(alt.endpoint_bulk_in(max_packet_size))
|
||||
Some(alt.endpoint_bulk_in(None, max_packet_size))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
@ -133,9 +133,9 @@ fn build<'d, D: Driver<'d>>(
|
||||
],
|
||||
);
|
||||
|
||||
let ep_in = alt.endpoint_interrupt_in(config.max_packet_size, config.poll_ms);
|
||||
let ep_in = alt.endpoint_interrupt_in(None, config.max_packet_size, config.poll_ms);
|
||||
let ep_out = if with_out_endpoint {
|
||||
Some(alt.endpoint_interrupt_out(config.max_packet_size, config.poll_ms))
|
||||
Some(alt.endpoint_interrupt_out(None, config.max_packet_size, config.poll_ms))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
@ -129,14 +129,14 @@ impl<'d, D: Driver<'d>> MidiClass<'d, D> {
|
||||
for i in 0..n_out_jacks {
|
||||
endpoint_data[2 + i as usize] = in_jack_id_emb(i);
|
||||
}
|
||||
let read_ep = alt.endpoint_bulk_out(max_packet_size);
|
||||
let read_ep = alt.endpoint_bulk_out(None, max_packet_size);
|
||||
alt.descriptor(CS_ENDPOINT, &endpoint_data[0..2 + n_out_jacks as usize]);
|
||||
|
||||
endpoint_data[1] = n_in_jacks;
|
||||
for i in 0..n_in_jacks {
|
||||
endpoint_data[2 + i as usize] = out_jack_id_emb(i);
|
||||
}
|
||||
let write_ep = alt.endpoint_bulk_in(max_packet_size);
|
||||
let write_ep = alt.endpoint_bulk_in(None, max_packet_size);
|
||||
alt.descriptor(CS_ENDPOINT, &endpoint_data[0..2 + n_in_jacks as usize]);
|
||||
|
||||
MidiClass { read_ep, write_ep }
|
||||
|
@ -268,9 +268,10 @@ impl<'d, D: Driver<'d>> Speaker<'d, D> {
|
||||
|
||||
alt.descriptor(CS_INTERFACE, &format_descriptor);
|
||||
|
||||
let streaming_endpoint = alt.alloc_endpoint_out(EndpointType::Isochronous, max_packet_size, 1);
|
||||
let streaming_endpoint = alt.alloc_endpoint_out(EndpointType::Isochronous, None, max_packet_size, 1);
|
||||
let feedback_endpoint = alt.alloc_endpoint_in(
|
||||
EndpointType::Isochronous,
|
||||
None,
|
||||
4, // Feedback packets are 24 bit (10.14 format).
|
||||
1,
|
||||
);
|
||||
|
@ -8,10 +8,10 @@ license = "MIT OR Apache-2.0"
|
||||
embassy-sync = { version = "0.7.0", path = "../../../../embassy-sync" }
|
||||
embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [] }
|
||||
embassy-nrf = { version = "0.4.0", path = "../../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", ] }
|
||||
embassy-nrf = { version = "0.5.0", path = "../../../../embassy-nrf", features = ["time-driver-rtc1", "gpiote", ] }
|
||||
embassy-boot = { version = "0.4.0", path = "../../../../embassy-boot", features = [] }
|
||||
embassy-boot-nrf = { version = "0.5.0", path = "../../../../embassy-boot-nrf", features = [] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../../../embassy-embedded-hal" }
|
||||
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
defmt-rtt = { version = "1.0.0", optional = true }
|
||||
|
@ -8,9 +8,9 @@ license = "MIT OR Apache-2.0"
|
||||
embassy-sync = { version = "0.7.0", path = "../../../../embassy-sync" }
|
||||
embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", features = ["arch-cortex-m", "executor-thread"] }
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [] }
|
||||
embassy-rp = { version = "0.4.0", path = "../../../../embassy-rp", features = ["time-driver", "rp2040"] }
|
||||
embassy-rp = { version = "0.6.0", path = "../../../../embassy-rp", features = ["time-driver", "rp2040"] }
|
||||
embassy-boot-rp = { version = "0.5.0", path = "../../../../embassy-boot-rp", features = [] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../../../embassy-embedded-hal" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
defmt-rtt = "1.0.0"
|
||||
|
@ -10,7 +10,7 @@ embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", f
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", features = ["stm32f303re", "time-driver-any", "exti"] }
|
||||
embassy-boot-stm32 = { version = "0.3.0", path = "../../../../embassy-boot-stm32" }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../../../embassy-embedded-hal" }
|
||||
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
defmt-rtt = { version = "1.0.0", optional = true }
|
||||
|
@ -10,7 +10,7 @@ embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", f
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", features = ["stm32f767zi", "time-driver-any", "exti", "single-bank"] }
|
||||
embassy-boot-stm32 = { version = "0.3.0", path = "../../../../embassy-boot-stm32", features = [] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../../../embassy-embedded-hal" }
|
||||
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
defmt-rtt = { version = "1.0.0", optional = true }
|
||||
|
@ -10,7 +10,7 @@ embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", f
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", features = ["stm32h743zi", "time-driver-any", "exti"] }
|
||||
embassy-boot-stm32 = { version = "0.3.0", path = "../../../../embassy-boot-stm32", features = [] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../../../embassy-embedded-hal" }
|
||||
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
defmt-rtt = { version = "1.0.0", optional = true }
|
||||
|
@ -10,7 +10,7 @@ embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", f
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", features = ["stm32l072cz", "time-driver-any", "exti", "memory-x"] }
|
||||
embassy-boot-stm32 = { version = "0.3.0", path = "../../../../embassy-boot-stm32", features = [] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../../../embassy-embedded-hal" }
|
||||
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
defmt-rtt = { version = "1.0.0", optional = true }
|
||||
|
@ -10,7 +10,7 @@ embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", f
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", features = ["stm32l151cb-a", "time-driver-any", "exti"] }
|
||||
embassy-boot-stm32 = { version = "0.3.0", path = "../../../../embassy-boot-stm32", features = [] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../../../embassy-embedded-hal" }
|
||||
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
defmt-rtt = { version = "1.0.0", optional = true }
|
||||
|
@ -10,7 +10,7 @@ embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", f
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", features = ["stm32l475vg", "time-driver-any", "exti"] }
|
||||
embassy-boot-stm32 = { version = "0.3.0", path = "../../../../embassy-boot-stm32", features = [] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../../../embassy-embedded-hal" }
|
||||
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
defmt-rtt = { version = "1.0.0", optional = true }
|
||||
|
@ -10,8 +10,8 @@ embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", f
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", features = ["stm32wb55rg", "time-driver-any", "exti"] }
|
||||
embassy-boot-stm32 = { version = "0.3.0", path = "../../../../embassy-boot-stm32", features = [] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" }
|
||||
embassy-usb = { version = "0.4.0", path = "../../../../embassy-usb" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../../../embassy-embedded-hal" }
|
||||
embassy-usb = { version = "0.5.0", path = "../../../../embassy-usb" }
|
||||
embassy-usb-dfu = { version = "0.1.0", path = "../../../../embassy-usb-dfu", features = ["application", "cortex-m"] }
|
||||
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
|
@ -10,7 +10,7 @@ embassy-executor = { version = "0.7.0", path = "../../../../embassy-executor", f
|
||||
embassy-time = { version = "0.4.0", path = "../../../../embassy-time", features = [ "tick-hz-32_768"] }
|
||||
embassy-stm32 = { version = "0.2.0", path = "../../../../embassy-stm32", features = ["stm32wl55jc-cm4", "time-driver-any", "exti"] }
|
||||
embassy-boot-stm32 = { version = "0.3.0", path = "../../../../embassy-boot-stm32", features = [] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../../../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../../../embassy-embedded-hal" }
|
||||
|
||||
defmt = { version = "1.0.1", optional = true }
|
||||
defmt-rtt = { version = "1.0.0", optional = true }
|
||||
|
@ -18,7 +18,7 @@ embedded-storage = "0.3.1"
|
||||
embedded-storage-async = "0.4.0"
|
||||
cfg-if = "1.0.0"
|
||||
embassy-usb-dfu = { version = "0.1.0", path = "../../../../embassy-usb-dfu", features = ["dfu", "cortex-m"] }
|
||||
embassy-usb = { version = "0.4.0", path = "../../../../embassy-usb", default-features = false }
|
||||
embassy-usb = { version = "0.5.0", path = "../../../../embassy-usb", default-features = false }
|
||||
embassy-futures = { version = "0.1.1", path = "../../../../embassy-futures" }
|
||||
|
||||
[features]
|
||||
|
@ -18,7 +18,7 @@ log = [
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync" }
|
||||
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.4.0", path = "../../embassy-nrf", features = ["nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] }
|
||||
embassy-nrf = { version = "0.5.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"] }
|
||||
cortex-m-rt = "0.7.0"
|
||||
|
@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0"
|
||||
[dependencies]
|
||||
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"] }
|
||||
embassy-nrf = { version = "0.4.0", path = "../../embassy-nrf", features = ["defmt", "nrf51", "gpiote", "time-driver-rtc1", "unstable-pac", "time", "rt"] }
|
||||
embassy-nrf = { version = "0.5.0", path = "../../embassy-nrf", features = ["defmt", "nrf51", "gpiote", "time-driver-rtc1", "unstable-pac", "time", "rt"] }
|
||||
|
||||
defmt = "1.0.1"
|
||||
defmt-rtt = "1.0.0"
|
||||
|
@ -9,7 +9,7 @@ embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
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"] }
|
||||
embassy-nrf = { version = "0.4.0", path = "../../embassy-nrf", features = ["defmt", "nrf52810", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
embassy-nrf = { version = "0.5.0", path = "../../embassy-nrf", features = ["defmt", "nrf52810", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
|
||||
defmt = "1.0.1"
|
||||
defmt-rtt = "1.0.0"
|
||||
|
@ -11,7 +11,7 @@ embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
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.4.0", path = "../../embassy-nrf", features = [ "defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
embassy-nrf = { version = "0.5.0", path = "../../embassy-nrf", features = [ "defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
|
||||
defmt = "1.0.1"
|
||||
defmt-rtt = "1.0.0"
|
||||
|
@ -9,9 +9,9 @@ embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
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"] }
|
||||
embassy-nrf = { version = "0.4.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
embassy-nrf = { version = "0.5.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"] }
|
||||
embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embedded-io = { version = "0.6.0", features = ["defmt-03"] }
|
||||
embedded-io-async = { version = "0.6.1", features = ["defmt-03"] }
|
||||
embassy-net-esp-hosted = { version = "0.2.0", path = "../../embassy-net-esp-hosted", features = ["defmt"] }
|
||||
|
@ -9,9 +9,9 @@ embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
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"] }
|
||||
embassy-nrf = { version = "0.4.0", path = "../../embassy-nrf", features = ["defmt", "nrf5340-app-s", "time-driver-rtc1", "gpiote", "unstable-pac"] }
|
||||
embassy-nrf = { version = "0.5.0", path = "../../embassy-nrf", features = ["defmt", "nrf5340-app-s", "time-driver-rtc1", "gpiote", "unstable-pac"] }
|
||||
embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"] }
|
||||
embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embedded-io-async = { version = "0.6.1" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
|
@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0"
|
||||
[dependencies]
|
||||
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"] }
|
||||
embassy-nrf = { version = "0.4.0", path = "../../embassy-nrf", features = ["defmt", "nrf54l15-app-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
embassy-nrf = { version = "0.5.0", path = "../../embassy-nrf", features = ["defmt", "nrf54l15-app-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
|
||||
defmt = "1.0.1"
|
||||
defmt-rtt = "1.0.0"
|
||||
|
@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0"
|
||||
[dependencies]
|
||||
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"] }
|
||||
embassy-nrf = { version = "0.4.0", path = "../../../embassy-nrf", features = ["defmt", "nrf9120-ns", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
embassy-nrf = { version = "0.5.0", path = "../../../embassy-nrf", features = ["defmt", "nrf9120-ns", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
|
||||
defmt = "1.0.1"
|
||||
defmt-rtt = "1.0.0"
|
||||
|
@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0"
|
||||
[dependencies]
|
||||
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"] }
|
||||
embassy-nrf = { version = "0.4.0", path = "../../../embassy-nrf", features = ["defmt", "nrf9120-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
embassy-nrf = { version = "0.5.0", path = "../../../embassy-nrf", features = ["defmt", "nrf9120-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
|
||||
defmt = "1.0.1"
|
||||
defmt-rtt = "1.0.0"
|
||||
|
@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0"
|
||||
[dependencies]
|
||||
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"] }
|
||||
embassy-nrf = { version = "0.4.0", path = "../../embassy-nrf", features = ["defmt", "nrf9160-s", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] }
|
||||
embassy-nrf = { version = "0.5.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.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "proto-ipv4", "medium-ip"] }
|
||||
|
||||
|
@ -6,18 +6,18 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
|
||||
[dependencies]
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../embassy-embedded-hal", features = ["defmt"] }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../embassy-embedded-hal", features = ["defmt"] }
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
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"] }
|
||||
embassy-rp = { version = "0.4.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp2040"] }
|
||||
embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-rp = { version = "0.6.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp2040"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "icmp", "tcp", "udp", "raw", "dhcpv4", "medium-ethernet", "dns", "proto-ipv4", "proto-ipv6", "multicast"] }
|
||||
embassy-net-wiznet = { version = "0.2.0", path = "../../embassy-net-wiznet", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
embassy-usb-logger = { version = "0.4.0", path = "../../embassy-usb-logger" }
|
||||
cyw43 = { version = "0.3.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] }
|
||||
cyw43-pio = { version = "0.4.0", path = "../../cyw43-pio", features = ["defmt"] }
|
||||
cyw43 = { version = "0.4.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] }
|
||||
cyw43-pio = { version = "0.5.1", path = "../../cyw43-pio", features = ["defmt"] }
|
||||
|
||||
defmt = "1.0.1"
|
||||
defmt-rtt = "1.0.0"
|
||||
|
@ -96,8 +96,8 @@ async fn main(_spawner: Spawner) {
|
||||
let mut function = builder.function(0xFF, 0, 0);
|
||||
let mut interface = function.interface();
|
||||
let mut alt = interface.alt_setting(0xFF, 0, 0, None);
|
||||
let mut read_ep = alt.endpoint_bulk_out(64);
|
||||
let mut write_ep = alt.endpoint_bulk_in(64);
|
||||
let mut read_ep = alt.endpoint_bulk_out(None, 64);
|
||||
let mut write_ep = alt.endpoint_bulk_in(None, 64);
|
||||
drop(function);
|
||||
|
||||
// Build the builder.
|
||||
|
@ -125,8 +125,8 @@ impl<'d, D: Driver<'d>> WebEndpoints<'d, D> {
|
||||
let mut iface = func.interface();
|
||||
let mut alt = iface.alt_setting(0xff, 0x00, 0x00, None);
|
||||
|
||||
let write_ep = alt.endpoint_bulk_in(config.max_packet_size);
|
||||
let read_ep = alt.endpoint_bulk_out(config.max_packet_size);
|
||||
let write_ep = alt.endpoint_bulk_in(None, config.max_packet_size);
|
||||
let read_ep = alt.endpoint_bulk_out(None, config.max_packet_size);
|
||||
|
||||
WebEndpoints { write_ep, read_ep }
|
||||
}
|
||||
|
@ -6,18 +6,18 @@ license = "MIT OR Apache-2.0"
|
||||
|
||||
|
||||
[dependencies]
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../embassy-embedded-hal", features = ["defmt"] }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../embassy-embedded-hal", features = ["defmt"] }
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
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"] }
|
||||
embassy-rp = { version = "0.4.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp235xa", "binary-info"] }
|
||||
embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-rp = { version = "0.6.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl", "rp235xa", "binary-info"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "raw", "dhcpv4", "medium-ethernet", "dns"] }
|
||||
embassy-net-wiznet = { version = "0.2.0", path = "../../embassy-net-wiznet", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
embassy-usb-logger = { version = "0.4.0", path = "../../embassy-usb-logger" }
|
||||
cyw43 = { version = "0.3.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] }
|
||||
cyw43-pio = { version = "0.4.0", path = "../../cyw43-pio", features = ["defmt"] }
|
||||
cyw43 = { version = "0.4.0", path = "../../cyw43", features = ["defmt", "firmware-logs"] }
|
||||
cyw43-pio = { version = "0.5.1", path = "../../cyw43-pio", features = ["defmt"] }
|
||||
|
||||
defmt = "1.0.1"
|
||||
defmt-rtt = "1.0.0"
|
||||
|
@ -17,8 +17,8 @@ MEMORY {
|
||||
* of access times.
|
||||
* Example: Separate stacks for core0 and core1.
|
||||
*/
|
||||
SRAM4 : ORIGIN = 0x20080000, LENGTH = 4K
|
||||
SRAM5 : ORIGIN = 0x20081000, LENGTH = 4K
|
||||
SRAM8 : ORIGIN = 0x20080000, LENGTH = 4K
|
||||
SRAM9 : ORIGIN = 0x20081000, LENGTH = 4K
|
||||
}
|
||||
|
||||
SECTIONS {
|
||||
|
@ -125,8 +125,8 @@ impl<'d, D: Driver<'d>> WebEndpoints<'d, D> {
|
||||
let mut iface = func.interface();
|
||||
let mut alt = iface.alt_setting(0xff, 0x00, 0x00, None);
|
||||
|
||||
let write_ep = alt.endpoint_bulk_in(config.max_packet_size);
|
||||
let read_ep = alt.endpoint_bulk_out(config.max_packet_size);
|
||||
let write_ep = alt.endpoint_bulk_in(None, config.max_packet_size);
|
||||
let read_ep = alt.endpoint_bulk_out(None, config.max_packet_size);
|
||||
|
||||
WebEndpoints { write_ep, read_ep }
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = [
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
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.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
|
@ -10,7 +10,7 @@ embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = [
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
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.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
|
@ -9,7 +9,7 @@ embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["de
|
||||
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.2.0", path = "../../embassy-stm32", features = [ "defmt", "stm32f334r8", "unstable-pac", "memory-x", "time-driver-any", "exti"] }
|
||||
embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
|
@ -10,7 +10,7 @@ embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = ["
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
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.4.0", path = "../../embassy-usb", features = ["defmt" ] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt" ] }
|
||||
embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", ] }
|
||||
embassy-net-wiznet = { version = "0.2.0", path = "../../embassy-net-wiznet", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
@ -12,7 +12,7 @@ embassy-executor = { version = "0.7.0", path = "../../embassy-executor", feature
|
||||
embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] }
|
||||
embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"] }
|
||||
embedded-io-async = { version = "0.6.1" }
|
||||
embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
|
@ -10,7 +10,7 @@ embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = [
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
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.4.0", path = "../../embassy-usb", default-features = false, features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", default-features = false, features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
|
@ -10,7 +10,7 @@ embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = [
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
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.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
usbd-hid = "0.8.1"
|
||||
|
||||
|
@ -11,7 +11,7 @@ embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["de
|
||||
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-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6"] }
|
||||
embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
|
@ -8,11 +8,11 @@ license = "MIT OR Apache-2.0"
|
||||
# Change stm32h743bi to your chip name, if necessary.
|
||||
embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = ["defmt", "stm32h743bi", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] }
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../embassy-embedded-hal" }
|
||||
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-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] }
|
||||
embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
|
@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0"
|
||||
[dependencies]
|
||||
embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = ["defmt", "stm32h735ig", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] }
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../embassy-embedded-hal" }
|
||||
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-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
@ -34,7 +34,7 @@ embassy-net = { version = "0.7.0", path = "../../embassy-net", features = [
|
||||
"medium-ethernet",
|
||||
] }
|
||||
embedded-io-async = { version = "0.6.1" }
|
||||
embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = [
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = [
|
||||
"defmt",
|
||||
] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
@ -8,11 +8,11 @@ license = "MIT OR Apache-2.0"
|
||||
# Change stm32h755zi-cm4 to your chip name, if necessary.
|
||||
embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = ["defmt", "stm32h755zi-cm4", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] }
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../embassy-embedded-hal" }
|
||||
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-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] }
|
||||
embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
|
@ -8,11 +8,11 @@ license = "MIT OR Apache-2.0"
|
||||
# Change stm32h743bi to your chip name, if necessary.
|
||||
embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = ["defmt", "stm32h755zi-cm7", "time-driver-tim3", "exti", "memory-x", "unstable-pac", "chrono"] }
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../embassy-embedded-hal" }
|
||||
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-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] }
|
||||
embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
|
@ -7,11 +7,11 @@ license = "MIT OR Apache-2.0"
|
||||
[dependencies]
|
||||
embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = ["defmt", "stm32h7b0vb", "time-driver-tim2", "exti", "memory-x", "unstable-pac", "chrono"] }
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
embassy-embedded-hal = { version = "0.3.0", path = "../../embassy-embedded-hal" }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../embassy-embedded-hal" }
|
||||
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-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "proto-ipv6", "dns"] }
|
||||
embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
|
@ -11,7 +11,7 @@ embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["de
|
||||
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-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "udp", "medium-ethernet", "medium-ip", "proto-ipv4"] }
|
||||
embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
|
@ -9,7 +9,7 @@ embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["de
|
||||
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-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = [ "defmt", "stm32l151cb-a", "time-driver-any", "memory-x"] }
|
||||
embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
|
@ -10,8 +10,8 @@ embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = [
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
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-embedded-hal = { version = "0.3.0", path = "../../embassy-embedded-hal" }
|
||||
embassy-usb = { version = "0.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-embedded-hal = { version = "0.3.1", path = "../../embassy-embedded-hal" }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-net-adin1110 = { version = "0.3.0", path = "../../embassy-net-adin1110" }
|
||||
embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "udp", "tcp", "dhcpv4", "medium-ethernet"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
@ -10,7 +10,7 @@ embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = [
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
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.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
usbd-hid = "0.8.1"
|
||||
|
@ -10,7 +10,7 @@ embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = [
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
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.4.0", path = "../../embassy-usb", default-features = false, features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", default-features = false, features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
|
@ -10,7 +10,7 @@ embassy-stm32 = { version = "0.2.0", path = "../../embassy-stm32", features = ["
|
||||
embassy-sync = { version = "0.7.0", path = "../../embassy-sync", features = ["defmt"] }
|
||||
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.4.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-usb = { version = "0.5.0", path = "../../embassy-usb", features = ["defmt"] }
|
||||
embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
|
||||
|
||||
defmt = "1.0.1"
|
||||
|
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