Skip to content

Commit 2de124c

Browse files
committed
Re-add feature gate for software_interrupt3
1 parent 8aa1a88 commit 2de124c

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

esp-hal-embassy/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ defmt = { version = "0.3.8", optional = true }
1717
document-features = "0.2.10"
1818
embassy-executor = { version = "0.6.0", optional = true }
1919
embassy-time-driver = { version = "0.1.0", features = [ "tick-hz-1_000_000" ] }
20-
esp-hal = { version = "0.19.0", path = "../esp-hal" }
20+
esp-hal = { version = "0.19.0", path = "../esp-hal", features = ["__esp_hal_embassy"] }
2121
log = { version = "0.4.22", optional = true }
2222
macros = { version = "0.12.0", features = ["embassy"], package = "esp-hal-procmacros", path = "../esp-hal-procmacros" }
2323
portable-atomic = "1.6.0"

esp-hal/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4444
- We should no longer generate 1GB .elf files for ESP32C2 and ESP32C3 (#1962)
4545
- Reset peripherals in driver constructors where missing (#1893, #1961)
4646
- Fixed ESP32-S2 systimer interrupts (#1979)
47+
- Software interrupt 3 is no longer available when it is required by `esp-hal-embassy`. (#2011)
4748

4849
### Removed
4950

esp-hal/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ bluetooth = []
8585

8686
usb-otg = ["esp-synopsys-usb-otg", "usb-device"]
8787

88+
__esp_hal_embassy = []
89+
8890
## Enable debug features in the HAL (used for development).
8991
debug = [
9092
"esp32?/impl-register-debug",

esp-hal/src/system.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,10 @@ impl<const NUM: u8> InterruptConfigurable for SoftwareInterrupt<NUM> {
292292
#[cfg_attr(
293293
multi_core,
294294
doc = r#"
295+
295296
Please note: Software interrupt 3 is reserved
296-
for inter-processor communication when the `embassy`
297-
feature is enabled."#
297+
for inter-processor communication when using
298+
`esp-hal-embassy`."#
298299
)]
299300
#[non_exhaustive]
300301
pub struct SoftwareInterruptControl {
@@ -304,7 +305,9 @@ pub struct SoftwareInterruptControl {
304305
pub software_interrupt1: SoftwareInterrupt<1>,
305306
/// Software interrupt 2.
306307
pub software_interrupt2: SoftwareInterrupt<2>,
307-
/// Software interrupt 3.
308+
#[cfg(not(all(feature = "__esp_hal_embassy", multi_core)))]
309+
/// Software interrupt 3. Only available when not using `esp-hal-embassy`,
310+
/// or on single-core systems.
308311
pub software_interrupt3: SoftwareInterrupt<3>,
309312
}
310313

@@ -314,6 +317,7 @@ impl SoftwareInterruptControl {
314317
software_interrupt0: SoftwareInterrupt {},
315318
software_interrupt1: SoftwareInterrupt {},
316319
software_interrupt2: SoftwareInterrupt {},
320+
#[cfg(not(all(feature = "__esp_hal_embassy", multi_core)))]
317321
software_interrupt3: SoftwareInterrupt {},
318322
}
319323
}

0 commit comments

Comments
 (0)