Interrupt Handler Pragmas; Pragma Interrupt; Pragma Altregisters - Analog Devices VISUALDSP++ 3.5 Manual

C/c++ compiler and library for adsp-219x processors
Hide thumbs Also See for VISUALDSP++ 3.5:
Table of Contents

Advertisement

C/C++ Compiler Language Extensions
The following example shows how to use
#pragma pad(4)
struct {
int i;
int j;
} s = {1,2};
#pragma pad()

Interrupt Handler Pragmas

The interrupt pragma s include

#pragma interrupt

The
interrupt
nition. It applies to the function declaration or definition that
immediately follows the pragma. Use of this pragma causes the compiler
to generate the function code so that it may be used as a self dispatching
interrupt handler.
The compiler arranges for the function to save its context above and
beyond the usual caller-preserved set of registers, and to restore the con-
text upon exit. The function will return using a return from interrupt
(RTI) instruction.
#pragma interrupt
void field_SIG()
{
/* ISR code */
}

#pragma altregisters

The
altregisters
pragma to indicate that the compiler can optimize the saving and restoring
of registers through use of the secondary register sets. Note the use of the
altregisters
1-122
interrupt
pragma may be used before a function declaration or defi-
pragma may be used in conjunction to the
pragma is not safe when nested interrupts are enabled.
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
.
#pragma pad()
and
altregisters
for ADSP-219x DSPs
pragmas.
interrupt

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?

Questions and answers

Related Products for Analog Devices VISUALDSP++ 3.5

Table of Contents