00001 /* 00002 * This file is part of contentLister. 00003 * 00004 * contentLister is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation, either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * contentLister is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00028 /* contentLister - A GTK based content lister (read only) application on the eReader platform 00029 * Copyright (C) 2006-2008 iRex Technologies 00030 * All rights reserved. 00031 * 00032 */ 00033 00034 // config.h is generated based on the directives placed in the configure.ac 00035 // file and user input supplied to the configure script 00036 #include <config.h> 00037 00038 #include <liberipc/eripc.h> 00039 #include <liberipc/eripcpowermgr.h> 00040 00041 #include "powerManager.h" 00042 00043 00044 static erClientChannel_t powerChannel; 00045 00046 int power_init() 00047 { 00048 return erIpcStartClient(ER_POWERMGR_CHANNEL, &powerChannel); 00049 } 00050 00051 void power_cpu_full() 00052 { 00053 pwrGotoIdleMode(powerChannel, CPU_FULL_SPEED_FREQUENCY, CPU_FULL_SPEED_TIMEOUT); 00054 } 00055 00056 void power_cpu_half() 00057 { 00058 pwrGotoIdleMode(powerChannel, CPU_HALF_SPEED_FREQUENCY, CPU_HALF_SPEED_TIMEOUT); 00059 } 00060 00061 void power_cpu_idle() 00062 { 00063 pwrGotoIdleMode(powerChannel, CPU_IDLE_SPEED_FREQUENCY, CPU_IDLE_SPEED_TIMEOUT); 00064 } 00065 00066 // TODO: More powerManagement functionality needs to be implemented here...