[][src]Crate ruspiro_interrupt_macros

Interrupt Macros

This crate provides the custom attribute #[IrqHandler(<interrupt type>[, <source>])] to be used when implementing an interrupt handler.

Usage

use ruspiro_interrupt_macros::*;
 
#[IrqHandler(ArmTimer)]
unsafe fn my_timer_handler() {
    // implement the interrupt handling here and do not forget
    // to acknowledge the interrupt in the interrupt specific registers
}
 

In some rare cases the interrupt line is shared between specific interrupt sources. In this case the source of the interrupt need to be passed as well as an identifier.

use ruspiro_interrupt_macros::*;
 
#[IrqHandler(Aux, Uart1)]
unsafe fn my_aux_uart1_handler() {
    // handle Uart1 interrupt here - this usually has no "acknowledge" register...
}
 

Attribute Macros

IrqHandler