Reverted GX FIFO breakage.
[libogc.git] / gc / ogc / stm.h
blob5d2307f4c58ffc083c01785514e64b22b026113c
1 /*-------------------------------------------------------------
3 stm.h - System and miscellaneous hardware control functions
5 Copyright (C) 2008
6 Michael Wiedenbauer (shagkur)
7 Dave Murphy (WinterMute)
8 Hector Martin (marcan)
10 This software is provided 'as-is', without any express or implied
11 warranty. In no event will the authors be held liable for any
12 damages arising from the use of this software.
14 Permission is granted to anyone to use this software for any
15 purpose, including commercial applications, and to alter it and
16 redistribute it freely, subject to the following restrictions:
18 1. The origin of this software must not be misrepresented; you
19 must not claim that you wrote the original software. If you use
20 this software in a product, an acknowledgment in the product
21 documentation would be appreciated but is not required.
23 2. Altered source versions must be plainly marked as such, and
24 must not be misrepresented as being the original software.
26 3. This notice may not be removed or altered from any source
27 distribution.
29 -------------------------------------------------------------*/
31 #ifndef __STM_H__
32 #define __STM_H__
34 #if defined(HW_RVL)
36 #include <gctypes.h>
37 #include <gcutil.h>
39 #define STM_EVENT_RESET 0x00020000
40 #define STM_EVENT_POWER 0x00000800
42 #define STM_EINVAL -0x2004
43 #define STM_ENOTINIT -0x2100
44 #define STM_ENOHANDLER -0x2101
46 #ifdef __cplusplus
47 extern "C" {
48 #endif /* __cplusplus */
50 typedef void (*stmcallback)(u32 event);
52 s32 __STM_Init();
53 s32 __STM_Close();
54 s32 STM_ShutdownToStandby();
55 s32 STM_ShutdownToIdle();
56 s32 STM_SetLedMode(u32 mode);
57 s32 STM_RebootSystem();
58 stmcallback STM_RegisterEventHandler(stmcallback newhandler);
60 #ifdef __cplusplus
62 #endif /* __cplusplus */
64 #endif /* defined(HW_RVL) */
66 #endif