psppower.h

Go to the documentation of this file.
00001 /*
00002  * PSP Software Development Kit - http://www.pspdev.org
00003  * -----------------------------------------------------------------------
00004  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
00005  *
00006  * psppower.h - Prototypes for the scePower library.
00007  *
00008  * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
00009  * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
00010  * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
00011  *
00012  * $Id: psppower.h 2209 2007-03-22 19:24:28Z jim $
00013  */
00014 #ifndef __POWER_H__
00015 #define __POWER_H__
00016 
00017 #include <pspkerneltypes.h>
00018 
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022 
00026  /*indicates the power switch it pushed, putting the unit into suspend mode*/
00027 #define PSP_POWER_CB_POWER_SWITCH       0x80000000
00028 /*indicates the hold switch is on*/
00029 #define PSP_POWER_CB_HOLD_SWITCH        0x40000000
00030 /*what is standby mode?*/
00031 #define PSP_POWER_CB_STANDBY            0x00080000
00032 /*indicates the resume process has been completed (only seems to be triggered when another event happens)*/
00033 #define PSP_POWER_CB_RESUME_COMPLETE    0x00040000
00034 /*indicates the unit is resuming from suspend mode*/
00035 #define PSP_POWER_CB_RESUMING           0x00020000
00036 /*indicates the unit is suspending, seems to occur due to inactivity*/
00037 #define PSP_POWER_CB_SUSPENDING         0x00010000
00038 /*indicates the unit is plugged into an AC outlet*/
00039 #define PSP_POWER_CB_AC_POWER           0x00001000
00040 /*indicates the battery charge level is low*/
00041 #define PSP_POWER_CB_BATTERY_LOW        0x00000100
00042 /*indicates there is a battery present in the unit*/
00043 #define PSP_POWER_CB_BATTERY_EXIST      0x00000080
00044 /*unknown*/
00045 #define PSP_POWER_CB_BATTPOWER          0x0000007F
00046 
00053 typedef void (*powerCallback_t)(int unknown, int powerInfo);
00054 
00061 int scePowerRegisterCallback(int slot, SceUID cbid);
00062 
00066 int scePowerIsPowerOnline(void);
00067 
00071 int scePowerIsBatteryExist(void);
00072 
00076 int scePowerIsBatteryCharging(void);
00077 
00081 int scePowerGetBatteryChargingStatus(void);
00082 
00086 int scePowerIsLowBattery(void);
00087 
00092 int scePowerGetBatteryLifePercent(void);
00093 
00097 int scePowerGetBatteryLifeTime(void);
00098 
00102 int scePowerGetBatteryTemp(void);
00103 
00107 int scePowerGetBatteryElec(void);
00108 
00112 int scePowerGetBatteryVolt(void);
00113 
00118 int scePowerSetCpuClockFrequency(int cpufreq);
00119 
00124 int scePowerSetBusClockFrequency(int busfreq);
00125 
00130 int scePowerGetCpuClockFrequency(void);
00131 
00136 int scePowerGetCpuClockFrequencyInt(void);
00137 
00142 float scePowerGetCpuClockFrequencyFloat(void);
00143 
00148 int scePowerGetBusClockFrequency(void);
00149 
00154 int scePowerGetBusClockFrequencyInt(void);
00155 
00160 float scePowerGetBusClockFrequencyFloat(void);
00161 
00175 int scePowerSetClockFrequency(int pllfreq, int cpufreq, int busfreq);
00176 
00185 int scePowerLock(int unknown);
00186 
00192 int scePowerUnlock(int unknown);
00193 
00200 int scePowerTick(int unknown);
00201 
00206 int scePowerGetIdleTimer(void);
00207 
00213 int scePowerIdleTimerEnable(int unknown);
00214 
00220 int scePowerIdleTimerDisable(int unknown);
00221 
00227 int scePowerRequestStandby(void);
00228 
00234 int scePowerRequestSuspend(void);
00235 
00236 
00237 #ifdef __cplusplus
00238 }
00239 #endif
00240 
00241 #endif

Generated on Tue Jul 24 15:21:23 2007 for PSPSDK-Rev2272 by  doxygen 1.5.2