#include <nitro/os.h>OSIrqMask OS_SetIrqMask( OSIrqMask intr );Sets the IRQ interrupt cause
When the IRQ interrupt master enable is enabled with OS_EnableIrq, only IRQ interrupts corresponding to those enabled with this function will occur.
The intr argument is displayed as the logical OR of the following causes:
OS_IE_V_BLANK |
V-Blank interrupt |
OS_IE_H_BLANK |
H-Blank interrupt |
OS_IE_V_COUNT |
V-Counter interrupt |
OS_IE_TIMER0 |
Timer 0 interrupt |
OS_IE_TIMER1 |
Timer 1 interrupt |
OS_IE_TIMER2 |
Timer 2 interrupt |
OS_IE_TIMER3 |
Timer 3 interrupt |
OS_IE_DMA0 |
DMA0 interrupt |
OS_IE_DMA1 |
DMA1 interrupt |
OS_IE_DMA2 |
DMA2 interrupt |
OS_IE_DMA3 |
DMA3 interrupt |
OS_IE_KEY |
Key interrupt |
OS_IE_CARtrIDGE |
Game Pak IREQ/DREQ interrupt |
OS_IE_SUBP |
ARM7 interrupt |
OS_IE_SPFIFO_SEND |
Send FIFO empty interrupt between the ARM9 and ARM7 |
OS_IE_SPFIFO_RECV |
Receive FIFO not empty interrupt between the ARM9 and ARM7 |
OS_IE_CARD_DATA |
Card data transmission complete interrupt |
OS_IE_CARD_IREQ |
Card IREQ interrupt |
OS_IE_GXFIFO |
Geometry command FIFO interrupt |
Example:
// If there is a V-Blank interrupt, enable the DMA0 interrupt. OS_SetIrqMask( OS_IE_V_BLANK | OS_IE_DMA0 ); // IRQ master enable OS_EnableIrq();
Note: OS_SetIrqMask() is a function that overwrites and sets IRQ interrupt causes, and not a function to add specified causes. Since some interrupt causes are set by system, do not overwrite settings needlessly. For example, because tick and alarm use a timer interrupt, IRQ interrupt cause for the applicable timer must be enabled. Use OS_EnableIrqMask() when adding IRQ interrupts to the previous settings.
Operates one IO register, the IE (Interrupt Enable) register.
intr |
The IRQ interrupt cause to be set. |
The setting of the IRQ interrupt cause before this function is called.
OS_GetIrqMask, OS_EnableIrqMask, OS_DisableIrqMask
11/24/2004 Deleted OS_IE_SIO
09/01/2004 Changed "subprocessor" to "ARM7" and "between subprocessors" to "between ARM9 and ARM7."
03/12/2004 Emphasized the difference from OS_EnableIrqMask
12/01/2003 Initial version