summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device
authoralwin <alwin>2004-03-02 12:14:15 (UTC)
committer alwin <alwin>2004-03-02 12:14:15 (UTC)
commit0d59c780513da78033f4d9040475dee9db0256d4 (patch) (unidiff)
tree503d320b4aa3daae9982082e7b34e3e2c48bdfb7 /libopie2/opiecore/device
parenta0981652d61776d70f25980f035748b21339e946 (diff)
downloadopie-0d59c780513da78033f4d9040475dee9db0256d4.zip
opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.gz
opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.bz2
run the optimize_connect script
the whole cvs is tagged with "before_optimize_connect" if there are problems you can check the diff (but it had compiled and run here)
Diffstat (limited to 'libopie2/opiecore/device') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice.cpp2
-rw-r--r--libopie2/opiecore/device/odevice_ipaq.cpp2
-rw-r--r--libopie2/opiecore/device/odevice_simpad.cpp2
-rw-r--r--libopie2/opiecore/device/odevice_yopy.cpp4
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp4
5 files changed, 7 insertions, 7 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp
index b8d48fe..27b0e53 100644
--- a/libopie2/opiecore/device/odevice.cpp
+++ b/libopie2/opiecore/device/odevice.cpp
@@ -132,33 +132,33 @@ void ODevice::init()
132} 132}
133 133
134/** 134/**
135* This method initialises the button mapping 135* This method initialises the button mapping
136*/ 136*/
137void ODevice::initButtons() 137void ODevice::initButtons()
138{ 138{
139 if ( d->m_buttons ) 139 if ( d->m_buttons )
140 return; 140 return;
141 141
142 qDebug ( "init Buttons" ); 142 qDebug ( "init Buttons" );
143 d->m_buttons = new QValueList <ODeviceButton>; 143 d->m_buttons = new QValueList <ODeviceButton>;
144 144
145 reloadButtonMapping(); 145 reloadButtonMapping();
146 146
147 QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); 147 QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
148 connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); 148 connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&)));
149} 149}
150 150
151ODevice::~ODevice() 151ODevice::~ODevice()
152{ 152{
153// we leak m_devicebuttons and m_cpu_frequency 153// we leak m_devicebuttons and m_cpu_frequency
154// but it's a singleton and it is not so importantant 154// but it's a singleton and it is not so importantant
155// -zecke 155// -zecke
156 delete d; 156 delete d;
157} 157}
158 158
159bool ODevice::setSoftSuspend ( bool /*soft*/ ) 159bool ODevice::setSoftSuspend ( bool /*soft*/ )
160{ 160{
161 return false; 161 return false;
162} 162}
163 163
164//#include <linux/apm_bios.h> 164//#include <linux/apm_bios.h>
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp
index cc4b01a..8ecea1b 100644
--- a/libopie2/opiecore/device/odevice_ipaq.cpp
+++ b/libopie2/opiecore/device/odevice_ipaq.cpp
@@ -199,33 +199,33 @@ void iPAQ::initButtons()
199 i_button *ib = ipaq_buttons + i; 199 i_button *ib = ipaq_buttons + i;
200 ODeviceButton b; 200 ODeviceButton b;
201 201
202 if (( ib->model & d->m_model ) == d->m_model ) { 202 if (( ib->model & d->m_model ) == d->m_model ) {
203 b. setKeycode ( ib->code ); 203 b. setKeycode ( ib->code );
204 b. setUserText ( QObject::tr ( "Button", ib->utext )); 204 b. setUserText ( QObject::tr ( "Button", ib->utext ));
205 b. setPixmap ( Resource::loadPixmap ( ib->pix )); 205 b. setPixmap ( Resource::loadPixmap ( ib->pix ));
206 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction )); 206 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction ));
207 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction )); 207 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction ));
208 208
209 d->m_buttons->append ( b ); 209 d->m_buttons->append ( b );
210 } 210 }
211 } 211 }
212 reloadButtonMapping(); 212 reloadButtonMapping();
213 213
214 QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); 214 QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
215 connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); 215 connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&)));
216} 216}
217 217
218QValueList <OLed> iPAQ::ledList() const 218QValueList <OLed> iPAQ::ledList() const
219{ 219{
220 QValueList <OLed> vl; 220 QValueList <OLed> vl;
221 vl << Led_Power; 221 vl << Led_Power;
222 222
223 if ( d->m_model == Model_iPAQ_H38xx ) 223 if ( d->m_model == Model_iPAQ_H38xx )
224 vl << Led_BlueTooth; 224 vl << Led_BlueTooth;
225 return vl; 225 return vl;
226} 226}
227 227
228QValueList <OLedState> iPAQ::ledStateList ( OLed l ) const 228QValueList <OLedState> iPAQ::ledStateList ( OLed l ) const
229{ 229{
230 QValueList <OLedState> vl; 230 QValueList <OLedState> vl;
231 231
diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp
index 31b9297..90aca2f 100644
--- a/libopie2/opiecore/device/odevice_simpad.cpp
+++ b/libopie2/opiecore/device/odevice_simpad.cpp
@@ -176,33 +176,33 @@ void SIMpad::initButtons()
176 s_button *sb = simpad_buttons + i; 176 s_button *sb = simpad_buttons + i;
177 ODeviceButton b; 177 ODeviceButton b;
178 178
179 if (( sb->model & d->m_model ) == d->m_model ) { 179 if (( sb->model & d->m_model ) == d->m_model ) {
180 b. setKeycode ( sb->code ); 180 b. setKeycode ( sb->code );
181 b. setUserText ( QObject::tr ( "Button", sb->utext )); 181 b. setUserText ( QObject::tr ( "Button", sb->utext ));
182 b. setPixmap ( Resource::loadPixmap ( sb->pix )); 182 b. setPixmap ( Resource::loadPixmap ( sb->pix ));
183 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( sb->fpressedservice ), sb->fpressedaction )); 183 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( sb->fpressedservice ), sb->fpressedaction ));
184 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( sb->fheldservice ), sb->fheldaction )); 184 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( sb->fheldservice ), sb->fheldaction ));
185 185
186 d->m_buttons->append ( b ); 186 d->m_buttons->append ( b );
187 } 187 }
188 } 188 }
189 reloadButtonMapping(); 189 reloadButtonMapping();
190 190
191 QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); 191 QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
192 connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); 192 connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&)));
193} 193}
194 194
195// SIMpad boardcontrol register CS3 195// SIMpad boardcontrol register CS3
196#define SIMPAD_BOARDCONTROL "/proc/cs3" 196#define SIMPAD_BOARDCONTROL "/proc/cs3"
197#define SIMPAD_VCC_5V_EN 0x0001 // For 5V PCMCIA 197#define SIMPAD_VCC_5V_EN 0x0001 // For 5V PCMCIA
198#define SIMPAD_VCC_3V_EN 0x0002 // FOR 3.3V PCMCIA 198#define SIMPAD_VCC_3V_EN 0x0002 // FOR 3.3V PCMCIA
199#define SIMPAD_EN1 0x0004 // This is only for EPROM's 199#define SIMPAD_EN1 0x0004 // This is only for EPROM's
200#define SIMPAD_EN0 0x0008 // Both should be enable for 3.3V or 5V 200#define SIMPAD_EN0 0x0008 // Both should be enable for 3.3V or 5V
201#define SIMPAD_DISPLAY_ON 0x0010 201#define SIMPAD_DISPLAY_ON 0x0010
202#define SIMPAD_PCMCIA_BUFF_DIS 0x0020 202#define SIMPAD_PCMCIA_BUFF_DIS 0x0020
203#define SIMPAD_MQ_RESET 0x0040 203#define SIMPAD_MQ_RESET 0x0040
204#define SIMPAD_PCMCIA_RESET 0x0080 204#define SIMPAD_PCMCIA_RESET 0x0080
205#define SIMPAD_DECT_POWER_ON 0x0100 205#define SIMPAD_DECT_POWER_ON 0x0100
206#define SIMPAD_IRDA_SD 0x0200 // Shutdown for powersave 206#define SIMPAD_IRDA_SD 0x0200 // Shutdown for powersave
207#define SIMPAD_RS232_ON 0x0400 207#define SIMPAD_RS232_ON 0x0400
208#define SIMPAD_SD_MEDIAQ 0x0800 // Shutdown for powersave 208#define SIMPAD_SD_MEDIAQ 0x0800 // Shutdown for powersave
diff --git a/libopie2/opiecore/device/odevice_yopy.cpp b/libopie2/opiecore/device/odevice_yopy.cpp
index a76f90b..d241db8 100644
--- a/libopie2/opiecore/device/odevice_yopy.cpp
+++ b/libopie2/opiecore/device/odevice_yopy.cpp
@@ -106,34 +106,34 @@ void Yopy::initButtons()
106 106
107 ODeviceButton b; 107 ODeviceButton b;
108 108
109 b. setKeycode ( ib->code ); 109 b. setKeycode ( ib->code );
110 b. setUserText ( QObject::tr ( "Button", ib->utext ) ); 110 b. setUserText ( QObject::tr ( "Button", ib->utext ) );
111 b. setPixmap ( Resource::loadPixmap ( ib->pix ) ); 111 b. setPixmap ( Resource::loadPixmap ( ib->pix ) );
112 b. setFactoryPresetPressedAction 112 b. setFactoryPresetPressedAction
113 ( OQCopMessage( makeChannel( ib->fpressedservice ), ib->fpressedaction ) ); 113 ( OQCopMessage( makeChannel( ib->fpressedservice ), ib->fpressedaction ) );
114 b. setFactoryPresetHeldAction 114 b. setFactoryPresetHeldAction
115 ( OQCopMessage( makeChannel( ib->fheldservice ), ib->fheldaction ) ); 115 ( OQCopMessage( makeChannel( ib->fheldservice ), ib->fheldaction ) );
116 116
117 d->m_buttons->append ( b ); 117 d->m_buttons->append ( b );
118 } 118 }
119 reloadButtonMapping(); 119 reloadButtonMapping();
120 120
121 QCopChannel *sysch = new QCopChannel( "QPE/System", this ); 121 QCopChannel *sysch = new QCopChannel( "QPE/System", this );
122 connect( sysch, SIGNAL( received( const QCString &, const QByteArray & ) ), 122 connect( sysch, SIGNAL( received(const QCString&,const QByteArray&) ),
123 this, SLOT( systemMessage( const QCString &, const QByteArray & ) ) ); 123 this, SLOT( systemMessage(const QCString&,const QByteArray&) ) );
124} 124}
125 125
126 126
127bool Yopy::suspend() 127bool Yopy::suspend()
128{ 128{
129 /* Opie for Yopy does not implement its own power management at the 129 /* Opie for Yopy does not implement its own power management at the
130 moment. The public version runs parallel to X, and relies on the 130 moment. The public version runs parallel to X, and relies on the
131 existing power management features. */ 131 existing power management features. */
132 return false; 132 return false;
133} 133}
134 134
135 135
136bool Yopy::setDisplayBrightness( int bright ) 136bool Yopy::setDisplayBrightness( int bright )
137{ 137{
138 /* The code here works, but is disabled as the current version runs 138 /* The code here works, but is disabled as the current version runs
139 parallel to X, and relies on the existing backlight demon. */ 139 parallel to X, and relies on the existing backlight demon. */
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp
index 9d23a12..8ab3cbe 100644
--- a/libopie2/opiecore/device/odevice_zaurus.cpp
+++ b/libopie2/opiecore/device/odevice_zaurus.cpp
@@ -239,34 +239,34 @@ void Zaurus::initButtons()
239 ODeviceButton b; 239 ODeviceButton b;
240 240
241 b. setKeycode ( zb->code ); 241 b. setKeycode ( zb->code );
242 b. setUserText ( QObject::tr ( "Button", zb->utext )); 242 b. setUserText ( QObject::tr ( "Button", zb->utext ));
243 b. setPixmap ( Resource::loadPixmap ( zb->pix )); 243 b. setPixmap ( Resource::loadPixmap ( zb->pix ));
244 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb->fpressedservice ), 244 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb->fpressedservice ),
245 zb->fpressedaction )); 245 zb->fpressedaction ));
246 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb->fheldservice ), 246 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb->fheldservice ),
247 zb->fheldaction )); 247 zb->fheldaction ));
248 248
249 d->m_buttons->append ( b ); 249 d->m_buttons->append ( b );
250 } 250 }
251 251
252 reloadButtonMapping(); 252 reloadButtonMapping();
253 253
254 QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); 254 QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
255 connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), 255 connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)),
256 this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); 256 this, SLOT( systemMessage(const QCString&,const QByteArray&)));
257} 257}
258 258
259#include <unistd.h> 259#include <unistd.h>
260#include <fcntl.h> 260#include <fcntl.h>
261#include <sys/ioctl.h> 261#include <sys/ioctl.h>
262 262
263//#include <asm/sharp_char.h> // including kernel headers is evil ... 263//#include <asm/sharp_char.h> // including kernel headers is evil ...
264 264
265#define SHARP_DEV_IOCTL_COMMAND_START 0x5680 265#define SHARP_DEV_IOCTL_COMMAND_START 0x5680
266 266
267 #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) 267 #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
268#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) 268#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
269 269
270#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ 270#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */
271#define SHARP_BUZ_KEYSOUND 2 /* key sound */ 271#define SHARP_BUZ_KEYSOUND 2 /* key sound */
272#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ 272#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */