1 /*---------------------------------------------------------------------------* 2 Project: OS Reset API 3 File: OSReset.h 4 5 Copyright (C) 2001-2012 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 *---------------------------------------------------------------------------*/ 14 15 #ifndef __OSRESET_H__ 16 #define __OSRESET_H__ 17 18 #include <types.h> 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 // Event types for __OSShutdownDevices() 25 #define OS_SD_FATALERR 0 26 #define OS_SD_REBOOT 1 27 #define OS_SD_SHUTDOWN 2 28 #define OS_SD_IDLE 3 29 #define OS_SD_RESTART 4 30 #define OS_SD_RETURNTOMENU 5 31 #define OS_SD_EXEC 6 32 #define OS_SD_LAUNCH 7 33 34 // Events for OSGetShutdownReason() 35 #define OS_SHUTDOWN_NO_SHUTDOWN 0 36 #define OS_SHUTDOWN_POWER_OFF 1 37 #define OS_SHUTDOWN_RESTART 2 38 #define OS_SHUTDOWN_STANDBY 3 39 40 // Bit field flags for OSGetShutdownFlags() 41 #define OS_SHUTDOWN_FLAG_NO_FLAGS 0x00000000 42 #define OS_SHUTDOWN_FLAG_APD_REQUEST 0x00000001 43 44 u32 OSGetShutdownReason(void); 45 u32 OSGetShutdownFlags(void); 46 47 void OSBlockThreadsOnExit(void); 48 BOOL OSIsBlockThreadsOnExit(void); 49 void OSRunThreadsOnExit(void); 50 51 #ifdef __cplusplus 52 } 53 #endif 54 55 #endif // __OSRESET_H__ 56