embassy-mcxa

Crates

git

Versions

mcx-a256

Flavors

Module interrupt

Module interrupt 

Source
Expand description

Minimal interrupt helpers mirroring embassy-imxrt style for OS_EVENT and LPUART2. Type-level interrupt traits and bindings are provided by the embassy_hal_internal::interrupt_mod! macro via the generated module below.

Modules§

typelevel
Type-level interrupt infrastructure.

Structs§

Adc
DefaultHandlerSnapshot
Gpio0
Gpio1
Gpio2
Gpio3
Gpio4
Lpuart2
LPUART2 interrupt helper with methods similar to embassy-imxrt’s InterruptExt.
OsEvent
OS_EVENT interrupt helper with methods similar to embassy-imxrt’s InterruptExt.
Rtc

Enums§

Priority
The interrupt priority level.

Constants§

ADC1
GPIO0
GPIO1
GPIO2
GPIO3
GPIO4
LPUART2
OS_EVENT
RTC

Traits§

InterruptExt
Trait for configuring and controlling interrupts.

Functions§

DefaultHandler
Provide a conservative default IRQ handler that avoids wedging the system. It clears all NVIC pending bits and returns, so spurious or reserved IRQs don’t trap the core in an infinite WFI loop during bring-up.
clear_default_handler_snapshot
default_handler_snapshot
install_irq_handler
Install an interrupt handler into the current VTOR-based vector table. This writes the function pointer at index 16 + irq number. Safety: Caller must ensure VTOR points at a writable RAM table and that handler has the correct ABI and lifetime.
os_event_install_handler_raw
Install OS_EVENT handler by raw address. Useful to avoid fn pointer type mismatches. Safety: Caller must ensure the address is a valid extern "C" fn() handler.
vtor_set_ram_vector_base
Set VTOR (Vector Table Offset) to a RAM-based vector table. Pass a pointer to the first word in the RAM table (stack pointer slot 0). Safety: Caller must ensure the RAM table is valid and aligned as required by the core.