Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add feature gate for software_interrupt3 #2011

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion esp-hal-embassy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defmt = { version = "0.3.8", optional = true }
document-features = "0.2.10"
embassy-executor = { version = "0.6.0", optional = true }
embassy-time-driver = { version = "0.1.0", features = [ "tick-hz-1_000_000" ] }
esp-hal = { version = "0.19.0", path = "../esp-hal" }
esp-hal = { version = "0.19.0", path = "../esp-hal", features = ["__esp_hal_embassy"] }
log = { version = "0.4.22", optional = true }
macros = { version = "0.12.0", features = ["embassy"], package = "esp-hal-procmacros", path = "../esp-hal-procmacros" }
portable-atomic = "1.6.0"
Expand Down
1 change: 1 addition & 0 deletions esp-hal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- We should no longer generate 1GB .elf files for ESP32C2 and ESP32C3 (#1962)
- Reset peripherals in driver constructors where missing (#1893, #1961)
- Fixed ESP32-S2 systimer interrupts (#1979)
- Software interrupt 3 is no longer available when it is required by `esp-hal-embassy`. (#2011)

### Removed

Expand Down
2 changes: 2 additions & 0 deletions esp-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ bluetooth = []

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

__esp_hal_embassy = []

## Enable debug features in the HAL (used for development).
debug = [
"esp32?/impl-register-debug",
Expand Down
10 changes: 7 additions & 3 deletions esp-hal/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,10 @@ impl<const NUM: u8> InterruptConfigurable for SoftwareInterrupt<NUM> {
#[cfg_attr(
multi_core,
doc = r#"

Please note: Software interrupt 3 is reserved
for inter-processor communication when the `embassy`
feature is enabled."#
for inter-processor communication when using
`esp-hal-embassy`."#
)]
#[non_exhaustive]
pub struct SoftwareInterruptControl {
Expand All @@ -304,7 +305,9 @@ pub struct SoftwareInterruptControl {
pub software_interrupt1: SoftwareInterrupt<1>,
/// Software interrupt 2.
pub software_interrupt2: SoftwareInterrupt<2>,
/// Software interrupt 3.
#[cfg(not(all(feature = "__esp_hal_embassy", multi_core)))]
/// Software interrupt 3. Only available when not using `esp-hal-embassy`,
/// or on single-core systems.
pub software_interrupt3: SoftwareInterrupt<3>,
}

Expand All @@ -314,6 +317,7 @@ impl SoftwareInterruptControl {
software_interrupt0: SoftwareInterrupt {},
software_interrupt1: SoftwareInterrupt {},
software_interrupt2: SoftwareInterrupt {},
#[cfg(not(all(feature = "__esp_hal_embassy", multi_core)))]
software_interrupt3: SoftwareInterrupt {},
}
}
Expand Down