5.4.2 Control of Interrupt Controller

These functions control the interrupt controller.

Generally they do not perform any operation with respect to the CPU interrupt flag.


	typedef	UINT	INTVEC;	/* interrupt vector */

The specific details of the interrupt vectors (INTVEC) are implementation-dependent. Preferably, however, they should be the same numbers as the interrupt definition numbers specified with tk_def_int, or should allow for simple conversion to and from those numbers.

  • UINT DINTNO

Converts an interrupt vector to the corresponding interrupt definition number.

  • void EnableInt( INTVEC intvec )
  • void EnableInt( INTVEC intvec, INT level )

Enables the interrupt specified in intvec.

In a system that allows interrupt priority level to be specified, the level parameter can be used to specify the interrupt priority level. The precise meaning of level is implementation-dependent. Both methods with and without level must be provided.

  • void DisableInt( INTVEC intvec )

Disables the interrupt specified in intvec.

Generally, interrupts raised while interrupts are disabled are made pending, and are raised after interrupts are enabled by EnableInt(). ClearInt() must be used if it is desired to clear interrupts occurring in interrupts disabled state.

  • void ClearInt( INTVEC intvec )

Clears any interrupts raised for intvec.

  • void EndOfInt( INTVEC intvec )

Issues EOI (End Of Interrupt) to the interrupt controller intvec must be an interrupt for which EOI can be issued. Generally this must be executed at the end of an interrupt handler.

  • BOOL CheckInt( INTVEC intvec )

Checks whether interrupt intvec has been raised.

If interrupt intvec has been raised, it returns TRUE (value other than 0), else FALSE.

Comments