6#ifndef _PSP2KERN_POWER_H_
7#define _PSP2KERN_POWER_H_
#define VITASDK_BUILD_ASSERT_EQ(__size__, __name__)
Definition build_utils.h:13
int flags
Event flags.
Definition debug.h:3
SceUID pid
Definition debug.h:1
void * user_data
Definition lsdb.h:7
SceLsdbDbBlobCallback callback
Definition lsdb.h:6
SceInt32 type
Must be 100 when passed to sceLsdbReplaceTheme on FW 3.60.
Definition lsdb.h:2
int kscePowerRequestResume(void)
Request that an in-progress suspend sequence resume or abort sleeping.
int kscePowerUnregisterCallback(SceUID cbid)
Unregister a callback.
int kscePowerGetGpuClockFrequencyInternal(SceInt32 *core_frequency, SceInt32 *mp_frequency)
Get the applied GPU core and MP clock frequencies.
int kscePowerBatteryEnableUsbCharging(void)
Enable ScePower's USB-charging request.
int kscePowerGetBatteryRemainCapacity(void)
Returns battery remaining capacity.
int kscePowerGetBatterySOH(void)
Returns battery state of health.
int kscePowerGetArmClockFrequency(void)
Returns CPU clock frequency.
SceSize size
Must be sizeof(ScePowerBatteryFakeStatus).
Definition power.h:243
int kscePowerGetBusClockFrequencyProc(ScePID pid)
Get one process's bus-clock request.
int kscePowerSetPowerSwMode(int mode)
Set the Vsh/user power-switch policy slot.
int kscePowerSetArmClockFrequencyProc(ScePID pid, int frequency)
Set one process's ARM-clock request.
int kscePowerGetSysClockFrequency(void)
Returns Sys clock frequency.
int kscePowerSetArmClockFrequency(int freq)
Sets CPU clock frequency.
int kscePowerRequestColdReset(void)
Requests PS Vita to do a cold reset.
void(* ScePowerProcessIdleCallback)(ScePID pid, SceUInt32 idle_time, void *user_data)
Process-idle callback called by ScePower's periodic idle worker.
Definition power.h:269
int kscePowerSetBusClockFrequency(int freq)
Sets BUS clock frequency.
int kscePowerGetGpuClockFrequencyProc(ScePID pid)
Get one process's GPU-clock request.
int kscePowerRequestHibernate(void)
Queue an asynchronous hibernate request.
int kscePowerGetBatteryCycleCount(void)
Returns battery cycle count.
int kscePowerBatterySetUsbStatus(int usb_status)
Set the USB device state reported to Syscon.
int kscePowerSetVeneziaClockFrequency(int frequency)
Set the Venezia clock request.
ScePowerBatteryUsbStatus
USB device states observed on FW 3.60.
Definition power.h:228
SceBool kscePowerIsLowBattery(void)
Returns battery state.
int kscePowerGetVeneziaClockFrequency(void)
Get the most recent Venezia-clock request.
int kscePowerSetBatteryFakeStatus(const ScePowerBatteryFakeStatus *fake_status)
Enable or disable simulated battery values.
int kscePowerSetGpuClockFrequencyInternal(SceInt32 core_frequency, SceInt32 mp_frequency)
Set the GPU core and MP clocks directly.
int kscePowerRegisterCallback(SceUID cbid)
Registers a ScePower Callback.
int kscePowerSetPowerSwMode2(int mode)
Set the kernel power-switch policy slot.
int kscePowerGetBatteryVolt(void)
Returns battery voltage.
int kscePowerBatteryForbidCharging(void)
Increment the reference count that prevents charging.
SceUInt32 full_capacity
Full capacity in mAh; 0 is treated as 2000.
Definition power.h:245
int kscePowerSetCompatClockFrequency(int frequency)
Set the compatibility/Allegrex clock request.
int kscePowerSetSysClockFrequency(int frequency)
Set the system clock request.
int kscePowerSetIdleCallback(SceUInt32 index, int flags, SceUInt64 duration, ScePowerIdleCallback callback, void *user_data)
Configure one of the eight global idle callbacks.
int kscePowerSetGpuXbarClockFrequency(int freq)
Sets GPU crossbar clock frequency.
int kscePowerGetWakeupFactor(void)
Get the wakeup factor captured during the most recent resume sequence.
int kscePowerSetGpuXbarClockFrequencyProc(ScePID pid, int frequency)
Set one process's GPU-crossbar clock request.
int kscePowerGetBatteryFullCapacity(void)
Returns battery full capacity.
SceUInt32 discharge_time
Simulated discharge duration in microseconds, or zero to keep the capacity constant.
Definition power.h:246
int kscePowerGetBatteryLifePercent(void)
Returns battery life percentage.
int kscePowerGetBatteryTemp(void)
Returns battery temperature.
int kscePowerSetCameraBusClockFrequency(int frequency)
Set the camera-bus clock.
int kscePowerSetDisplayBrightness(int brightness)
Set the screen brightness.
int kscePowerSetBusClockFrequencyProc(ScePID pid, int frequency)
Set one process's bus-clock request.
int kscePowerSetGpuClockFrequency(int freq)
Sets GPU clock frequency.
SceBool kscePowerIsPowerOnline(void)
Check if AC is plugged in.
int kscePowerRequestSoftReset(void)
Requests PS Vita to do a soft reset.
int kscePowerGetArmClockFrequencyProc(ScePID pid)
Get one process's ARM-clock request.
int kscePowerGetCompatClockFrequency(void)
Get the most recent compatibility-clock request.
int kscePowerGetDmac5ClockFrequency(void)
Get the applied DMAC5 clock frequency.
int kscePowerGetGpuXbarClockFrequency(void)
Returns GPU crossbar clock frequency.
int kscePowerGetGpuXbarClockFrequencyProc(ScePID pid)
Get one process's GPU-crossbar clock request.
SceUInt32 remaining_capacity
Initial remaining capacity in mAh. See kscePowerSetBatteryFakeStatus.
Definition power.h:244
SceBool kscePowerIsBatteryCharging(void)
Returns battery charging status.
int kscePowerSetStandbyButtonPushTime(int push_time_us)
Set the standby/power button hold threshold.
int kscePowerGetVipClockFrequency(void)
Get the most recent VIP-clock request.
int kscePowerSetDmac5ClockFrequency(int frequency)
Set the DMAC5 clock.
int kscePowerSetVipClockFrequency(int frequency)
Set the VIP clock request.
int kscePowerSetGpuClockFrequencyProc(ScePID pid, int frequency)
Set one process's GPU-clock request.
int kscePowerBatteryStopUsbCharging(void)
Request that Syscon stop USB charging immediately.
int kscePowerRequestStandby(void)
Requests PS Vita to go into standby.
SceBool kscePowerIsSuspendRequired(void)
Check if a suspend is required.
int kscePowerRequestSuspend(void)
Requests PS Vita to suspend.
int kscePowerRequestDisplayOn(void)
Request that the display be turned on.
int kscePowerGetPowerSwMode(void)
Get the combined power-switch policy.
int kscePowerWlanDeactivate(void)
Clear ScePower's software WLAN-active flag.
int kscePowerRequestDisplayOff(void)
Request display off.
int kscePowerGetCameraBusClockFrequency(void)
Get the applied camera-bus clock frequency.
void(* ScePowerIdleCallback)(SceUInt32 index, SceUInt32 idle_time, void *user_data)
Idle callback called by ScePower's periodic idle worker.
Definition power.h:259
int kscePowerGetBusClockFrequency(void)
Returns BUS clock frequency.
int kscePowerWlanActivate(void)
Set ScePower's software WLAN-active flag.
int kscePowerSetPsButtonPushTime(int push_time_us)
Set the PS button hold threshold.
int kscePowerBatteryDisableUsbCharging(void)
Clear ScePower's USB-charging request.
int kscePowerBatteryPermitCharging(void)
Decrement the reference count that prevents charging, if it is nonzero.
int kscePowerGetBatteryLifeTime(void)
Returns battery life time.
int kscePowerTick(SceUInt32 type)
Record activity for ScePower idle tracking.
int kscePowerSetDisplayMaxBrightness(int max_brightness)
Set the maximum display brightness.
int kscePowerSetProcessIdleCallback(ScePowerProcessIdleCallback callback, void *user_data)
Install the process-idle callback used for every tracked process.
@ SCE_POWER_BATTERY_USB_STATUS_SUSPENDED
USB suspend or charging-stop state.
Definition power.h:232
@ SCE_POWER_BATTERY_USB_STATUS_CONFIGURED
Configured bus or configured resume.
Definition power.h:231
@ SCE_POWER_BATTERY_USB_STATUS_ACTIVE
Controller activation, bus reset, or unconfigured resume.
Definition power.h:230
@ SCE_POWER_BATTERY_USB_STATUS_DISCONNECTED
Controller teardown or disconnect.
Definition power.h:229
Simulated battery state used by kscePowerSetBatteryFakeStatus.
Definition power.h:242
int ScePID
Process ID.
Definition types.h:91
int SceBool
Definition types.h:59
int32_t SceInt32
Definition types.h:44
unsigned int SceSize
Definition types.h:56
int SceUID
UIDs are used to describe many different kernel objects.
Definition types.h:90
uint64_t SceUInt64
Definition types.h:51
uint32_t SceUInt32
Definition types.h:45