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.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libopie2/opiecore/device/odevice_ramses.cpp b/libopie2/opiecore/device/odevice_ramses.cpp
index 5bcf6a9..77de8c5 100644
--- a/libopie2/opiecore/device/odevice_ramses.cpp
+++ b/libopie2/opiecore/device/odevice_ramses.cpp
@@ -8,96 +8,99 @@
8.> <`_,   >  .   <= redistribute it and/or modify it under 8.> <`_,   >  .   <= redistribute it and/or modify it under
9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public 9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
10.="- .-=="i,     .._ License as published by the Free Software 10.="- .-=="i,     .._ License as published by the Free Software
11 - .   .-<_>     .<> Foundation; either version 2 of the License, 11 - .   .-<_>     .<> Foundation; either version 2 of the License,
12     ._= =}       : or (at your option) any later version. 12     ._= =}       : or (at your option) any later version.
13    .%`+i>       _;_. 13    .%`+i>       _;_.
14    .i_,=:_.      -<s. This program is distributed in the hope that 14    .i_,=:_.      -<s. This program is distributed in the hope that
15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
16    : ..    .:,     . . . without even the implied warranty of 16    : ..    .:,     . . . without even the implied warranty of
17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.=       =       ; Library General Public License for more 19..}^=.=       =       ; Library General Public License for more
20++=   -.     .`     .: details. 20++=   -.     .`     .: details.
21 :     =  ...= . :.=- 21 :     =  ...= . :.=-
22 -.   .:....=;==+<; You should have received a copy of the GNU 22 -.   .:....=;==+<; You should have received a copy of the GNU
23  -_. . .   )=.  = Library General Public License along with 23  -_. . .   )=.  = Library General Public License along with
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;
57using namespace Opie::Core::Private;
58
56struct r_button ramses_buttons [] = { 59struct r_button ramses_buttons [] = {
57 { Model_Ramses_MNCI, 60 { Model_Ramses_MNCI,
58 Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), 61 Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"),
59 "devicebuttons/z_menu", 62 "devicebuttons/z_menu",
60 "QPE/TaskBar", "toggleMenu()", 63 "QPE/TaskBar", "toggleMenu()",
61 "QPE/TaskBar", "toggleStartMenu()" }, 64 "QPE/TaskBar", "toggleStartMenu()" },
62 { Model_Ramses_MNCI, 65 { Model_Ramses_MNCI,
63 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), 66 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"),
64 "devicebuttons/ipaq_home", 67 "devicebuttons/ipaq_home",
65 "QPE/Launcher", "home()", 68 "QPE/Launcher", "home()",
66 "buttonsettings", "raise()" }, 69 "buttonsettings", "raise()" },
67}; 70};
68 71
69void Ramses::init() 72void Ramses::init()
70{ 73{
71 d->m_vendorstr = "M und N"; 74 d->m_vendorstr = "M und N";
72 d->m_vendor = Vendor_MundN; 75 d->m_vendor = Vendor_MundN;
73 76
74 QFile f("/proc/sys/board/ramses"); 77 QFile f("/proc/sys/board/ramses");
75 78
76 d->m_modelstr = "Ramses"; 79 d->m_modelstr = "Ramses";
77 d->m_model = Model_Ramses_MNCI; 80 d->m_model = Model_Ramses_MNCI;
78 81
79 d->m_rotation = Rot0; 82 d->m_rotation = Rot0;
80 d->m_holdtime = 1000; 83 d->m_holdtime = 1000;
81 84
82 f.setName("/etc/oz_version"); 85 f.setName("/etc/oz_version");
83 86
84 if (f.open(IO_ReadOnly)) { 87 if (f.open(IO_ReadOnly)) {
85 d->m_systemstr = "OpenEmbedded/Ramses"; 88 d->m_systemstr = "OpenEmbedded/Ramses";
86 d->m_system = System_OpenZaurus; 89 d->m_system = System_OpenZaurus;
87 90
88 QTextStream ts(&f); 91 QTextStream ts(&f);
89 ts.setDevice(&f); 92 ts.setDevice(&f);
90 d->m_sysverstr = ts.readLine(); 93 d->m_sysverstr = ts.readLine();
91 f.close(); 94 f.close();
92 } 95 }
93 96
94 m_power_timer = 0; 97 m_power_timer = 0;
95 98
96#ifdef QT_QWS_ALLOW_OVERCLOCK 99#ifdef QT_QWS_ALLOW_OVERCLOCK
97#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 ***
98#define OC(x...) x 101#define OC(x...) x
99#else 102#else
100#define OC(x...) 103#define OC(x...)
101#endif 104#endif
102 105
103 // This table is true for a Intel XScale PXA 255 106 // This table is true for a Intel XScale PXA 255