1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>OS_GetResetParameter</TITLE>
8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">OS_GetResetParameter <img src="../../image/TWL.gif" align="middle"><img src="../../image/NTR.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD><CODE>#include &lt;nitro/os.h&gt;</CODE><BR>
15  <BR>
16  <CODE>u32 OS_GetResetParameter( void );</CODE>
17</DL>
18<H2>Arguments</H2>
19<P>None.</P>
20<H2>Return Values</H2>
21<P>The value of the reset parameter. This function returns 0 from the time that power is turned on until the <CODE>OS_ResetSystem</CODE> function is called.</P>
22<H2>Description</H2>
23<P>Obtains the reset parameter value.</P>
24<P>The reset parameter is the value that is provided by the parameter argument of the most recent <CODE><A href="OS_ResetSystem.html"><code>OS_ResetSystem</code></A></CODE> function. This function returns 0 from the time that power is turned on until the <CODE>OS_ResetSystem</CODE> function is called.</P>
25<P><BR>
26<B>Example</B></P>
27<BLOCKQUOTE style="background-color:#ffffd0;">
28<BLOCKQUOTE><PRE>u32 n;
29NitroMain()
30{
31	:
32  n = <FONT color="#ff0000">OS_GetResetParameter();</FONT>
33  OS_Printf( &quot;%d\n&quot;, n );
34	:
35  <FONT color="#ff0000">OS_ResetSystem( n + 1 );</FONT>
36}</PRE></BLOCKQUOTE>
37</BLOCKQUOTE>
38<P>In the above example, 0 will be displayed first. Each reset after that will display 1, 2, 3 .... and so on.</P>
39<H2>Internal Operation</H2>
40<P>The reset parameter is held in the 4-byte region that comes after <CODE>HW_RESET_PARAMETER_BUF</CODE>. The 4-byte region is placed in the system shared region and is not cleared by a reset. This function reads and returns the value in this region.</P>
41<H2>See Also</H2>
42<P><A href="OS_InitReset.html"><code>OS_InitReset</code></A>, <A href="OS_ResetSystem.html"><code>OS_ResetSystem</code></A></P>
43<H2>Revision History</H2>
44<P>2004/09/01 Initial version.</P>
45<hr><p>CONFIDENTIAL</p></body>
46</HTML>