vitasdk
Documentation of the vitasdk
power.h File Reference
#include <psp2common/power.h>
#include <psp2kern/types.h>

Go to the source code of this file.

Data Structures

struct  ScePowerBatteryFakeStatus
 Simulated battery state used by kscePowerSetBatteryFakeStatus. More...
 

Typedefs

typedef void(* ScePowerIdleCallback) (SceUInt32 index, SceUInt32 idle_time, void *user_data)
 Idle callback called by ScePower's periodic idle worker.
 
typedef void(* ScePowerProcessIdleCallback) (ScePID pid, SceUInt32 idle_time, void *user_data)
 Process-idle callback called by ScePower's periodic idle worker.
 

Enumerations

enum  ScePowerBatteryUsbStatus { SCE_POWER_BATTERY_USB_STATUS_DISCONNECTED = 0 , SCE_POWER_BATTERY_USB_STATUS_ACTIVE = 2 , SCE_POWER_BATTERY_USB_STATUS_CONFIGURED = 3 , SCE_POWER_BATTERY_USB_STATUS_SUSPENDED = 4 }
 USB device states observed on FW 3.60. More...
 

Functions

int kscePowerRegisterCallback (SceUID cbid)
 Registers a ScePower Callback.
 
int kscePowerUnregisterCallback (SceUID cbid)
 Unregister a callback.
 
SceBool kscePowerIsBatteryCharging (void)
 Returns battery charging status.
 
int kscePowerGetBatteryLifePercent (void)
 Returns battery life percentage.
 
SceBool kscePowerIsSuspendRequired (void)
 Check if a suspend is required.
 
SceBool kscePowerIsPowerOnline (void)
 Check if AC is plugged in.
 
int kscePowerGetBatteryLifeTime (void)
 Returns battery life time.
 
int kscePowerGetBatteryRemainCapacity (void)
 Returns battery remaining capacity.
 
SceBool kscePowerIsLowBattery (void)
 Returns battery state.
 
int kscePowerGetBatteryFullCapacity (void)
 Returns battery full capacity.
 
int kscePowerGetBatteryTemp (void)
 Returns battery temperature.
 
int kscePowerGetBatteryVolt (void)
 Returns battery voltage.
 
int kscePowerGetBatterySOH (void)
 Returns battery state of health.
 
int kscePowerGetBatteryCycleCount (void)
 Returns battery cycle count.
 
int kscePowerGetArmClockFrequency (void)
 Returns CPU clock frequency.
 
int kscePowerGetBusClockFrequency (void)
 Returns BUS clock frequency.
 
int kscePowerGetSysClockFrequency (void)
 Returns Sys clock frequency.
 
int kscePowerGetGpuXbarClockFrequency (void)
 Returns GPU crossbar clock frequency.
 
int kscePowerRequestSoftReset (void)
 Requests PS Vita to do a soft reset.
 
int kscePowerRequestColdReset (void)
 Requests PS Vita to do a cold reset.
 
int kscePowerRequestStandby (void)
 Requests PS Vita to go into standby.
 
int kscePowerRequestSuspend (void)
 Requests PS Vita to suspend.
 
int kscePowerRequestDisplayOff (void)
 Request display off.
 
int kscePowerSetDisplayBrightness (int brightness)
 Set the screen brightness.
 
int kscePowerSetArmClockFrequency (int freq)
 Sets CPU clock frequency.
 
int kscePowerSetBusClockFrequency (int freq)
 Sets BUS clock frequency.
 
int kscePowerSetGpuClockFrequency (int freq)
 Sets GPU clock frequency.
 
int kscePowerSetGpuXbarClockFrequency (int freq)
 Sets GPU crossbar clock frequency.
 
 VITASDK_BUILD_ASSERT_EQ (0x10, ScePowerBatteryFakeStatus)
 
int kscePowerBatteryDisableUsbCharging (void)
 Clear ScePower's USB-charging request.
 
int kscePowerBatteryEnableUsbCharging (void)
 Enable ScePower's USB-charging request.
 
int kscePowerBatteryForbidCharging (void)
 Increment the reference count that prevents charging.
 
int kscePowerBatteryPermitCharging (void)
 Decrement the reference count that prevents charging, if it is nonzero.
 
int kscePowerBatterySetUsbStatus (int usb_status)
 Set the USB device state reported to Syscon.
 
int kscePowerBatteryStopUsbCharging (void)
 Request that Syscon stop USB charging immediately.
 
int kscePowerGetArmClockFrequencyProc (ScePID pid)
 Get one process's ARM-clock request.
 
int kscePowerGetBusClockFrequencyProc (ScePID pid)
 Get one process's bus-clock request.
 
int kscePowerGetCameraBusClockFrequency (void)
 Get the applied camera-bus clock frequency.
 
int kscePowerGetCompatClockFrequency (void)
 Get the most recent compatibility-clock request.
 
int kscePowerGetDmac5ClockFrequency (void)
 Get the applied DMAC5 clock frequency.
 
int kscePowerGetGpuClockFrequencyInternal (SceInt32 *core_frequency, SceInt32 *mp_frequency)
 Get the applied GPU core and MP clock frequencies.
 
int kscePowerGetGpuClockFrequencyProc (ScePID pid)
 Get one process's GPU-clock request.
 
int kscePowerGetGpuXbarClockFrequencyProc (ScePID pid)
 Get one process's GPU-crossbar clock request.
 
int kscePowerGetPowerSwMode (void)
 Get the combined power-switch policy.
 
int kscePowerGetVeneziaClockFrequency (void)
 Get the most recent Venezia-clock request.
 
int kscePowerGetVipClockFrequency (void)
 Get the most recent VIP-clock request.
 
int kscePowerGetWakeupFactor (void)
 Get the wakeup factor captured during the most recent resume sequence.
 
int kscePowerRequestDisplayOn (void)
 Request that the display be turned on.
 
int kscePowerRequestHibernate (void)
 Queue an asynchronous hibernate request.
 
int kscePowerRequestResume (void)
 Request that an in-progress suspend sequence resume or abort sleeping.
 
int kscePowerSetArmClockFrequencyProc (ScePID pid, int frequency)
 Set one process's ARM-clock request.
 
int kscePowerSetBatteryFakeStatus (const ScePowerBatteryFakeStatus *fake_status)
 Enable or disable simulated battery values.
 
int kscePowerSetBusClockFrequencyProc (ScePID pid, int frequency)
 Set one process's bus-clock request.
 
int kscePowerSetCameraBusClockFrequency (int frequency)
 Set the camera-bus clock.
 
int kscePowerSetCompatClockFrequency (int frequency)
 Set the compatibility/Allegrex clock request.
 
int kscePowerSetDisplayMaxBrightness (int max_brightness)
 Set the maximum display brightness.
 
int kscePowerSetDmac5ClockFrequency (int frequency)
 Set the DMAC5 clock.
 
int kscePowerSetGpuClockFrequencyInternal (SceInt32 core_frequency, SceInt32 mp_frequency)
 Set the GPU core and MP clocks directly.
 
int kscePowerSetGpuClockFrequencyProc (ScePID pid, int frequency)
 Set one process's GPU-clock request.
 
int kscePowerSetGpuXbarClockFrequencyProc (ScePID pid, int frequency)
 Set one process's GPU-crossbar clock request.
 
int kscePowerSetIdleCallback (SceUInt32 index, int flags, SceUInt64 duration, ScePowerIdleCallback callback, void *user_data)
 Configure one of the eight global idle callbacks.
 
int kscePowerSetPowerSwMode (int mode)
 Set the Vsh/user power-switch policy slot.
 
int kscePowerSetPowerSwMode2 (int mode)
 Set the kernel power-switch policy slot.
 
int kscePowerSetProcessIdleCallback (ScePowerProcessIdleCallback callback, void *user_data)
 Install the process-idle callback used for every tracked process.
 
int kscePowerSetPsButtonPushTime (int push_time_us)
 Set the PS button hold threshold.
 
int kscePowerSetStandbyButtonPushTime (int push_time_us)
 Set the standby/power button hold threshold.
 
int kscePowerSetSysClockFrequency (int frequency)
 Set the system clock request.
 
int kscePowerSetVeneziaClockFrequency (int frequency)
 Set the Venezia clock request.
 
int kscePowerSetVipClockFrequency (int frequency)
 Set the VIP clock request.
 
int kscePowerTick (SceUInt32 type)
 Record activity for ScePower idle tracking.
 
int kscePowerWlanActivate (void)
 Set ScePower's software WLAN-active flag.
 
int kscePowerWlanDeactivate (void)
 Clear ScePower's software WLAN-active flag.