Skip to content

P4: apply sw_interrupts patch#435

Merged
bugadani merged 2 commits intomainfrom
p4-swint
May 5, 2026
Merged

P4: apply sw_interrupts patch#435
bugadani merged 2 commits intomainfrom
p4-swint

Conversation

@bugadani
Copy link
Copy Markdown
Contributor

@bugadani bugadani commented May 4, 2026

@bugadani bugadani marked this pull request as ready for review May 5, 2026 09:45
Copilot AI review requested due to automatic review settings May 5, 2026 09:45
@bugadani bugadani added this pull request to the merge queue May 5, 2026
Merged via the queue into main with commit d070f37 May 5, 2026
28 checks passed
@bugadani bugadani deleted the p4-swint branch May 5, 2026 09:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the ESP32-P4 PAC generation to apply the shared sw_interrupts SVD patch, which consolidates the software-interrupt registers into an array-based form and regenerates the affected register code.

Changes:

  • Apply common_patches/sw_interrupts.yaml to the HP_SYS peripheral SVD patch.
  • Regenerate HP_SYS software-interrupt registers from CPU_INTR_FROM_CPU_{0..3} into CPU_INTR_FROM_CPU[n] plus iterator accessors.
  • Update generated crate docs/header (svd2rust version metadata) and remove the crate-level Peripherals singleton API.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
esp32p4/svd/patches/esp32p4.yaml Includes the shared sw_interrupts patch under HP_SYS.
esp32p4/src/lib.rs Updates svd2rust doc metadata and drops the Peripherals singleton block.
esp32p4/src/hp_sys.rs Refactors CPU_INTR_FROM_CPU_{0..3} into an array register with indexed + iterator accessors and updates module/type exports accordingly.
esp32p4/src/hp_sys/cpu_intr_from_cpu.rs Adds the new array-element register definition module for CPU_INTR_FROM_CPU%s.
esp32p4/src/hp_sys/cpu_intr_from_cpu_0.rs Removes old per-register module.
esp32p4/src/hp_sys/cpu_intr_from_cpu_1.rs Removes old per-register module.
esp32p4/src/hp_sys/cpu_intr_from_cpu_2.rs Removes old per-register module.
esp32p4/src/hp_sys/cpu_intr_from_cpu_3.rs Removes old per-register module.
Comments suppressed due to low confidence (1)

esp32p4/src/lib.rs:1163

  • Peripherals singleton (and the take()/steal() API) has been removed from the crate root. This is a public API breaking change compared to the previous generated PAC and may also remove the only safe/idiomatic way to obtain peripheral instances (leaving only unsafe Periph::steal()). If this wasn’t intentional, adjust the svd2rust generation/settings to keep Peripherals; if it is intentional, please ensure the crate’s versioning/changelog reflects the breaking API change.
    }
}
#[doc = "USB_WRAP Peripheral"]
pub mod usb_wrap;


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +5 to +10
#[doc = "Field `CPU_INTR` reader - set 1 will triger a interrupt"]
pub type CPU_INTR_R = crate::BitReader;
#[doc = "Field `CPU_INTR` writer - set 1 will triger a interrupt"]
pub type CPU_INTR_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[doc = "Bit 0 - set 1 will triger a interrupt"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants