summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSree2018-03-14 20:39:24 +1100
committerFrancisco José García García2018-03-14 10:39:24 +0100
commit697c08b091fba144a2be8815f1ca7127ef5587af (patch)
treeabebd2949fe9cb60cd212237d88e6be200e3b196
parentAdded two SceSyscon NIDs (diff)
downloadvds-libraries-697c08b091fba144a2be8815f1ca7127ef5587af.tar.gz
Added some ScePowerCallbackTypes, fix some typos. (#299)
* fix: add createCallback param in example, typo for sys_exit * fix: adding more power callback types
-rw-r--r--include/kernel/kernel/cpu.h2
-rw-r--r--include/kernel/power.h18
-rw-r--r--include/user/kernel/threadmgr.h3
-rw-r--r--include/user/power.h18
4 files changed, 31 insertions, 10 deletions
diff --git a/include/kernel/kernel/cpu.h b/include/kernel/kernel/cpu.h
index d79d416..a6f46d1 100644
--- a/include/kernel/kernel/cpu.h
+++ b/include/kernel/kernel/cpu.h
@@ -19,7 +19,7 @@ extern "C" {
} while(0)
/**
- * @brief Call this when existing a syscall
+ * @brief Call this when exiting a syscall
*
* @param state The state
*/
diff --git a/include/kernel/power.h b/include/kernel/power.h
index ed797be..9394e01 100644
--- a/include/kernel/power.h
+++ b/include/kernel/power.h
@@ -8,12 +8,22 @@ extern "C" {
#endif
typedef enum ScePowerCallbackType {
- /** indicates the unit is suspending, seems to occur due to inactivity */
- SCE_POWER_CB_SUSPENDING = 0x00010000,
+ /** indicates the power button was pushed, putting the unit into suspend mode */
+ SCE_POWER_CB_POWER_SWITCH = 0x80000000,
+ /** ? screen on after off ? **/
+ SCE_POWER_CB_UNK_1 = 0x00600000,
+ /** ? screen off ? **/
+ SCE_POWER_CB_UNK_2 = 0x00400000,
+ /** indicates the unit has finish resuming from suspend mode */
+ SCE_POWER_CB_RESUME_COMPLETE = 0x00040000,
/** indicates the unit is resuming from suspend mode */
SCE_POWER_CB_RESUMING = 0x00020000,
- /** indicates the unit has finish resuming from suspend mode */
- SCE_POWER_CB_RESUME_COMPLETE = 0x00040000
+ /** indicates the unit is suspending, seems to occur due to inactivity */
+ SCE_POWER_CB_SUSPENDING = 0x00010000,
+ /**indicates the unit is plugged into an AC outlet*/
+ SCE_POWER_CB_AC_POWER = 0x00001000,
+ /**indicates there is a battery present in the unit**/
+ SCE_POWER_CB_BATTERY_EXIST = 0x00000080
} ScePowerCallbackType;
/* Callbacks */
diff --git a/include/user/kernel/threadmgr.h b/include/user/kernel/threadmgr.h
index 6535d85..7e9b2f5 100644
--- a/include/user/kernel/threadmgr.h
+++ b/include/user/kernel/threadmgr.h
@@ -829,10 +829,11 @@ typedef struct SceKernelCallbackInfo {
* @par Example:
* @code
* int cbid;
- * cbid = sceKernelCreateCallback("Exit Callback", exit_cb, NULL);
+ * cbid = sceKernelCreateCallback("Exit Callback", 0, exit_cb, NULL);
* @endcode
*
* @param name - A textual name for the callback
+ * @param attr - ?
* @param func - A pointer to a function that will be called as the callback
* @param arg - Argument for the callback ?
*
diff --git a/include/user/power.h b/include/user/power.h
index e42259e..8ba34b0 100644
--- a/include/user/power.h
+++ b/include/user/power.h
@@ -18,12 +18,22 @@ typedef enum ScePowerErrorCode {
} ScePowerErrorCode;
typedef enum ScePowerCallbackType {
- /** indicates the unit is suspending, seems to occur due to inactivity */
- SCE_POWER_CB_SUSPENDING = 0x00010000,
+ /** indicates the power button was pushed, putting the unit into suspend mode */
+ SCE_POWER_CB_POWER_SWITCH = 0x80000000,
+ /** ? screen on after off ? **/
+ SCE_POWER_CB_UNK_1 = 0x00600000,
+ /** ? screen off ? **/
+ SCE_POWER_CB_UNK_2 = 0x00400000,
+ /** indicates the unit has finish resuming from suspend mode */
+ SCE_POWER_CB_RESUME_COMPLETE = 0x00040000,
/** indicates the unit is resuming from suspend mode */
SCE_POWER_CB_RESUMING = 0x00020000,
- /** indicates the unit has finish resuming from suspend mode */
- SCE_POWER_CB_RESUME_COMPLETE = 0x00040000
+ /** indicates the unit is suspending, seems to occur due to inactivity */
+ SCE_POWER_CB_SUSPENDING = 0x00010000,
+ /**indicates the unit is plugged into an AC outlet*/
+ SCE_POWER_CB_AC_POWER = 0x00001000,
+ /**indicates there is a battery present in the unit**/
+ SCE_POWER_CB_BATTERY_EXIST = 0x00000080
} ScePowerCallbackType;
/* Callbacks */