embassy-mcxa

Crates

git

Versions

mcx-a256

Flavors

bind_interrupts

Macro bind_interrupts 

Source
macro_rules! bind_interrupts {
    ($(#[$attr:meta])* $vis:vis struct $name:ident {
        $(
            $(#[cfg($cond_irq:meta)])?
            $irq:ident => $(
                $(#[cfg($cond_handler:meta)])?
                $handler:ty
            ),*;
        )*
    }) => { ... };
    (@inner $($t:tt)*) => { ... };
}
Expand description

Macro to bind interrupts to handlers, similar to embassy-imxrt.

Example:

  • Bind OS_EVENT to the OSTIMER time-driver handler bind_interrupts!(struct Irqs { OS_EVENT => crate::ostimer::time_driver::OsEventHandler; });