1 /*---------------------------------------------------------------------------* 2 Project: TwlSDK - OS - include 3 File: application_jump.h 4 5 Copyright 2007-2009 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:: 2009-06-04#$ 14 $Rev: 10698 $ 15 $Author: okubata_ryoma $ 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: Runs a hardware reset and jumps to the System Menu. 48 49 Arguments: None. 50 51 Returns: FALSE: Application jump failed for some reason. 52 * If the process was successful, a reset occurred during this function, so TRUE is not returned. 53 54 *---------------------------------------------------------------------------*/ 55 BOOL OS_JumpToSystemMenu( void ); 56 57 /*---------------------------------------------------------------------------* 58 Name: OS_JumpToInternetSetting 59 60 Description: Runs a hardware reset and jumps to the Internet connection settings of the TWL System Settings. 61 62 63 Arguments: None. 64 65 Returns: FALSE: Application jump failed for some reason. 66 * If the process was successful, a reset occurred during this function, so TRUE is not returned. 67 68 *---------------------------------------------------------------------------*/ 69 BOOL OS_JumpToInternetSetting(void); 70 71 /*---------------------------------------------------------------------------* 72 Name: OS_JumpToEULAViewer 73 74 Description: Runs a hardware reset and jumps to the Internet usage agreement of the TWL System Settings. 75 76 77 Arguments: None. 78 79 Returns: FALSE: Application jump failed for some reason. 80 * If the process was successful, a reset occurred during this function, so TRUE is not returned. 81 82 *---------------------------------------------------------------------------*/ 83 BOOL OS_JumpToEULAViewer(void); 84 85 /*---------------------------------------------------------------------------* 86 Name: OS_JumpToWirelessSetting 87 88 Description: Runs a hardware reset and jumps to the wireless communications of the TWL System Settings. 89 90 Arguments: None. 91 92 Returns: FALSE: Application jump failed for some reason. 93 * If the process was successful, a reset occurred during this function, so TRUE is not returned. 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: Run on NITRO, or failure in restarting. 106 * If the process was successful, a reset occurred during this function, so TRUE is not returned. 107 108 *---------------------------------------------------------------------------*/ 109 BOOL OS_RebootSystem( void ); 110 111 /*---------------------------------------------------------------------------* 112 Name: OS_IsBootFromSystemMenu 113 114 Description: Determines whether this application was started from the System Menu. 115 116 Arguments: None. 117 118 Returns: TRUE: This application was started from the System Menu. 119 FALSE: This application was started from another application. 120 *---------------------------------------------------------------------------*/ 121 BOOL OS_IsBootFromSystemMenu(void); 122 123 /*---------------------------------------------------------------------------* 124 Name: OS_IsTemporaryApplication 125 126 Description: Checks whether self is a TMP application. 127 128 Arguments: None. 129 130 Returns: TRUE: TMP application. 131 FALSE: Other than TMP applications. 132 *---------------------------------------------------------------------------*/ 133 BOOL OS_IsTemporaryApplication(void); 134 135 /*---------------------------------------------------------------------------* 136 Name: OS_IsRebooted 137 138 Description: Checks whether a restart was applied using OS_RebootSystem. 139 140 Arguments: None. 141 142 Returns: TRUE: Restart was applied more than one time. 143 FALSE: First startup. 144 *---------------------------------------------------------------------------*/ 145 BOOL OS_IsRebooted( void ); 146 147 // ---- These are internal functions, so do not use for applications 148 BOOL OS_ReturnToPrevApplication( void ); 149 BOOL OSi_CanApplicationJumpTo( OSTitleId titleID ); 150 OSTitleId OSi_GetPrevTitleId( void ); 151 BOOL OS_DoApplicationJump( OSTitleId id, OSAppJumpType jumpType ); 152 #endif 153 154 #ifdef __cplusplus 155 } // extern "C" 156 #endif 157 158 #endif // _APPLICATION_JUMP_H_ 159