vitasdk
Documentation of the vitasdk

Detailed Description

Exports for Kernel.


Using this library in your project

Include the header file in your project:




Using this library in your project

Include the header file in your project:


Link the library to the executable:

ScePowerForDriver_stub



Functions

 VITASDK_BUILD_ASSERT_EQ (4, ScePowerErrorCode)
 
 VITASDK_BUILD_ASSERT_EQ (4, ScePowerCallbackType)
 
 VITASDK_BUILD_ASSERT_EQ (4, ScePowerConfigurationMode)
 
int kscePowerRegisterCallback (SceUID cbid)
 Registers a ScePower Callback. More...
 
int kscePowerUnregisterCallback (SceUID cbid)
 Unregister a callback. More...
 
SceBool kscePowerIsBatteryCharging (void)
 Returns battery charging status. More...
 
int kscePowerGetBatteryLifePercent (void)
 Returns battery life percentage. More...
 
SceBool kscePowerIsSuspendRequired (void)
 Check if a suspend is required. More...
 
SceBool kscePowerIsPowerOnline (void)
 Check if AC is plugged in. More...
 
int kscePowerGetBatteryLifeTime (void)
 Returns battery life time. More...
 
int kscePowerGetBatteryRemainCapacity (void)
 Returns battery remaining capacity. More...
 
SceBool kscePowerIsLowBattery (void)
 Returns battery state. More...
 
int kscePowerGetBatteryFullCapacity (void)
 Returns battery full capacity. More...
 
int kscePowerGetBatteryTemp (void)
 Returns battery temperature. More...
 
int kscePowerGetBatteryVolt (void)
 Returns battery voltage. More...
 
int kscePowerGetBatterySOH (void)
 Returns battery state of health. More...
 
int kscePowerGetBatteryCycleCount (void)
 Returns battery cycle count. More...
 
int kscePowerGetArmClockFrequency (void)
 Returns CPU clock frequency. More...
 
int kscePowerGetBusClockFrequency (void)
 Returns BUS clock frequency. More...
 
int kscePowerGetSysClockFrequency (void)
 Returns Sys clock frequency. More...
 
int kscePowerGetGpuXbarClockFrequency (void)
 Returns GPU crossbar clock frequency. More...
 
int kscePowerRequestSoftReset (void)
 Requests PS Vita to do a soft reset. More...
 
int kscePowerRequestColdReset (void)
 Requests PS Vita to do a cold reset. More...
 
int kscePowerRequestStandby (void)
 Requests PS Vita to go into standby. More...
 
int kscePowerRequestSuspend (void)
 Requests PS Vita to suspend. More...
 
int kscePowerRequestDisplayOff (void)
 Request display off. More...
 
int kscePowerSetDisplayBrightness (int brightness)
 Set the screen brightness. More...
 
int kscePowerSetArmClockFrequency (int freq)
 Sets CPU clock frequency. More...
 
int kscePowerSetBusClockFrequency (int freq)
 Sets BUS clock frequency. More...
 
int kscePowerSetGpuClockFrequency (int freq)
 Sets GPU clock frequency. More...
 
int kscePowerSetGpuXbarClockFrequency (int freq)
 Sets GPU crossbar clock frequency. More...
 

Typedefs

typedef void(* ScePowerCallback) (int notifyId, int notifyCount, int powerInfo, void *userData)
 Callback function prototype. More...
 

Typedef Documentation

◆ ScePowerCallback

typedef void(* ScePowerCallback) (int notifyId, int notifyCount, int powerInfo, void *userData)

Callback function prototype.

Enumeration Type Documentation

◆ ScePowerErrorCode

Enumerator
SCE_POWER_ERROR_INVALID_VALUE 
SCE_POWER_ERROR_ALREADY_REGISTERED 
SCE_POWER_ERROR_CALLBACK_NOT_REGISTERED 
SCE_POWER_ERROR_CANT_SUSPEND 
SCE_POWER_ERROR_NO_BATTERY 
SCE_POWER_ERROR_DETECTING 

◆ ScePowerCallbackType

Enumerator
SCE_POWER_CB_AFTER_SYSTEM_RESUME 
SCE_POWER_CB_BATTERY_ONLINE 
SCE_POWER_CB_THERMAL_SUSPEND 
SCE_POWER_CB_LOW_BATTERY_SUSPEND 
SCE_POWER_CB_LOW_BATTERY 
SCE_POWER_CB_POWER_ONLINE 
SCE_POWER_CB_SYSTEM_SUSPEND 
SCE_POWER_CB_SYSTEM_RESUMING 
SCE_POWER_CB_SYSTEM_RESUME 
SCE_POWER_CB_UNK_0x100000 
SCE_POWER_CB_APP_RESUME 
SCE_POWER_CB_APP_SUSPEND 
SCE_POWER_CB_APP_RESUMING 
SCE_POWER_CB_BUTTON_PS_START_PRESS 
SCE_POWER_CB_BUTTON_PS_POWER_PRESS 
SCE_POWER_CB_BUTTON_PS_HOLD 
SCE_POWER_CB_BUTTON_PS_PRESS 
SCE_POWER_CB_BUTTON_POWER_HOLD 
SCE_POWER_CB_BUTTON_POWER_PRESS 
SCE_POWER_CB_VALID_MASK_KERNEL 
SCE_POWER_CB_VALID_MASK_SYSTEM 
SCE_POWER_CB_VALID_MASK_NON_SYSTEM 

◆ ScePowerConfigurationMode

Enumerator
SCE_POWER_CONFIGURATION_MODE_A 
SCE_POWER_CONFIGURATION_MODE_B 
SCE_POWER_CONFIGURATION_MODE_C 
__SCE_POWER_CONFIGURATION_MODE 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/3]

VITASDK_BUILD_ASSERT_EQ ( ,
ScePowerErrorCode   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/3]

VITASDK_BUILD_ASSERT_EQ ( ,
ScePowerCallbackType   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/3]

VITASDK_BUILD_ASSERT_EQ ( ,
ScePowerConfigurationMode   
)

◆ kscePowerRegisterCallback()

int kscePowerRegisterCallback ( SceUID  cbid)

Registers a ScePower Callback.

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

◆ kscePowerUnregisterCallback()

int kscePowerUnregisterCallback ( SceUID  cbid)

Unregister a callback.

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

◆ kscePowerIsBatteryCharging()

SceBool kscePowerIsBatteryCharging ( void  )

Returns battery charging status.

Returns
SCE_TRUE if under charge, SCE_FALSE otherwise

◆ kscePowerGetBatteryLifePercent()

int kscePowerGetBatteryLifePercent ( void  )

Returns battery life percentage.

Returns
Battery life percentage

◆ kscePowerIsSuspendRequired()

SceBool kscePowerIsSuspendRequired ( void  )

Check if a suspend is required.

Returns
SCE_TRUE if suspend is required, SCE_FALSE otherwise

◆ kscePowerIsPowerOnline()

SceBool kscePowerIsPowerOnline ( void  )

Check if AC is plugged in.

Returns
SCE_TRUE if plugged in, SCE_FALSE otherwise

◆ kscePowerGetBatteryLifeTime()

int kscePowerGetBatteryLifeTime ( void  )

Returns battery life time.

Returns
Battery life time in minutes

◆ kscePowerGetBatteryRemainCapacity()

int kscePowerGetBatteryRemainCapacity ( void  )

Returns battery remaining capacity.

Returns
battery remaining capacity in mAh (milliampere hour)

◆ kscePowerIsLowBattery()

SceBool kscePowerIsLowBattery ( void  )

Returns battery state.

Returns
SCE_TRUE if battery is low, SCE_FALSE otherwise

◆ kscePowerGetBatteryFullCapacity()

int kscePowerGetBatteryFullCapacity ( void  )

Returns battery full capacity.

Returns
battery full capacity in mAh (milliampere hour)

◆ kscePowerGetBatteryTemp()

int kscePowerGetBatteryTemp ( void  )

Returns battery temperature.

Returns
temperature in degrees celcius * 100

◆ kscePowerGetBatteryVolt()

int kscePowerGetBatteryVolt ( void  )

Returns battery voltage.

Returns
battery voltage in mV (millivolts)

◆ kscePowerGetBatterySOH()

int kscePowerGetBatterySOH ( void  )

Returns battery state of health.

Returns
battery state of health percent

◆ kscePowerGetBatteryCycleCount()

int kscePowerGetBatteryCycleCount ( void  )

Returns battery cycle count.

Returns
battery cycle count

◆ kscePowerGetArmClockFrequency()

int kscePowerGetArmClockFrequency ( void  )

Returns CPU clock frequency.

Returns
CPU clock frequency in Mhz

◆ kscePowerGetBusClockFrequency()

int kscePowerGetBusClockFrequency ( void  )

Returns BUS clock frequency.

Returns
BUS clock frequency in Mhz

◆ kscePowerGetSysClockFrequency()

int kscePowerGetSysClockFrequency ( void  )

Returns Sys clock frequency.

Returns
Sys clock frequency in Mhz

◆ kscePowerGetGpuXbarClockFrequency()

int kscePowerGetGpuXbarClockFrequency ( void  )

Returns GPU crossbar clock frequency.

Returns
GPU crossbar clock frequency in Mhz

◆ kscePowerRequestSoftReset()

int kscePowerRequestSoftReset ( void  )

Requests PS Vita to do a soft reset.

Returns
always 0

◆ kscePowerRequestColdReset()

int kscePowerRequestColdReset ( void  )

Requests PS Vita to do a cold reset.

Returns
always 0

◆ kscePowerRequestStandby()

int kscePowerRequestStandby ( void  )

Requests PS Vita to go into standby.

Returns
always 0

◆ kscePowerRequestSuspend()

int kscePowerRequestSuspend ( void  )

Requests PS Vita to suspend.

Returns
always 0

◆ kscePowerRequestDisplayOff()

int kscePowerRequestDisplayOff ( void  )

Request display off.

Returns
always 0

◆ kscePowerSetDisplayBrightness()

int kscePowerSetDisplayBrightness ( int  brightness)

Set the screen brightness.

See also
sceAVConfigSetDisplayBrightness for userland counterpart.
Parameters
brightnessBrightness that the screen will be set to (range 21-65536, 0 turns off the screen).
Returns
?

◆ kscePowerSetArmClockFrequency()

int kscePowerSetArmClockFrequency ( int  freq)

Sets CPU clock frequency.

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

◆ kscePowerSetBusClockFrequency()

int kscePowerSetBusClockFrequency ( int  freq)

Sets BUS clock frequency.

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

◆ kscePowerSetGpuClockFrequency()

int kscePowerSetGpuClockFrequency ( int  freq)

Sets GPU clock frequency.

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

◆ kscePowerSetGpuXbarClockFrequency()

int kscePowerSetGpuXbarClockFrequency ( int  freq)

Sets GPU crossbar clock frequency.

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