diff options
Diffstat (limited to 'include/common/power.h')
-rw-r--r-- | include/common/power.h | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/include/common/power.h b/include/common/power.h new file mode 100644 index 0000000..3a5ad75 --- /dev/null +++ b/include/common/power.h @@ -0,0 +1,175 @@ +/* + Vita Development Suite Libraries +*/ + +#ifndef _VDSUITE_COMMON_POWER_H +#define _VDSUITE_COMMON_POWER_H + +#include_next <power.h> + +#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) +extern "C" { +#endif /* defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) */ + +/*J 電源関係通知コールバックの引数定義マクロ */ +/*E Constant Definitions */ + +#define SCE_POWER_CALLBACKARG_SUSPENDING 0x00010000 /** Entering suspend from timer */ +#define SCE_POWER_CALLBACKARG_RESUMING 0x00020000 /** Resuming from suspend */ +#define SCE_POWER_CALLBACKARG_RESUME_COMPLETE 0x00040000 /** Finished resuming from suspend */ +#define SCE_POWER_CALLBACKARG_POWER_SWITCH 0x80000000 /** Entering suspend from power button */ + +/*J プロトタイプ宣言 */ +/*E prototype declaration */ + +/** + * Returns battery life percentage + * + * @return Battery life percentage + */ +int scePowerGetBatteryLifePercent(void); + +/** + * Check if a suspend is required + * + * @return SCE_TRUE if suspend is required, SCE_FALSE otherwise + */ +SceBool scePowerIsSuspendRequired(void); + +/** + * Returns battery life time + * + * @return Battery life time in seconds + */ +int scePowerGetBatteryLifeTime(void); + +/** + * Returns battery remaining capacity + * + * @return battery remaining capacity in mAh (milliampere hour) + */ +int scePowerGetBatteryRemainCapacity(void); + +/** + * Returns battery full capacity + * + * @return battery full capacity in mAh (milliampere hour) + */ +int scePowerGetBatteryFullCapacity(void); + +/** + * Returns battery temperature + * + * @return temperature in degrees celcius * 100 + */ +int scePowerGetBatteryTemp(void); + +/** + * Returns battery voltage + * + * @return battery voltage in mV (millivolts) + */ +int scePowerGetBatteryVolt(void); + +/** + * Returns battery state of health + * + * @return battery state of health percent + */ +int scePowerGetBatterySOH(void); + +/** + * Returns battery cycle count + * + * @return battery cycle count + */ +int scePowerGetBatteryCycleCount(void); + +/** + * Returns CPU clock frequency + * + * @return CPU clock frequency in Mhz + */ +int scePowerGetArmClockFrequency(void); + +/** + * Returns BUS clock frequency + * + * @return BUS clock frequency in Mhz + */ +int scePowerGetBusClockFrequency(void); + +/** + * Returns GPU crossbar clock frequency + * + * @return GPU crossbar clock frequency in Mhz + */ +int scePowerGetGpuXbarClockFrequency(void); + +/** + * Requests PS Vita to do a cold reset + * + * @return always 0 + */ +int scePowerRequestColdReset(void); + +/** + * Requests PS Vita to go into standby + * + * @return always 0 + */ +int scePowerRequestStandby(void); + +/** + * Requests PS Vita to suspend + * + * @return always 0 + */ +int scePowerRequestSuspend(void); + +/** + * Request display on + * + * @return always 0 + */ +int scePowerRequestDisplayOn(void); + +/** + * Request display off + * + * @return always 0 + */ +int scePowerRequestDisplayOff(void); + +/** + * Sets CPU clock frequency + * + * @param freq - Frequency to set in Mhz + * + * @return 0 on success, < 0 on error + */ +int scePowerSetArmClockFrequency(int freq); + +/** + * Sets BUS clock frequency + * + * @param freq - Frequency to set in Mhz + * + * @return 0 on success, < 0 on error + */ +int scePowerSetBusClockFrequency(int freq); + +/** + * Sets GPU crossbar clock frequency + * + * @param freq - Frequency to set in Mhz + * + * @return 0 on success, < 0 on error + */ +int scePowerSetGpuXbarClockFrequency(int freq); + +#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) +} +#endif /* defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) */ + +#endif /* _VDSUITE_COMMON_POWER_H */ |