summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_ramses.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/libopie2/opiecore/device/odevice_ramses.cpp b/libopie2/opiecore/device/odevice_ramses.cpp
index c75ea3a..a060695 100644
--- a/libopie2/opiecore/device/odevice_ramses.cpp
+++ b/libopie2/opiecore/device/odevice_ramses.cpp
@@ -75,85 +75,83 @@ void Ramses::init(const QString&)
d->m_holdtime = 500;
// This table is true for a Intel XScale PXA 255
#ifdef QT_QWS_ALLOW_OVERCLOCK
#define OC(x...) x
#else
#define OC(x...)
#endif
d->m_cpu_frequencies->append("99000"); // mem= 99, run= 99, turbo= 99, PXbus= 50
OC(d->m_cpu_frequencies->append("118000"); ) // mem=118, run=118, turbo=118, PXbus= 59 OC'd mem
d->m_cpu_frequencies->append("199100"); // mem= 99, run=199, turbo=199, PXbus= 99
OC(d->m_cpu_frequencies->append("236000"); ) // mem=118, run=236, turbo=236, PXbus=118 OC'd mem
d->m_cpu_frequencies->append("298600"); // mem= 99, run=199, turbo=298, PXbus= 99
OC(d->m_cpu_frequencies->append("354000"); ) // mem=118, run=236, turbo=354, PXbus=118 OC'd mem
d->m_cpu_frequencies->append("398099"); // mem= 99, run=199, turbo=398, PXbus= 99
d->m_cpu_frequencies->append("398100"); // mem= 99, run=398, turbo=398, PXbus=196
OC(d->m_cpu_frequencies->append("471000"); ) // mem=118, run=471, turbo=471, PXbus=236 OC'd mem/core/bus
}
void Ramses::playAlarmSound()
{
#ifndef QT_NO_SOUND
static Sound snd ( "alarm" );
if(!snd.isFinished())
return;
changeMixerForAlarm( 0, "/dev/sound/mixer" , &snd);
snd.play();
-#else
-#error QT_NO_SOUND defined
#endif
}
bool Ramses::suspend()
{
if ( !isQWS( ) ) // only qwsserver is allowed to suspend
return false;
sendSuspendmsg();
::sync();
int fd;
if ((fd = ::open("/proc/sys/pm/suspend", O_WRONLY)) >= 0) {
char writeCommand[] = "1\n";
::write(fd, writeCommand, sizeof(writeCommand) );
::close(fd);
}
-
+
::usleep ( 200 * 1000 );
return true;
}
bool Ramses::setDisplayBrightness(int bright)
{
//qDebug("Ramses::setDisplayBrightness(%d)", bright);
bool res = false;
int fd;
// pwm1 brighness: 20 steps 500..0 (dunkel->hell)
if (bright > 255 )
bright = 255;
if (bright < 0)
bright = 0;
// Turn backlight completely off if brightness=0
if ((fd = ::open("/proc/sys/board/lcd_backlight", O_WRONLY)) >= 0) {
char writeCommand[10];
const int count = sprintf(writeCommand, "%d\n", bright ? 1 : 0);
res = (::write(fd, writeCommand, count) != -1);
::close(fd);
}
if ((fd = ::open("/proc/sys/board/lcd_brightness", O_WRONLY)) >= 0) {
char writeCommand[10];
const int count = sprintf(writeCommand, "%d\n", bright);
res = (::write(fd, writeCommand, count) != -1);
::close(fd);
}