pspsdk-1.0+beta2
|
#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 | 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 |
typedef void(* powerCallback_t)(int unknown, int powerInfo) |
Power Callback Function Definition.
unknown | - unknown function, appears to cycle between 1,2 and 3 |
powerInfo | - combination of PSP_POWER_CB_ flags |
int scePowerGetBatteryChargingStatus | ( | void | ) |
Get the status of the battery charging.
int scePowerGetBatteryElec | ( | void | ) |
unknown? - crashes PSP in usermode
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 scePowerGetBatteryVolt | ( | void | ) |
Get battery volt level.
int scePowerGetBusClockFrequency | ( | void | ) |
Alias for scePowerGetBusClockFrequencyInt.
float scePowerGetBusClockFrequencyFloat | ( | void | ) |
Get Bus frequency as Float.
int scePowerGetBusClockFrequencyInt | ( | void | ) |
Get Bus fequency as Integer.
int scePowerGetCpuClockFrequency | ( | void | ) |
Alias for scePowerGetCpuClockFrequencyInt.
float scePowerGetCpuClockFrequencyFloat | ( | void | ) |
Get CPU Frequency as Float.
int scePowerGetCpuClockFrequencyInt | ( | void | ) |
Get CPU Frequency as Integer.
int scePowerGetIdleTimer | ( | void | ) |
Get Idle timer.
int scePowerIdleTimerDisable | ( | int | unknown | ) |
Disable Idle timer.
unknown | - pass 0 |
int scePowerIdleTimerEnable | ( | int | unknown | ) |
Enable Idle timer.
unknown | - pass 0 |
int scePowerIsBatteryCharging | ( | void | ) |
Check if the battery is charging.
int scePowerIsBatteryExist | ( | void | ) |
Check if a battery is present.
int scePowerIsLowBattery | ( | void | ) |
Check if the battery is low.
int scePowerIsPowerOnline | ( | void | ) |
Check if unit is plugged in.
int scePowerLock | ( | int | unknown | ) |
Lock power switch.
Note: if the power switch is toggled while locked it will fire immediately after being unlocked.
unknown | - pass 0 |
int scePowerRegisterCallback | ( | int | slot, |
SceUID | cbid | ||
) |
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 |
int scePowerRequestStandby | ( | void | ) |
Request the PSP to go into standby.
int scePowerRequestSuspend | ( | void | ) |
Request the PSP to go into suspend.
int scePowerSetBusClockFrequency | ( | int | busfreq | ) |
Set Bus Frequency.
busfreq | - new BUS frequency, valid values are 1 - 167 |
int scePowerSetClockFrequency | ( | int | pllfreq, |
int | cpufreq, | ||
int | busfreq | ||
) |
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
int scePowerSetCpuClockFrequency | ( | int | cpufreq | ) |
Set CPU Frequency.
cpufreq | - new CPU frequency, valid values are 1 - 333 |
int scePowerTick | ( | int | type | ) |
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 |
int scePowerUnlock | ( | int | unknown | ) |
Unlock power switch.
unknown | - pass 0 |
int scePowerUnregisterCallback | ( | int | slot | ) |
Unregister Power Callback Function.
slot | - slot of the callback |