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 <nitro/os.h></CODE><BR> 15 16 <BR> 17 18 <CODE>u32 OS_GetResetParameter( void );</CODE> 19</DL> 20<H2>Arguments</H2> 21<P>None.</P> 22<H2>Return Values</H2> 23<P>The value of the reset parameter. This function returns 0 from the time that power is turned on until the <A href="OS_ResetSystem.html"><CODE>OS_ResetSystem</CODE></A> function is called.</P> 24<H2>Description</H2> 25<P>Gets the reset parameter value.</P> 26<P>The reset parameter is the value that is provided by the parameter argument of the most recent <A href="OS_ResetSystem.html"><code>OS_ResetSystem</code></A> function. This function returns 0 from the time that power is turned on until the <CODE>OS_ResetSystem</CODE> function is called.</P> 27<P><B>Example:</B></P> 28 29<BLOCKQUOTE style="background-color:#ffffd0;"> 30<BLOCKQUOTE><PRE>u32 n; 31NitroMain() 32{ 33 : 34 n = <FONT color="#ff0000">OS_GetResetParameter();</FONT> 35 OS_Printf( "%d\n", n ); 36 : 37 <FONT color="#ff0000">OS_ResetSystem( n + 1 );</FONT> 38}</PRE></BLOCKQUOTE> 39</BLOCKQUOTE> 40 41<P>In the above example, 0 is displayed first. Each reset after that displays 1, 2, 3, ..., and so on.</P> 42<H2>Internal Operation</H2> 43<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 loaded in the system shared region and is not cleared by a reset. This function reads and returns the value in this region.<br />The <A href="OS_ResetSystem.html"><CODE>OS_ResetSystem</CODE></A> function can only be called with the card boot application, so this function always returns 0 if called in another startup mode. 44</P> 45<H2>See Also</H2> 46<P><A href="OS_InitReset.html"><code>OS_InitReset</code></A><BR> 47 <A href="OS_ResetSystem.html"><code>OS_ResetSystem</code></A></P> 48<H2>Revision History</H2> 49<P> 502009/07/02 Revised <B>Description</B> because support was added for software reset also in TWL mode.<br />2009/06/08 Explained that <CODE>OS_ResetSystem</CODE> is functional only in NITRO mode.<BR> 512004/09/01 Initial version.</P> 52<hr><p>CONFIDENTIAL</p></body> 53</HTML>