OS_SetIrqMask

Syntax

#include <nitro/os.h>

OSIrqMask OS_SetIrqMask( OSIrqMask intr );

Arguments

intr The IRQ interrupt cause(s) to set.

Return Values

Returns the IRQ interrupt cause parameters from before this function was called. See below for information about causes. The return value is the logical sum of the causes that were formerly set.

Types of Interrupts

Description

Sets the IRQ interrupt causes.

When the IRQ interrupt master enable is enabled with OS_EnableIrq, only IRQ interrupts corresponding to those enabled with this function will occur. The types of interrupts vary based on both the operating mode (NITRO mode vs TWL mode) and the processor (ARM9 vs ARM7).


Types of Interrupts

Specify the interrupt cause(s) to set using the intr argument. See below for information on the types of interrupts.

Types of Interrupts


Example

// Enable both V-Blank and DMA0 interrupts.
OS_SetIrqMask( OS_IE_V_BLANK | OS_IE_DMA0 );

// IRQ master enable
OS_EnableIrq();


Note

OS_SetIrqMask is a function that overwrites the IRQ interrupt cause parameters with the specified setting. It is not a function that adds the specified causes. Since some interrupt causes are set by system, do not overwrite settings needlessly. For example, because the tick and alarm features use timer interrupts, the IRQ interrupt cause for the applicable timer must always be enabled.

Use OS_EnableIrqMask when adding IRQ interrupts to the previous settings.

Internal Operation

Operates on one of the I/O registers, IE (Interrupt Enable).

See Also

OS_GetIrqMask, OS_EnableIrqMask, OS_DisableIrqMask
Types of Interrupts

Revision History

2008/05/30 Moved the types of interrupts to a separate page.
2005/03/08 Standardized the Japanese term for "interrupt."
2004/12/08 Added warning about OS_IE_KEY.
2004/11/24 Deleted OS_IE_SIO.
2004/09/01 Changed "subprocessor" to "ARM7" and "between subprocessors" to "between the ARM7 and ARM9."
2004/03/12 Emphasized differences from OS_EnableIrqMask().
2003/12/01 Initial version.


CONFIDENTIAL