#pragma TRAP_PROC: Mark Function as Interrupt Function

Scope

Function Definition

Syntax
  #pragma TRAP_PROC   
Arguments

See HC(S)08 Backend.

Default

None

Description

This pragma marks a function as an interrupt function. Because interrupt functions may need some special entry and exit code, you must use this pragma to mark interrupt functions.

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

See HC(S)08 Backend 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