The functions contained in this category are mainly used to handle the CPSR (Current Program Status Register) and state inside the co-processor 15 (CP15).
Bits for enabling and disabling the FIQ interrupts and the IRQ interrupts exist inside the CPSR.

If the I bit has been set, the IRQ interrupt is disabled. If the F bit has been set, the FIQ interrupt is disabled.
OS_EnableInterrupts() clears the I bit. In other words, it enables IRQ interrupts.
OS_DisableInterrupts() sets the I bit. In other words, it disables IRQ interrupts.
OS_RestoreInterrupts() sets the I bit to a designated state. In other words, it restores the IRQ interrupts to a designated state.
These functions return states before any changes were made, so after performing any sort of processing by changing the state with OS_EnableInterrupts() or OS_DisableInterrupts(), it it possible to go back to the original state with OS_RestoreInterrupts(). Actually, as in the following example, changes to an interrupt state and its recovery are normally used as a pair.
OSIntrMode enabled = OS_EnableInterrupts();
:
(void)OS_RestoreInterrupts( enabled );Since FIQ interrupts are used with IS-NITRO-DEBUGGER, the application cannot normally use them. Also, applications have no need to use them.
Similar to the IRQ interrupt functions, there are functions for configuring both the IRQ interrupts and the FIQ interrupts at the same time.
OS_EnableInterrupts_IrqAndFiq()I and F bits. In other words, it enables IRQ interrupts and FIQ interrupts.
OS_DisableInterrupts_IrqAndFiq()I and F bits. In other words, it disables IRQ interrupts and FIQ interrupts.
OS_RestoreInterrupts()_IrqAndFiq()I and F bits to designated states. In other words, it restores the IRQ interrupts and FIQ interrupts to designated states.
The function groups related to these IRQ interrupts and FIQ interrupts use OS_RestoreInterrupts_IrqAndFiq()
Use OS_GetCpsrIrq()
Use OS_GetProcMode()
OS_Terminate()OS_Halt()
The CPU can be halted and its resources conserved when it has nothing to do. It can receive interrupts and recover even if it is in this halt state. The function for halting is OS_Halt()
It is not necessary for the application side to be aware of this, but the ARM9 processor goes into the halt state with the CP15 function, while the ARM7 side uses a system call.
OS_SpinWait() performs a designated wait operation with the loop from the CPU. However, since the CPU only loops, when an interrupt occurs it may not take longer than the designated time to return from the function. Interpret this as the "lower-limit wait time" for the designated time.
An Overview of OS Functions (System State)
11/09/2004 Initial version