1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>OS_RestoreInterrupts_IrqAndFiq</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">OS_RestoreInterrupts_IrqAndFiq <img src="../../image/NTR.gif" align="middle"><img src="../../image/TWL.gif" align="middle"></h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <nitro/os.h></CODE><BR> <BR> <CODE>OSIntrMode OS_RestoreInterrupts_IrqAndFiq( OSIntrMode state );</CODE></dd> 20</dl> 21<h2>Arguments</h2> 22<TABLE border="1" width="100%"> 23 <TBODY> 24 <TR> 25<TD width="13%"><CODE>state</CODE></TD> 26<TD width="87%">Interrupt state to set.<BR><CODE>OSIntrMode</CODE> is a <CODE>u32</CODE> typedef.</TD> 27 </TR> 28 </TBODY> 29</TABLE> 30 31<h2>Return Values</h2> 32<p>Returns a value that indicates the state before this function was called.</p> 33<p>The return value type is <CODE>OSIntrMode</CODE> (a <CODE>u32</CODE> typedef), but the return value will be the logical sum of the <CODE>OSIntrMode_Irq</CODE> and <CODE>OSIntrMode_Fiq</CODE> enumerated types.<BR><BR> The <CODE>OSIntrMode_Irq</CODE> enumerated type:</p> 34<TABLE cellspacing="2"> 35 <TBODY> 36 <TR> 37<TH>Value</TH> 38<TH>Previous state</TH> 39 </TR> 40 <TR> 41<TD><CODE>OS_INTRMODE_IRQ_DISABLE</CODE></TD> 42<TD>IRQ Disable (prohibited)</TD> 43 </TR> 44 <TR> 45<TD><CODE>OS_INTRMODE_IRQ_ENABLE</CODE></TD> 46<TD>IRQ Enable (permitted)</TD> 47 </TR> 48 </TBODY> 49</TABLE> 50<p>The <CODE>OSIntrMode_Fiq</CODE> enumerated type:</P> 51<TABLE cellspacing="2"> 52 <TBODY> 53 <TR> 54<TH>Value</TH> 55<TH>Previous State</TH> 56 </TR> 57 <TR> 58<TD><CODE>OS_INTRMODE_FIQ_DISABLE</CODE></TD> 59<TD>FIQ Disable (prohibited)</TD> 60 </TR> 61 <TR> 62<TD><CODE>OS_INTRMODE_FIQ_ENABLE</CODE></TD> 63<TD>FIQ Enable (permitted)</TD> 64 </TR> 65 </TBODY> 66</TABLE> 67<H2>Description</H2> 68<P>Sets the interrupt state.</P> 69<P>It takes the interrupt state given by <CODE>state</CODE>. The state given is the logical sum of the IRQ status expressed in the <CODE>OSIntrMode_Irq</CODE> enumerated type and the FIQ status expressed in the <CODE>OSIntrMode_Fiq</CODE> enumerated type.</P> 70<P>However, it is expected that the <CODE>state</CODE> parameter will often be used primarily to restore the previous state by specifying to it the return value of the <A href="OS_EnableInterrupts_IrqAndFiq.html"><CODE>OS_EnableInterrupts_IrqAndFiq</CODE></A> or <A href="OS_DisableInterrupts_IrqAndFiq.html"><CODE>OS_DisableInterrupts_IrqAndFiq</CODE></A> function.</P> 71<P>These return values represent the states prior to calling these functions.</P> 72<P><B>Example:</B></P> 73<BLOCKQUOTE style="background-color:#ffffd0;"><CODE>OSIntrMode e = OS_DisableInterrupts_IrqAndFiq();<BR> <BR> // Interrupts are disabled here<BR> <BR> (void)OS_RestoreInterrupts_IrqAndFiq( e );</CODE></BLOCKQUOTE> 74 75<h2>Internal Operation</h2> 76<P>The CPSR register (current program status register) IRQ and FIQ interrupt control bits are set/reset.</P> 77 78<h2>See Also</h2> 79<p><A href="OS_EnableInterrupts_IrqAndFiq.html"><CODE>OS_EnableInterrupts_IrqAndFiq</CODE></A><BR> <A href="OS_DisableInterrupts_IrqAndFiq.html"><CODE>OS_DisableInterrupts_IrqAndFiq</CODE></A><BR> <A href="OS_RestoreInterrupts.html"><CODE>OS_RestoreInterrupts</CODE></A></p> 80 81<H2>Revision History</H2> 82<P> 832005/03/08 Standardized the Japanese word for "interrupt".<br /> 2004/03/04 Moved from the <CODE>OS_RestoreInterrupts</CODE> function.</P> 84<hr><p>CONFIDENTIAL</p></body> 85</html>