Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

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 1095 2005-09-27 21:02:16Z jim $
00013  */
00014 #ifndef __POWER_H__
00015 #define __POWER_H__
00016 
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020 
00024  /*indicates the power switch it pushed, putting the unit into suspend mode*/
00025 #define PSP_POWER_CB_POWER_SWITCH       0x80000000
00026 /*indicates the hold switch is on*/
00027 #define PSP_POWER_CB_HOLD_SWITCH        0x40000000
00028 /*what is standby mode?*/
00029 #define PSP_POWER_CB_STANDBY            0x00080000
00030 /*indicates the resume process has been completed (only seems to be triggered when another event happens)*/
00031 #define PSP_POWER_CB_RESUME_COMPLETE    0x00040000
00032 /*indicates the unit is resuming from suspend mode*/
00033 #define PSP_POWER_CB_RESUMING           0x00020000
00034 /*indicates the unit is suspending, seems to occur due to inactivity*/
00035 #define PSP_POWER_CB_SUSPENDING         0x00010000
00036 /*indicates the unit is plugged into an AC outlet*/
00037 #define PSP_POWER_CB_AC_POWER           0x00001000
00038 /*indicates the battery charge level is low*/
00039 #define PSP_POWER_CB_BATTERY_LOW        0x00000100
00040 /*indicates there is a battery present in the unit*/
00041 #define PSP_POWER_CB_BATTERY_EXIST      0x00000080
00042 /*unknown*/
00043 #define PSP_POWER_CB_BATTPOWER          0x0000007F
00044 
00051 typedef void (*powerCallback_t)(int unknown, int powerInfo);
00052 
00059 int scePowerRegisterCallback(int slot, SceUID cbid);
00060 
00064 int scePowerIsPowerOnline(void);
00065 
00069 int scePowerIsBatteryExist(void);
00070 
00074 int scePowerIsBatteryCharging(void);
00075 
00079 int scePowerGetBatteryChargingStatus(void);
00080 
00084 int scePowerIsLowBattery(void);
00085 
00090 int scePowerGetBatteryLifePercent(void);
00091 
00095 int scePowerGetBatteryLifeTime(void);
00096 
00100 int scePowerGetBatteryTemp(void);
00101 
00105 int scePowerGetBatteryElec(void);
00106 
00110 int scePowerGetBatteryVolt(void);
00111 
00116 int scePowerSetCpuClockFrequency(int cpufreq);
00117 
00122 int scePowerSetBusClockFrequency(int busfreq);
00123 
00128 int scePowerGetCpuClockFrequency(void);
00129 
00134 int scePowerGetCpuClockFrequencyInt(void);
00135 
00140 float scePowerGetCpuClockFrequencyFloat(void);
00141 
00146 int scePowerGetBusClockFrequency(void);
00147 
00152 int scePowerGetBusClockFrequencyInt(void);
00153 
00158 float scePowerGetBusClockFrequencyFloat(void);
00159 
00171 int scePowerSetClockFrequency(int cpufreq, int ramfreq, int busfreq);
00172 
00181 int scePowerLock(int unknown);
00182 
00188 int scePowerUnlock(int unknown);
00189 
00196 int scePowerTick(int unknown);
00197 
00202 int scePowerGetIdleTimer(void);
00203 
00209 int scePowerIdleTimerEnable(int unknown);
00210 
00216 int scePowerIdleTimerDisable(int unknown);
00217 
00218 #ifdef __cplusplus
00219 }
00220 #endif
00221 
00222 #endif

Generated on Wed Sep 28 07:52:08 2005 for pspsdk-1.0+beta by  doxygen 1.4.4