author | schurig <schurig> | 2003-06-10 16:35:43 (UTC) |
---|---|---|
committer | schurig <schurig> | 2003-06-10 16:35:43 (UTC) |
commit | d2f78d2aba17a491739d10bd73f6fce033849537 (patch) (side-by-side diff) | |
tree | 0d8e5683afaa6da476001e00fc6db2ebc5c1a0df /libopie/odevice.cpp | |
parent | 8ffea5d37080bd173d55a458296c1fc461a54d13 (diff) | |
download | opie-d2f78d2aba17a491739d10bd73f6fce033849537.zip opie-d2f78d2aba17a491739d10bd73f6fce033849537.tar.gz opie-d2f78d2aba17a491739d10bd73f6fce033849537.tar.bz2 |
renamed frequency access methods
-rw-r--r-- | libopie/odevice.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 4c33a0e..d6e6892 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -762,46 +762,46 @@ bool ODevice::hasLightSensor ( ) const * @return a value from the light senso */ int ODevice::readLightSensor ( ) { return -1; } /** * @return the light sensor resolution whatever that is ;) */ int ODevice::lightSensorResolution ( ) const { return 0; } /** - * @return a list with valid CPU frequency + * @return a list with CPU frequencies supported by the hardware */ -QStrList &ODevice::cpuFrequencies ( ) const +const QStrList &ODevice::allowedCpuFrequencies ( ) const { return *d->m_cpu_frequencies; } /** - * Set desired cpu frequency + * Set desired CPU frequency * * @param index index into d->m_cpu_frequencies of the frequency to be set */ -bool ODevice::setCpuFrequency(uint index) +bool ODevice::setCurrentCpuFrequency(uint index) { if (index >= d->m_cpu_frequencies->count()) return false; char *freq = d->m_cpu_frequencies->at(index); qWarning("set freq to %s", freq); int fd; if ((fd = ::open("/proc/sys/cpu/0/speed", O_WRONLY)) >= 0) { char writeCommand[50]; const int count = sprintf(writeCommand, "%s\n", freq); int res = (::write(fd, writeCommand, count) != -1); ::close(fd); return res; } |