NPA_Interrupt_Control

Performs interrupt masking capabilities on the default (primary) system I/O bus. This API does not disable or enable interrupts.

Thread Context:Non-Blocking

Syntax

    LONG NPA_Interrupt_Control (
       LONG   npaHandle,
       LONG   irqLevel,
       LONG   flag
       );
    
    

Parameters

npaHandle
(IN) The CDM's or HAM's handle for using the NPA APIs, assigned during NPA_Register_CDM_Module or NPA_Register_HAM_Module, respectively.
irqLevel
Value indicating the interrupt level on which to take action.
flag
Value indicating the type of action to perform. This parameter can have one of the following values:

Value

Description

0x00000000

Unmask interrupt (This will unmask the irqLevel).

0x00000001

Mask interrupt (This will mask the irqLevel).

0x00000002

Check the hardware interrupt.

Return Values

If running under MP, the return value will always be nonzero and should be ignored.

Input Flag Value

Return Value

0x00000000

Zero if unmasking the interrupt was successful.

Nonzero if unmasking the interrupt was unsuccessful.

0x00000001

Zero if masking the interrupt was successful.

Nonzero if masking of the interrupt was unsuccessful.

0x00000002

Zero if the interrupt at the specified level is disabled. Nonzero if the interrupt at the specified level is enabled.

Remarks

NPA_Interrupt_Control is used to either unmask an interrupt, mask an interrupt, or check the current masking of an interrupt at the specified level on the default system I/O bus.

The action to be performed is determined by the value of the flag parameter passed into NPA_Interrupt_Control as discussed above.

Implementation of this function involves the setting or testing of bits in the hardware's interrupt mask register.

IMPORTANT:To disable all interrupts temporarily, call the OS function DisableAndRetFlags. Do not use NPA_Interrupt_Control to disable interrupts.