Skip to content

Commit

Permalink
Re-add feature gate for software_interrupt3
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Aug 27, 2024
1 parent 8aa1a88 commit 272dfc4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
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
9 changes: 6 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 Down

0 comments on commit 272dfc4

Please sign in to comment.