Skip to content

Update stm.c #224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions gc/ogc/stm.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,38 @@ distribution.
#include <gctypes.h>
#include <gcutil.h>

#define STM_EVENT_RESET 0x00020000
#define STM_EVENT_POWER 0x00000800
#define STM_EVENT_RESET 0x00020000
#define STM_EVENT_POWER 0x00000800

#define STM_EINVAL -0x2004
#define STM_ENOTINIT -0x2100
#define STM_ENOHANDLER -0x2101
#define STM_EINVAL -0x2004
#define STM_ENOTINIT -0x2100
#define STM_ENOHANDLER -0x2101

#define STM_LEDFLASH_USER 0x01
#define STM_LEDFLASH_NOEXEC 0x02

#define STM_MAX_LED_PATTERNS 128

#ifdef __cplusplus
extern "C" {
extern "C" {
#endif /* __cplusplus */

typedef void (*stmcallback)(u32 event);

s32 __STM_Init(void);
s32 __STM_Close(void);

stmcallback STM_RegisterEventHandler(stmcallback newhandler);

s32 STM_ShutdownToStandby(void);
s32 STM_ShutdownToIdle(void);
s32 STM_SetLedMode(u32 mode);
s32 STM_RebootSystem(void);
stmcallback STM_RegisterEventHandler(stmcallback newhandler);

s32 STM_SetLedMode(u32 mode);
s32 STM_StartLEDFlashLoop(u8 id, u8 priority, u8 flags, const u16* patterns, u32 num_patterns);

#ifdef __cplusplus
}
}
#endif /* __cplusplus */

#endif /* defined(HW_RVL) */
Expand Down
Loading