Conversation
There was a problem hiding this comment.
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.yamlto theHP_SYSperipheral SVD patch. - Regenerate
HP_SYSsoftware-interrupt registers fromCPU_INTR_FROM_CPU_{0..3}intoCPU_INTR_FROM_CPU[n]plus iterator accessors. - Update generated crate docs/header (svd2rust version metadata) and remove the crate-level
Peripheralssingleton 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
Peripheralssingleton (and thetake()/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 onlyunsafe Periph::steal()). If this wasn’t intentional, adjust the svd2rust generation/settings to keepPeripherals; 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"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion PR