#include <nitro/os.h>
u32 OS_GetResetParameter( void );
None.
The value of the reset parameter. This function returns 0 from the time that power is turned on until the OS_ResetSystem
function is called.
Gets the reset parameter value.
The reset parameter is the value that is provided by the parameter argument of the most recent OS_ResetSystem
function. This function returns 0 from the time that power is turned on until the OS_ResetSystem
function is called.
Example:
u32 n; NitroMain() { : n = OS_GetResetParameter(); OS_Printf( "%d\n", n ); : OS_ResetSystem( n + 1 ); }
In the above example, 0 is displayed first. Each reset after that displays 1, 2, 3, ..., and so on.
The reset parameter is held in the 4-byte region that comes after HW_RESET_PARAMETER_BUF
. 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.
The OS_ResetSystem
function can only be called with the card boot application, so this function always returns 0 if called in another startup mode.
2009/07/02 Revised Description because support was added for software reset also in TWL mode.
2009/06/08 Explained that OS_ResetSystem
is functional only in NITRO mode.
2004/09/01 Initial version.
CONFIDENTIAL