pub struct ChipMap { /* private fields */ }Expand description
A single core’s peripheral and interrupt map.
Implementations§
Source§impl ChipMap
impl ChipMap
Sourcepub fn peripheral(&self, name: &str) -> Option<&PeripheralEntry>
pub fn peripheral(&self, name: &str) -> Option<&PeripheralEntry>
Look up a peripheral instance by name (case-insensitive).
Sourcepub fn contains_peripheral(&self, name: &str) -> bool
pub fn contains_peripheral(&self, name: &str) -> bool
Whether this core can reach the named peripheral instance.
Sourcepub fn peripheral_names(&self) -> Vec<String>
pub fn peripheral_names(&self) -> Vec<String>
Every peripheral instance name this core can reach, as the dump spells them. Order is unspecified; callers that emit code must sort.
Sourcepub fn irq(&self, name: &str) -> Option<&IrqEntry>
pub fn irq(&self, name: &str) -> Option<&IrqEntry>
Look up an interrupt by name (case-insensitive).
Sourcepub fn irq_by_number(&self, number: u16) -> Option<&IrqEntry>
pub fn irq_by_number(&self, number: u16) -> Option<&IrqEntry>
Look up an interrupt by its external interrupt number.
The hardware doorbell database records only the raw NVIC position for a party, so this is how code generation recovers the line’s canonical name. Numbers are unique within a dump; if one ever repeats, the entry with the lowest name wins so the result stays deterministic.
Sourcepub fn has_pac_interrupts(&self) -> bool
pub fn has_pac_interrupts(&self) -> bool
Whether the chip PAC’s Interrupt enum is generated from this core’s
dump, and therefore whether generated code may name a line as
Interrupt::<name> instead of by number.
A PAC ships one interrupt table per chip (see
scripts/pac/gen_interrupts.py), taken from the primary controller core.
On a secondary core such as STM32MP2’s CM0+, a shared line name like
IPCC2_RX exists in both tables under different numbers, so spelling
the variant there would enable the wrong vector.