summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_ramses.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_ramses.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_ramses.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_ramses.cpp b/libopie2/opiecore/device/odevice_ramses.cpp
index 10b7b61..32467f1 100644
--- a/libopie2/opiecore/device/odevice_ramses.cpp
+++ b/libopie2/opiecore/device/odevice_ramses.cpp
@@ -24,97 +24,97 @@
24    --        :-=` this library; see the file COPYING.LIB. 24    --        :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28*/ 28*/
29 29
30#include "odevice_ramses.h" 30#include "odevice_ramses.h"
31 31
32/* QT */ 32/* QT */
33#include <qapplication.h> 33#include <qapplication.h>
34#include <qfile.h> 34#include <qfile.h>
35#include <qtextstream.h> 35#include <qtextstream.h>
36#include <qwindowsystem_qws.h> 36#include <qwindowsystem_qws.h>
37 37
38/* OPIE */ 38/* OPIE */
39#include <qpe/config.h> 39#include <qpe/config.h>
40#include <qpe/resource.h> 40#include <qpe/resource.h>
41#include <qpe/sound.h> 41#include <qpe/sound.h>
42#include <qpe/qcopenvelope_qws.h> 42#include <qpe/qcopenvelope_qws.h>
43 43
44/* STD */ 44/* STD */
45#include <fcntl.h> 45#include <fcntl.h>
46#include <math.h> 46#include <math.h>
47#include <stdlib.h> 47#include <stdlib.h>
48#include <signal.h> 48#include <signal.h>
49#include <sys/ioctl.h> 49#include <sys/ioctl.h>
50#include <sys/time.h> 50#include <sys/time.h>
51#include <unistd.h> 51#include <unistd.h>
52#ifndef QT_NO_SOUND 52#ifndef QT_NO_SOUND
53#include <linux/soundcard.h> 53#include <linux/soundcard.h>
54#endif 54#endif
55 55
56using namespace Opie::Core; 56using namespace Opie::Core;
57using namespace Opie::Core::Internal; 57using namespace Opie::Core::Internal;
58 58
59struct r_button ramses_buttons [] = { 59struct r_button ramses_buttons [] = {
60 { Model_Ramses_MNCI, 60 { Model_Ramses_MNCI,
61 Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), 61 Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"),
62 "devicebuttons/z_menu", 62 "devicebuttons/z_menu",
63 "QPE/TaskBar", "toggleMenu()", 63 "QPE/TaskBar", "toggleMenu()",
64 "QPE/TaskBar", "toggleStartMenu()" }, 64 "QPE/TaskBar", "toggleStartMenu()" },
65 { Model_Ramses_MNCI, 65 { Model_Ramses_MNCI,
66 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), 66 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"),
67 "devicebuttons/ipaq_home", 67 "devicebuttons/ipaq_home",
68 "QPE/Launcher", "home()", 68 "QPE/Launcher", "home()",
69 "buttonsettings", "raise()" }, 69 "buttonsettings", "raise()" },
70}; 70};
71 71
72void Ramses::init() 72void Ramses::init(const QString&)
73{ 73{
74 d->m_vendorstr = "M und N"; 74 d->m_vendorstr = "M und N";
75 d->m_vendor = Vendor_MundN; 75 d->m_vendor = Vendor_MundN;
76 76
77 QFile f("/proc/sys/board/ramses"); 77 QFile f("/proc/sys/board/ramses");
78 78
79 d->m_modelstr = "Ramses"; 79 d->m_modelstr = "Ramses";
80 d->m_model = Model_Ramses_MNCI; 80 d->m_model = Model_Ramses_MNCI;
81 81
82 d->m_rotation = Rot0; 82 d->m_rotation = Rot0;
83 d->m_holdtime = 1000; 83 d->m_holdtime = 1000;
84 84
85 f.setName("/etc/oz_version"); 85 f.setName("/etc/oz_version");
86 86
87 if (f.open(IO_ReadOnly)) { 87 if (f.open(IO_ReadOnly)) {
88 d->m_systemstr = "OpenEmbedded/Ramses"; 88 d->m_systemstr = "OpenEmbedded/Ramses";
89 d->m_system = System_OpenZaurus; 89 d->m_system = System_OpenZaurus;
90 90
91 QTextStream ts(&f); 91 QTextStream ts(&f);
92 ts.setDevice(&f); 92 ts.setDevice(&f);
93 d->m_sysverstr = ts.readLine(); 93 d->m_sysverstr = ts.readLine();
94 f.close(); 94 f.close();
95 } 95 }
96 96
97 m_power_timer = 0; 97 m_power_timer = 0;
98 98
99#ifdef QT_QWS_ALLOW_OVERCLOCK 99#ifdef QT_QWS_ALLOW_OVERCLOCK
100#warning *** Overclocking enabled - this may fry your hardware - you have been warned *** 100#warning *** Overclocking enabled - this may fry your hardware - you have been warned ***
101#define OC(x...) x 101#define OC(x...) x
102#else 102#else
103#define OC(x...) 103#define OC(x...)
104#endif 104#endif
105 105
106 // This table is true for a Intel XScale PXA 255 106 // This table is true for a Intel XScale PXA 255
107 107
108 d->m_cpu_frequencies->append("99000"); // mem= 99, run= 99, turbo= 99, PXbus= 50 108 d->m_cpu_frequencies->append("99000"); // mem= 99, run= 99, turbo= 99, PXbus= 50
109OC(d->m_cpu_frequencies->append("118000"); ) // mem=118, run=118, turbo=118, PXbus= 59 OC'd mem 109OC(d->m_cpu_frequencies->append("118000"); ) // mem=118, run=118, turbo=118, PXbus= 59 OC'd mem
110 d->m_cpu_frequencies->append("199100"); // mem= 99, run=199, turbo=199, PXbus= 99 110 d->m_cpu_frequencies->append("199100"); // mem= 99, run=199, turbo=199, PXbus= 99
111OC(d->m_cpu_frequencies->append("236000"); ) // mem=118, run=236, turbo=236, PXbus=118 OC'd mem 111OC(d->m_cpu_frequencies->append("236000"); ) // mem=118, run=236, turbo=236, PXbus=118 OC'd mem
112 d->m_cpu_frequencies->append("298600"); // mem= 99, run=199, turbo=298, PXbus= 99 112 d->m_cpu_frequencies->append("298600"); // mem= 99, run=199, turbo=298, PXbus= 99
113OC(d->m_cpu_frequencies->append("354000"); ) // mem=118, run=236, turbo=354, PXbus=118 OC'd mem 113OC(d->m_cpu_frequencies->append("354000"); ) // mem=118, run=236, turbo=354, PXbus=118 OC'd mem
114 d->m_cpu_frequencies->append("398099"); // mem= 99, run=199, turbo=398, PXbus= 99 114 d->m_cpu_frequencies->append("398099"); // mem= 99, run=199, turbo=398, PXbus= 99
115 d->m_cpu_frequencies->append("398100"); // mem= 99, run=398, turbo=398, PXbus=196 115 d->m_cpu_frequencies->append("398100"); // mem= 99, run=398, turbo=398, PXbus=196
116OC(d->m_cpu_frequencies->append("471000"); ) // mem=118, run=471, turbo=471, PXbus=236 OC'd mem/core/bus 116OC(d->m_cpu_frequencies->append("471000"); ) // mem=118, run=471, turbo=471, PXbus=236 OC'd mem/core/bus
117 117
118} 118}
119 119
120bool Ramses::filter(int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat) 120bool Ramses::filter(int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat)