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</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">OS_RestoreInterrupts <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> 20 <BR> 21 <CODE>OSIntrMode OS_RestoreInterrupts( OSIntrMode state );</CODE></dd> 22</dl> 23<h2>Arguments</h2> 24<TABLE border="1" width="100%"> 25 <TBODY> 26 <TR> 27 <TD width="13%"><EM><STRONG>state</STRONG></EM></TD> 28 <TD width="87%">Interrupt state to set.<BR> 29 <CODE>OSIntrMode</CODE> is a <CODE>u32</CODE> typedef.</TD> 30 </TR> 31 </TBODY> 32</TABLE> 33 34<h2>Return Values</h2> 35<p>Returns a value that indicates the state before this function was called.</p> 36<p>The type of the return value is <CODE>OSIntrMode</CODE> (a <CODE>u32</CODE> typedef), but the values that can be returned will be one of the <CODE>OSIntrMode_Irq</CODE> enumerated type values below.<BR> 37</p> 38<TABLE cellspacing="2"> 39 <TBODY> 40 <TR> 41 <TH>Value</TH> 42 <TH>Previous state</TH> 43 </TR> 44 <TR> 45 <TD>OS_INTRMODE_IRQ_DISABLE</TD> 46 <TD>IRQ Disable (prohibited)</TD> 47 </TR> 48 <TR> 49 <TD>OS_INTRMODE_IRQ_ENABLE</TD> 50 <TD>IRQ Enable (permitted)</TD> 51 </TR> 52 </TBODY> 53</TABLE> 54<H2>Description</H2> 55<P>This function sets the interrupt state.</P> 56<P>It takes the interrupt state given by <B><I>state</I></B>. The state given is expressed as an <CODE>OSIntrMode_Irq</CODE> enumerated type. If <CODE>OS_INTRMODE_IRQ_ENABLE</CODE> is specified, the interrupts will be enabled, and if <CODE>OS_INTRMODE_IRQ_DISABLE</CODE> is specified, the interrupts will be disabled.</P> 57<P>However, it is expected that the <B><I>state</I></B> parameter will often be used primarily to restore the previous state by specifying to it the return value of the <CODE><A href="OS_EnableInterrupts.html">OS_EnableInterrupts</A></CODE> or <CODE><A href="OS_DisableInterrupts.html">OS_DisableInterrupts</A></CODE> function.</P> 58<P>The return value indicates the state prior to calling the function.</P> 59<P><BR> <B>Example</B></P> 60<BLOCKQUOTE style="background-color:#ffffd0;"><CODE>OSIntrMode e = OS_DisableInterrupts();<BR> <BR> // Interrupts are disabled here<BR> <BR> (void)OS_RestoreInterrupts( e );</CODE></BLOCKQUOTE> 61<h2>Internal Operation</h2> 62<P>Sets/resets the CPSR (current program status register) IRQ interrupt control bit.</P> 63 64<h2>See Also</h2> 65<p><CODE><A href="OS_EnableInterrupts.html">OS_EnableInterrupts</A>, <A href="OS_DisableInterrupts.html">OS_DisableInterrupts</A><br></CODE></p> 66 67<H2>Revision History</H2> 68<P> 692005/03/08 Standardized the Japanese term for "interrupt."<BR>2004/03/04 Changed so FIQ is not included in processing.<BR>2004/01/14 Changed so FIQ is included in processing.<BR>2003/12/01 Initial version.</P> 70<hr><p>CONFIDENTIAL</p></body> 71</html> 72