1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - OS - include
3   File:     application_jump.h
4 
5   Copyright 2007-2008 Nintendo. All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law. They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Date:: 2008-12-08#$
14   $Rev: 9571 $
15   $Author: okajima_manabu $
16  *---------------------------------------------------------------------------*/
17 
18 #ifndef _APPLICATION_JUMP_H_
19 #define _APPLICATION_JUMP_H_
20 
21 #include <twl.h>
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 
28 // Define data-------------------------------------------
29 
30 #define OS_MCU_RESET_VALUE_BUF_HOTBT_MASK		0x00000001
31 #define OS_MCU_RESET_VALUE_OFS					0
32 
33 typedef enum OSAppJumpType{
34     OS_APP_JUMP_NORMAL = 0,
35     OS_APP_JUMP_TMP = 1
36 }OSAppJumpType;
37 
38 // TMP application path
39 #define OS_TMP_APP_PATH			"nand:/<tmpjump>"
40 
41 
42 // Function's prototype------------------------------------
43 #ifdef SDK_ARM9
44 /*---------------------------------------------------------------------------*
45   Name:         OS_JumpToSystemMenu
46 
47   Description:  Resets the hardware and jumps to the System Menu.
48 
49   Arguments:    None.
50 
51   Returns:      FALSE: The application jump failed for some reason
52                 NOTE: TRUE will not be returned when processing is successful because a reset will occur within this function.
53 
54  *---------------------------------------------------------------------------*/
55 BOOL OS_JumpToSystemMenu( void );
56 
57 /*---------------------------------------------------------------------------*
58   Name:         OS_JumpToInternetSetting
59 
60   Description:  Resets the hardware and jumps to the Connection Settings screen (under Internet) in the TWL System Settings.
61 
62 
63   Arguments:    None.
64 
65   Returns:      FALSE: The application jump failed for some reason
66                 NOTE: TRUE will not be returned when processing is successful because a reset will occur within this function.
67 
68  *---------------------------------------------------------------------------*/
69 BOOL OS_JumpToInternetSetting(void);
70 
71 /*---------------------------------------------------------------------------*
72   Name:         OS_JumpToEULAViewer
73 
74   Description:  Resets the hardware and jumps to the User Agreement screen (under Internet) in the TWL System Settings.
75 
76 
77   Arguments:    None.
78 
79   Returns:      FALSE: The application jump failed for some reason
80                 NOTE: TRUE will not be returned when processing is successful because a reset will occur within this function.
81 
82  *---------------------------------------------------------------------------*/
83 BOOL OS_JumpToEULAViewer(void);
84 
85 /*---------------------------------------------------------------------------*
86   Name:         OS_JumpToWirelessSetting
87 
88   Description:  Resets the hardware and jumps to the Wireless Communications screen in the TWL System Settings.
89 
90   Arguments:    None.
91 
92   Returns:      FALSE: The application jump failed for some reason
93                 NOTE: TRUE will not be returned when processing is successful because a reset will occur within this function.
94 
95  *---------------------------------------------------------------------------*/
96 BOOL OS_JumpToWirelessSetting(void);
97 
98 /*---------------------------------------------------------------------------*
99   Name:         OS_RebootSystem
100 
101   Description:  Resets the hardware and starts this program.
102 
103   Arguments:    None.
104 
105   Returns:      FALSE: This was run on a NITRO system or the reboot failed
106                 NOTE: TRUE will not be returned when processing is successful because a reset will occur within this function.
107 
108  *---------------------------------------------------------------------------*/
109 BOOL OS_RebootSystem( void );
110 
111 /*---------------------------------------------------------------------------*
112   Name:         OS_IsTemporaryApplication
113 
114   Description:  Checks whether this program is a TMP application.
115 
116   Arguments:    None.
117 
118   Returns:      TRUE: TMP application
119                 FALSE: Non-TMP application
120  *---------------------------------------------------------------------------*/
121 BOOL OS_IsTemporaryApplication(void);
122 
123 /*---------------------------------------------------------------------------*
124   Name:         OS_IsRebooted
125 
126   Description:  Checks whether OS_RebootSystem performed a reboot.
127 
128   Arguments:    None.
129 
130   Returns:      TRUE: Rebooted at least once
131                 FALSE: Initial boot
132  *---------------------------------------------------------------------------*/
133 BOOL OS_IsRebooted( void );
134 
135 // ---- These are internal functions, so don't use for applications
136 BOOL OS_ReturnToPrevApplication( void );
137 BOOL OSi_CanApplicationJumpTo( OSTitleId titleID );
138 BOOL OS_DoApplicationJump( OSTitleId id, OSAppJumpType jumpType );
139 #endif
140 
141 #ifdef __cplusplus
142 }       // extern "C"
143 #endif
144 
145 #endif  // _APPLICATION_JUMP_H_
146