Interrupt Function, @interrupt

Mark interrupt functions with #pragma TRAP_PROC or use the interrupt keyword (refer the following listing).

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 */

}