summaryrefslogtreecommitdiff
path: root/libopie/odevice.cpp
Unidiff
Diffstat (limited to 'libopie/odevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index c0b6efa..4258d60 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -523,25 +523,25 @@ void ODevice::initButtons ( )
523 if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) { 523 if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) {
524 b. setKeycode ( ib-> code ); 524 b. setKeycode ( ib-> code );
525 b. setUserText ( QObject::tr ( "Button", ib-> utext )); 525 b. setUserText ( QObject::tr ( "Button", ib-> utext ));
526 b. setPixmap ( Resource::loadPixmap ( ib-> pix )); 526 b. setPixmap ( Resource::loadPixmap ( ib-> pix ));
527 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); 527 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction ));
528 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); 528 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction ));
529 d-> m_buttons-> append ( b ); 529 d-> m_buttons-> append ( b );
530 } 530 }
531 } 531 }
532 reloadButtonMapping ( ); 532 reloadButtonMapping ( );
533 533
534 QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); 534 QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
535 connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); 535 connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&)));
536} 536}
537 537
538ODevice::~ODevice ( ) 538ODevice::~ODevice ( )
539{ 539{
540// we leak m_devicebuttons and m_cpu_frequency 540// we leak m_devicebuttons and m_cpu_frequency
541// but it's a singleton and it is not so importantant 541// but it's a singleton and it is not so importantant
542// -zecke 542// -zecke
543 delete d; 543 delete d;
544} 544}
545 545
546bool ODevice::setSoftSuspend ( bool /*soft*/ ) 546bool ODevice::setSoftSuspend ( bool /*soft*/ )
547{ 547{
@@ -1103,26 +1103,26 @@ void Yopy::initButtons ( )
1103 b. setUserText ( QObject::tr ( "Button", ib-> utext )); 1103 b. setUserText ( QObject::tr ( "Button", ib-> utext ));
1104 b. setPixmap ( Resource::loadPixmap ( ib-> pix )); 1104 b. setPixmap ( Resource::loadPixmap ( ib-> pix ));
1105 b. setFactoryPresetPressedAction 1105 b. setFactoryPresetPressedAction
1106 (OQCopMessage(makeChannel(ib->fpressedservice), ib->fpressedaction)); 1106 (OQCopMessage(makeChannel(ib->fpressedservice), ib->fpressedaction));
1107 b. setFactoryPresetHeldAction 1107 b. setFactoryPresetHeldAction
1108 (OQCopMessage(makeChannel(ib->fheldservice), ib->fheldaction)); 1108 (OQCopMessage(makeChannel(ib->fheldservice), ib->fheldaction));
1109 1109
1110 d-> m_buttons-> append ( b ); 1110 d-> m_buttons-> append ( b );
1111 } 1111 }
1112 reloadButtonMapping ( ); 1112 reloadButtonMapping ( );
1113 1113
1114 QCopChannel *sysch = new QCopChannel("QPE/System", this); 1114 QCopChannel *sysch = new QCopChannel("QPE/System", this);
1115 connect(sysch, SIGNAL(received(const QCString &, const QByteArray & )), 1115 connect(sysch, SIGNAL(received(const QCString&,const QByteArray&)),
1116 this, SLOT(systemMessage(const QCString &, const QByteArray & ))); 1116 this, SLOT(systemMessage(const QCString&,const QByteArray&)));
1117} 1117}
1118 1118
1119bool Yopy::suspend() 1119bool Yopy::suspend()
1120{ 1120{
1121 /* Opie for Yopy does not implement its own power management at the 1121 /* Opie for Yopy does not implement its own power management at the
1122 moment. The public version runs parallel to X, and relies on the 1122 moment. The public version runs parallel to X, and relies on the
1123 existing power management features. */ 1123 existing power management features. */
1124 return false; 1124 return false;
1125} 1125}
1126 1126
1127bool Yopy::setDisplayBrightness(int bright) 1127bool Yopy::setDisplayBrightness(int bright)
1128{ 1128{
@@ -1252,25 +1252,25 @@ void iPAQ::initButtons ( )
1252 b. setKeycode ( ib-> code ); 1252 b. setKeycode ( ib-> code );
1253 b. setUserText ( QObject::tr ( "Button", ib-> utext )); 1253 b. setUserText ( QObject::tr ( "Button", ib-> utext ));
1254 b. setPixmap ( Resource::loadPixmap ( ib-> pix )); 1254 b. setPixmap ( Resource::loadPixmap ( ib-> pix ));
1255 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); 1255 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction ));
1256 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); 1256 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction ));
1257 1257
1258 d-> m_buttons-> append ( b ); 1258 d-> m_buttons-> append ( b );
1259 } 1259 }
1260 } 1260 }
1261 reloadButtonMapping ( ); 1261 reloadButtonMapping ( );
1262 1262
1263 QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); 1263 QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
1264 connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); 1264 connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&)));
1265} 1265}
1266 1266
1267 1267
1268//#include <linux/h3600_ts.h> // including kernel headers is evil ... 1268//#include <linux/h3600_ts.h> // including kernel headers is evil ...
1269 1269
1270typedef struct { 1270typedef struct {
1271 unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */ 1271 unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */
1272 unsigned char TotalTime; /* Units of 5 seconds */ 1272 unsigned char TotalTime; /* Units of 5 seconds */
1273 unsigned char OnTime; /* units of 100m/s */ 1273 unsigned char OnTime; /* units of 100m/s */
1274 unsigned char OffTime; /* units of 100m/s */ 1274 unsigned char OffTime; /* units of 100m/s */
1275} LED_IN; 1275} LED_IN;
1276 1276
@@ -1738,26 +1738,26 @@ void Zaurus::initButtons ( )
1738 b. setPixmap ( Resource::loadPixmap ( zb-> pix )); 1738 b. setPixmap ( Resource::loadPixmap ( zb-> pix ));
1739 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb-> fpressedservice ), 1739 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb-> fpressedservice ),
1740 zb-> fpressedaction )); 1740 zb-> fpressedaction ));
1741 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb-> fheldservice ), 1741 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb-> fheldservice ),
1742 zb-> fheldaction )); 1742 zb-> fheldaction ));
1743 1743
1744 d-> m_buttons-> append ( b ); 1744 d-> m_buttons-> append ( b );
1745 } 1745 }
1746 1746
1747 reloadButtonMapping ( ); 1747 reloadButtonMapping ( );
1748 1748
1749 QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); 1749 QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
1750 connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), 1750 connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)),
1751 this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); 1751 this, SLOT( systemMessage(const QCString&,const QByteArray&)));
1752} 1752}
1753 1753
1754#include <unistd.h> 1754#include <unistd.h>
1755#include <fcntl.h> 1755#include <fcntl.h>
1756#include <sys/ioctl.h> 1756#include <sys/ioctl.h>
1757 1757
1758//#include <asm/sharp_char.h> // including kernel headers is evil ... 1758//#include <asm/sharp_char.h> // including kernel headers is evil ...
1759 1759
1760#define SHARP_DEV_IOCTL_COMMAND_START 0x5680 1760#define SHARP_DEV_IOCTL_COMMAND_START 0x5680
1761 1761
1762 #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) 1762 #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
1763#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) 1763#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
@@ -2289,25 +2289,25 @@ void SIMpad::initButtons ( )
2289 b. setKeycode ( sb-> code ); 2289 b. setKeycode ( sb-> code );
2290 b. setUserText ( QObject::tr ( "Button", sb-> utext )); 2290 b. setUserText ( QObject::tr ( "Button", sb-> utext ));
2291 b. setPixmap ( Resource::loadPixmap ( sb-> pix )); 2291 b. setPixmap ( Resource::loadPixmap ( sb-> pix ));
2292 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( sb-> fpressedservice ), sb-> fpressedaction )); 2292 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( sb-> fpressedservice ), sb-> fpressedaction ));
2293 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( sb-> fheldservice ), sb-> fheldaction )); 2293 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( sb-> fheldservice ), sb-> fheldaction ));
2294 2294
2295 d-> m_buttons-> append ( b ); 2295 d-> m_buttons-> append ( b );
2296 } 2296 }
2297 } 2297 }
2298 reloadButtonMapping ( ); 2298 reloadButtonMapping ( );
2299 2299
2300 QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); 2300 QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
2301 connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); 2301 connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&)));
2302} 2302}
2303 2303
2304// SIMpad boardcontrol register CS3 2304// SIMpad boardcontrol register CS3
2305#define SIMPAD_BOARDCONTROL "/proc/cs3" 2305#define SIMPAD_BOARDCONTROL "/proc/cs3"
2306#define SIMPAD_VCC_5V_EN 0x0001 // For 5V PCMCIA 2306#define SIMPAD_VCC_5V_EN 0x0001 // For 5V PCMCIA
2307#define SIMPAD_VCC_3V_EN 0x0002 // FOR 3.3V PCMCIA 2307#define SIMPAD_VCC_3V_EN 0x0002 // FOR 3.3V PCMCIA
2308#define SIMPAD_EN1 0x0004 // This is only for EPROM's 2308#define SIMPAD_EN1 0x0004 // This is only for EPROM's
2309#define SIMPAD_EN0 0x0008 // Both should be enable for 3.3V or 5V 2309#define SIMPAD_EN0 0x0008 // Both should be enable for 3.3V or 5V
2310#define SIMPAD_DISPLAY_ON 0x0010 2310#define SIMPAD_DISPLAY_ON 0x0010
2311#define SIMPAD_PCMCIA_BUFF_DIS 0x0020 2311#define SIMPAD_PCMCIA_BUFF_DIS 0x0020
2312#define SIMPAD_MQ_RESET 0x0040 2312#define SIMPAD_MQ_RESET 0x0040
2313#define SIMPAD_PCMCIA_RESET 0x0080 2313#define SIMPAD_PCMCIA_RESET 0x0080
@@ -2789,25 +2789,25 @@ void Jornada::initButtons ( )
2789 if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) { 2789 if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) {
2790 b. setKeycode ( ib-> code ); 2790 b. setKeycode ( ib-> code );
2791 b. setUserText ( QObject::tr ( "Button", ib-> utext )); 2791 b. setUserText ( QObject::tr ( "Button", ib-> utext ));
2792 b. setPixmap ( Resource::loadPixmap ( ib-> pix )); 2792 b. setPixmap ( Resource::loadPixmap ( ib-> pix ));
2793 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); 2793 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction ));
2794 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); 2794 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction ));
2795 d-> m_buttons-> append ( b ); 2795 d-> m_buttons-> append ( b );
2796 } 2796 }
2797 } 2797 }
2798 reloadButtonMapping ( ); 2798 reloadButtonMapping ( );
2799 2799
2800 QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); 2800 QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
2801 connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); 2801 connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&)));
2802} 2802}
2803#endif 2803#endif
2804int Jornada::displayBrightnessResolution ( ) const 2804int Jornada::displayBrightnessResolution ( ) const
2805{ 2805{
2806} 2806}
2807 2807
2808bool Jornada::setDisplayBrightness ( int bright ) 2808bool Jornada::setDisplayBrightness ( int bright )
2809{ 2809{
2810 bool res = false; 2810 bool res = false;
2811 int fd; 2811 int fd;
2812 2812
2813 if ( bright > 255 ) 2813 if ( bright > 255 )