Interrupt Function, @interrupt

Interrupt functions have to be marked with #pragma TRAP_PROC or using the interrupt keyword.

Listing: Using the TRAP_PROC pragma with an Interrupt Function


#ifdef __HIWARE__
  #pragma 
TRAP_PROC

  void MyTrapProc(void)

#else /* other compiler-vendor non-ANSI declaration of interrupt

         function */

  @interrupt void MyTrapProc(void)

#endif

{

  /* code follows here */

}