PSPSDK 2024-12-24
|
#include <pspkerneltypes.h>
Go to the source code of this file.
Macros | |
#define | PSP_POWER_CB_POWER_SWITCH 0x80000000 |
Power callback flags. | |
#define | PSP_POWER_CB_HOLD_SWITCH 0x40000000 |
#define | PSP_POWER_CB_STANDBY 0x00080000 |
#define | PSP_POWER_CB_RESUME_COMPLETE 0x00040000 |
#define | PSP_POWER_CB_RESUMING 0x00020000 |
#define | PSP_POWER_CB_SUSPENDING 0x00010000 |
#define | PSP_POWER_CB_AC_POWER 0x00001000 |
#define | PSP_POWER_CB_BATTERY_LOW 0x00000100 |
#define | PSP_POWER_CB_BATTERY_EXIST 0x00000080 |
#define | PSP_POWER_CB_BATTPOWER 0x0000007F |
#define | PSP_POWER_TICK_ALL 0 |
Power tick flags. | |
#define | PSP_POWER_TICK_SUSPEND 1 |
#define | PSP_POWER_TICK_DISPLAY 6 |
Typedefs | |
typedef void(* | powerCallback_t) (int unknown, int powerInfo) |
Power Callback Function Definition. | |
Functions | |
int | scePowerRegisterCallback (int slot, SceUID cbid) |
Register Power Callback Function. | |
int | scePowerUnregisterCallback (int slot) |
Unregister Power Callback Function. | |
int | scePowerIsPowerOnline (void) |
Check if unit is plugged in. | |
int | scePowerIsBatteryExist (void) |
Check if a battery is present. | |
int | scePowerIsBatteryCharging (void) |
Check if the battery is charging. | |
int | scePowerGetBatteryChargingStatus (void) |
Get the status of the battery charging. | |
int | scePowerIsLowBattery (void) |
Check if the battery is low. | |
int | scePowerIsSuspendRequired (void) |
Check if a suspend is required. | |
int | scePowerGetBatteryRemainCapacity (void) |
Returns battery remaining capacity. | |
int | scePowerGetBatteryFullCapacity (void) |
Returns battery full capacity. | |
int | scePowerGetBatteryLifePercent (void) |
Get battery life as integer percent. | |
int | scePowerGetBatteryLifeTime (void) |
Get battery life as time. | |
int | scePowerGetBatteryTemp (void) |
Get temperature of the battery. | |
int | scePowerGetBatteryElec (void) |
unknown? - crashes PSP in usermode | |
int | scePowerGetBatteryVolt (void) |
Get battery volt level. | |
int | scePowerSetCpuClockFrequency (int cpufreq) |
Set CPU Frequency. | |
int | scePowerSetBusClockFrequency (int busfreq) |
Set Bus Frequency. | |
int | scePowerGetCpuClockFrequency (void) |
Alias for scePowerGetCpuClockFrequencyInt. | |
int | scePowerGetCpuClockFrequencyInt (void) |
Get CPU Frequency as Integer. | |
float | scePowerGetCpuClockFrequencyFloat (void) |
Get CPU Frequency as Float. | |
int | scePowerGetBusClockFrequency (void) |
Alias for scePowerGetBusClockFrequencyInt. | |
int | scePowerGetBusClockFrequencyInt (void) |
Get Bus fequency as Integer. | |
float | scePowerGetBusClockFrequencyFloat (void) |
Get Bus frequency as Float. | |
int | scePowerSetClockFrequency (int pllfreq, int cpufreq, int busfreq) |
Set Clock Frequencies. | |
int | scePowerLock (int unknown) |
Lock power switch. | |
int | scePowerUnlock (int unknown) |
Unlock power switch. | |
int | scePowerTick (int type) |
Generate a power tick, preventing unit from powering off and turning off display. | |
int | scePowerGetIdleTimer (void) |
Get Idle timer. | |
int | scePowerIdleTimerEnable (int unknown) |
Enable Idle timer. | |
int | scePowerIdleTimerDisable (int unknown) |
Disable Idle timer. | |
int | scePowerRequestStandby (void) |
Request the PSP to go into standby. | |
int | scePowerRequestSuspend (void) |
Request the PSP to go into suspend. | |
#define PSP_POWER_CB_AC_POWER 0x00001000 |
#define PSP_POWER_CB_BATTERY_EXIST 0x00000080 |
#define PSP_POWER_CB_BATTERY_LOW 0x00000100 |
#define PSP_POWER_CB_BATTPOWER 0x0000007F |
#define PSP_POWER_CB_HOLD_SWITCH 0x40000000 |
#define PSP_POWER_CB_POWER_SWITCH 0x80000000 |
Power callback flags.
#define PSP_POWER_CB_RESUME_COMPLETE 0x00040000 |
#define PSP_POWER_CB_RESUMING 0x00020000 |
#define PSP_POWER_CB_STANDBY 0x00080000 |
#define PSP_POWER_CB_SUSPENDING 0x00010000 |
#define PSP_POWER_TICK_ALL 0 |
Power tick flags.
#define PSP_POWER_TICK_DISPLAY 6 |
#define PSP_POWER_TICK_SUSPEND 1 |
Power Callback Function Definition.
unknown | - unknown function, appears to cycle between 1,2 and 3 |
powerInfo | - combination of PSP_POWER_CB_ flags |
Returns battery full capacity.
Get battery life as integer percent.
Get battery life as time.
Returns battery remaining capacity.
Alias for scePowerGetBusClockFrequencyInt.
Get Bus frequency as Float.
Alias for scePowerGetCpuClockFrequencyInt.
Get CPU Frequency as Float.
Check if the battery is charging.
Check if a battery is present.
Check if the battery is low.
Check if unit is plugged in.
Check if a suspend is required.
Lock power switch.
Note: if the power switch is toggled while locked it will fire immediately after being unlocked.
unknown | - pass 0 |
Register Power Callback Function.
slot | - slot of the callback in the list, 0 to 15, pass -1 to get an auto assignment. |
cbid | - callback id from calling sceKernelCreateCallback |
Set Bus Frequency.
busfreq | - new BUS frequency, valid values are 1 - 167 |
Set Clock Frequencies.
pllfreq | - pll frequency, valid from 19-333 |
cpufreq | - cpu frequency, valid from 1-333 |
busfreq | - bus frequency, valid from 1-167 |
and:
cpufreq <= pllfreq busfreq*2 <= pllfreq
Set CPU Frequency.
cpufreq | - new CPU frequency, valid values are 1 - 333 |
Generate a power tick, preventing unit from powering off and turning off display.
type | - Either PSP_POWER_TICK_ALL, PSP_POWER_TICK_SUSPEND or PSP_POWER_TICK_DISPLAY |
Unlock power switch.
unknown | - pass 0 |