summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorReiko Asakura2021-02-11 01:05:24 -0500
committerReiko Asakura2021-02-11 01:05:24 -0500
commitda13940e1f0e7001b09b49f2802370d55b484dd7 (patch)
treeaf877dede0d3bb6454d6fb3c43998be3b7e21604 /include
parentRemove dupe: libkernel.h (diff)
downloadvds-libraries-da13940e1f0e7001b09b49f2802370d55b484dd7.tar.gz
Remove dupe: power.h
Diffstat (limited to 'include')
-rw-r--r--include/user/power.h85
1 files changed, 2 insertions, 83 deletions
diff --git a/include/user/power.h b/include/user/power.h
index 0878915..62af86b 100644
--- a/include/user/power.h
+++ b/include/user/power.h
@@ -1,78 +1,24 @@
#ifndef _PSP2_POWER_H_
#define _PSP2_POWER_H_
-#include <psp2/types.h>
+#include_next <power.h>
#ifdef __cplusplus
extern "C" {
#endif
-typedef enum ScePowerErrorCode {
- SCE_POWER_ERROR_INVALID_VALUE = (int)0x802B0000,
- SCE_POWER_ERROR_ALREADY_REGISTERED = (int)0x802B0001,
- SCE_POWER_ERROR_CALLBACK_NOT_REGISTERED = (int)0x802B0002,
- SCE_POWER_ERROR_CANT_SUSPEND = (int)0x802B0003,
- SCE_POWER_ERROR_NO_BATTERY = (int)0x802B0100,
- SCE_POWER_ERROR_DETECTING = (int)0x802B0101
-} ScePowerErrorCode;
-
typedef enum ScePowerCallbackType {
/** 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 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 the battery is in low state */
- SCE_POWER_CB_LOWBATTERY = 0x00000100,
- /** indicates there is a battery present in the unit */
- SCE_POWER_CB_BATTERY_EXIST = 0x00000080
} ScePowerCallbackType;
-/* GPU, WLAN/COM configuration setting */
-typedef enum ScePowerConfigurationMode {
- SCE_POWER_CONFIGURATION_MODE_A = 0x00000080U, /* GPU clock normal, WLAN/COM enabled */
- SCE_POWER_CONFIGURATION_MODE_B = 0x00000800U, /* GPU clock high, WLAN/COM disabled */
- SCE_POWER_CONFIGURATION_MODE_C = 0x00010880U, /* GPU clock high, WLAN/COM enabled (drains battery faster) */
-} ScePowerConfigurationMode;
-
-/** Callback function prototype */
-typedef void (*ScePowerCallback)(int notifyId, int notifyCount, int powerInfo);
-
-/**
- * Registers a ScePower Callback
- *
- * @param cbid - The UID of the specified callback
- *
- * @return 0 on success, < 0 on error
- */
-int scePowerRegisterCallback(SceUID cbid);
-
-/**
- * Unregister a callback
- *
- * @param cbid - The UID of the specified callback
- *
- * @return 0 on success, < 0 on error
- */
-int scePowerUnregisterCallback(SceUID cbid);
-
-/**
- * Returns battery charging status
- *
- * @return SCE_TRUE if under charge, SCE_FALSE otherwise
- */
-SceBool scePowerIsBatteryCharging(void);
-
/**
* Returns battery life percentage
*
@@ -81,19 +27,6 @@ SceBool scePowerIsBatteryCharging(void);
int scePowerGetBatteryLifePercent(void);
/**
- * Set power configuration mode between:
- *
- * Mode A - This is the normal mode at process start-up. The clock frequency of the GPU core is the "normal" clock frequency. The WLAN/COM can be used.
- * Mode B - This mode accelerates the GPU clock frequency. The clock frequency of the GPU core is the "high" clock frequency. The WLAN/COM cannot be used.
- * Mode C - This mode accelerates the GPU clock frequency, and also uses the WLAN/COM. The clock frequency of the GPU core is the "high" clock frequency, and use of the WLAN/COM is possible. The screen (touchscreen) brightness, however, is limited. Also, camera cannot be used.
- *
- * @param conf One of ::ScePowerConfigurationMode
- *
- * @return 0 on success
- */
-int scePowerSetConfigurationMode(int conf);
-
-/**
* Check if a suspend is required
*
* @return SCE_TRUE if suspend is required, SCE_FALSE otherwise
@@ -101,13 +34,6 @@ int scePowerSetConfigurationMode(int conf);
SceBool scePowerIsSuspendRequired(void);
/**
- * Check if AC is plugged in
- *
- * @return SCE_TRUE if plugged in, SCE_FALSE otherwise
- */
-SceBool scePowerIsPowerOnline(void);
-
-/**
* Returns battery life time
*
* @return Battery life time in seconds
@@ -122,13 +48,6 @@ int scePowerGetBatteryLifeTime(void);
int scePowerGetBatteryRemainCapacity(void);
/**
- * Returns battery state
- *
- * @return SCE_TRUE if battery is low, SCE_FALSE otherwise
- */
-SceBool scePowerIsLowBattery(void);
-
-/**
* Returns battery full capacity
*
* @return battery full capacity in mAh (milliampere hour)
@@ -218,7 +137,7 @@ int scePowerRequestSuspend(void);
* @return always 0
*/
int scePowerRequestDisplayOn(void);
-
+
/**
* Request display off
*