#pragma TRAP_PROC: Mark function as interrupt function

Scope

Function Definition

Syntax

#pragma TRAP_PROC

Arguments

See Backend

Default

None

Description

This pragma marks a function to be an interrupt function. Because interrupt functions may need some special entry and exit code, this pragma has to be used for interrupt functions.

Do not use this pragma for declarations (e.g., in header files) because the pragma is valid for the next definition.

See the RS08 Backend chapter for details.

Example

The following listing marks the MyInterrupt() function as an interrupt function.

Listing: Using the TRAP_PROC pragma to mark an interrupt function


#pragma TRAP_PROC 
void MyInterrupt(void) { 
 ... 
} 
See also

interrupt keyword