vitasdk
Documentation of the vitasdk

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:

#include <psp2/power.h>


Link the library to the executable:

ScePower_stub



Functions

int scePowerRegisterCallback (SceUID cbid)
 Registers a ScePower Callback. More...
 
int scePowerUnregisterCallback (SceUID cbid)
 Unregister a callback. More...
 
SceBool scePowerIsBatteryCharging (void)
 Returns battery charging status. More...
 
int scePowerGetBatteryLifePercent (void)
 Returns battery life percentage. More...
 
int scePowerSetConfigurationMode (int conf)
 Set power configuration mode between: More...
 
SceBool scePowerIsSuspendRequired (void)
 Check if a suspend is required. More...
 
SceBool scePowerIsPowerOnline (void)
 Check if AC is plugged in. More...
 
int scePowerGetBatteryLifeTime (void)
 Returns battery life time. More...
 
int scePowerGetBatteryRemainCapacity (void)
 Returns battery remaining capacity. More...
 
SceBool scePowerIsLowBattery (void)
 Returns battery state. More...
 
int scePowerGetBatteryFullCapacity (void)
 Returns battery full capacity. More...
 
int scePowerGetBatteryTemp (void)
 Returns battery temperature. More...
 
int scePowerGetBatteryVolt (void)
 Returns battery voltage. More...
 
int scePowerGetBatterySOH (void)
 Returns battery state of health. More...
 
int scePowerGetBatteryCycleCount (void)
 Returns battery cycle count. More...
 
int scePowerGetArmClockFrequency (void)
 Returns CPU clock frequency. More...
 
int scePowerGetBusClockFrequency (void)
 Returns BUS clock frequency. More...
 
int scePowerGetGpuClockFrequency (void)
 Returns GPU clock frequency. More...
 
int scePowerGetGpuXbarClockFrequency (void)
 Returns GPU crossbar clock frequency. More...
 
int scePowerRequestColdReset (void)
 Requests PS Vita to do a cold reset. More...
 
int scePowerRequestStandby (void)
 Requests PS Vita to go into standby. More...
 
int scePowerRequestSuspend (void)
 Requests PS Vita to suspend. More...
 
int scePowerRequestDisplayOn (void)
 Request display on. More...
 
int scePowerRequestDisplayOff (void)
 Request display off. More...
 
int scePowerSetArmClockFrequency (int freq)
 Sets CPU clock frequency. More...
 
int scePowerSetBusClockFrequency (int freq)
 Sets BUS clock frequency. More...
 
int scePowerSetGpuClockFrequency (int freq)
 Sets GPU clock frequency. More...
 
int scePowerSetGpuXbarClockFrequency (int freq)
 Sets GPU crossbar clock frequency. More...
 
int scePowerSetUsingWireless (SceBool enabled)
 Sets wireless features usage. More...
 
int scePowerGetUsingWireless (void)
 Gets wireless features usage. More...
 

Function Documentation

◆ scePowerRegisterCallback()

int scePowerRegisterCallback ( SceUID  cbid)

Registers a ScePower Callback.

Parameters
cbid- The UID of the specified callback
Returns
0 on success, < 0 on error

◆ scePowerUnregisterCallback()

int scePowerUnregisterCallback ( SceUID  cbid)

Unregister a callback.

Parameters
cbid- The UID of the specified callback
Returns
0 on success, < 0 on error

◆ scePowerIsBatteryCharging()

SceBool scePowerIsBatteryCharging ( void  )

Returns battery charging status.

Returns
SCE_TRUE if under charge, SCE_FALSE otherwise

◆ scePowerGetBatteryLifePercent()

int scePowerGetBatteryLifePercent ( void  )

Returns battery life percentage.

Returns
Battery life percentage

◆ scePowerSetConfigurationMode()

int scePowerSetConfigurationMode ( int  conf)

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.

Parameters
confOne of ScePowerConfigurationMode
Returns
0 on success

◆ scePowerIsSuspendRequired()

SceBool scePowerIsSuspendRequired ( void  )

Check if a suspend is required.

Returns
SCE_TRUE if suspend is required, SCE_FALSE otherwise

◆ scePowerIsPowerOnline()

SceBool scePowerIsPowerOnline ( void  )

Check if AC is plugged in.

Returns
SCE_TRUE if plugged in, SCE_FALSE otherwise

◆ scePowerGetBatteryLifeTime()

int scePowerGetBatteryLifeTime ( void  )

Returns battery life time.

Returns
Battery life time in minutes

◆ scePowerGetBatteryRemainCapacity()

int scePowerGetBatteryRemainCapacity ( void  )

Returns battery remaining capacity.

Returns
battery remaining capacity in mAh (milliampere hour)

◆ scePowerIsLowBattery()

SceBool scePowerIsLowBattery ( void  )

Returns battery state.

Returns
SCE_TRUE if battery is low, SCE_FALSE otherwise

◆ scePowerGetBatteryFullCapacity()

int scePowerGetBatteryFullCapacity ( void  )

Returns battery full capacity.

Returns
battery full capacity in mAh (milliampere hour)

◆ scePowerGetBatteryTemp()

int scePowerGetBatteryTemp ( void  )

Returns battery temperature.

Returns
temperature in degrees celcius * 100

◆ scePowerGetBatteryVolt()

int scePowerGetBatteryVolt ( void  )

Returns battery voltage.

Returns
battery voltage in mV (millivolts)

◆ scePowerGetBatterySOH()

int scePowerGetBatterySOH ( void  )

Returns battery state of health.

Returns
battery state of health percent

◆ scePowerGetBatteryCycleCount()

int scePowerGetBatteryCycleCount ( void  )

Returns battery cycle count.

Returns
battery cycle count

◆ scePowerGetArmClockFrequency()

int scePowerGetArmClockFrequency ( void  )

Returns CPU clock frequency.

Returns
CPU clock frequency in Mhz

◆ scePowerGetBusClockFrequency()

int scePowerGetBusClockFrequency ( void  )

Returns BUS clock frequency.

Returns
BUS clock frequency in Mhz

◆ scePowerGetGpuClockFrequency()

int scePowerGetGpuClockFrequency ( void  )

Returns GPU clock frequency.

Returns
GPU clock frequency in Mhz

◆ scePowerGetGpuXbarClockFrequency()

int scePowerGetGpuXbarClockFrequency ( void  )

Returns GPU crossbar clock frequency.

Returns
GPU crossbar clock frequency in Mhz

◆ scePowerRequestColdReset()

int scePowerRequestColdReset ( void  )

Requests PS Vita to do a cold reset.

Returns
always 0

◆ scePowerRequestStandby()

int scePowerRequestStandby ( void  )

Requests PS Vita to go into standby.

Returns
always 0

◆ scePowerRequestSuspend()

int scePowerRequestSuspend ( void  )

Requests PS Vita to suspend.

Returns
always 0

◆ scePowerRequestDisplayOn()

int scePowerRequestDisplayOn ( void  )

Request display on.

Returns
always 0

◆ scePowerRequestDisplayOff()

int scePowerRequestDisplayOff ( void  )

Request display off.

Returns
always 0

◆ scePowerSetArmClockFrequency()

int scePowerSetArmClockFrequency ( int  freq)

Sets CPU clock frequency.

Parameters
freq- Frequency to set in Mhz
Returns
0 on success, < 0 on error

◆ scePowerSetBusClockFrequency()

int scePowerSetBusClockFrequency ( int  freq)

Sets BUS clock frequency.

Parameters
freq- Frequency to set in Mhz
Returns
0 on success, < 0 on error

◆ scePowerSetGpuClockFrequency()

int scePowerSetGpuClockFrequency ( int  freq)

Sets GPU clock frequency.

Parameters
freq- Frequency to set in Mhz
Returns
0 on success, < 0 on error

◆ scePowerSetGpuXbarClockFrequency()

int scePowerSetGpuXbarClockFrequency ( int  freq)

Sets GPU crossbar clock frequency.

Parameters
freq- Frequency to set in Mhz
Returns
0 on success, < 0 on error

◆ scePowerSetUsingWireless()

int scePowerSetUsingWireless ( SceBool  enabled)

Sets wireless features usage.

Parameters
enabled- SCE_TRUE to enable, SCE_FALSE to disable
Returns
0 on success, < 0 on error

◆ scePowerGetUsingWireless()

int scePowerGetUsingWireless ( void  )

Gets wireless features usage.

Returns
SCE_TRUE if enabled, SCE_FALSE otherwise