Table of Contents        Previous topic       Next topic       

C/C++ COMPILER->Interrupt Functions->ARM->Manual Coding of Interrupt Vector

The _interrupt qualifier is used to define a function as an interrupt function.  It is placed before the function name as in the following example:

void _interrupt func()
    /* Your interrupt code goes here */

This informs the compiler that there will be no scratch registers available and so all registers used will be saved.

The compiler assumes that the interrupt function is an IRQ interrupt handler and generates the appropriate exit instructions.

The __nestableinterrupt qualifier can also be used.  The compiler will then generate code to restore interrupts on entry to the function.  This keyword should only be used with IRQ and FIQ interrupt handlers.