-rw-r--r-- | libopie/odevice.cpp | 27 | ||||
-rw-r--r-- | libopie/odevice.h | 1 |
2 files changed, 18 insertions, 10 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 13b4330..3edf8e7 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -96,33 +96,33 @@ public: | |||
96 | virtual bool hasLightSensor ( ) const; | 96 | virtual bool hasLightSensor ( ) const; |
97 | virtual int readLightSensor ( ); | 97 | virtual int readLightSensor ( ); |
98 | virtual int lightSensorResolution ( ) const; | 98 | virtual int lightSensorResolution ( ) const; |
99 | 99 | ||
100 | protected: | 100 | protected: |
101 | virtual bool filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); | 101 | virtual bool filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); |
102 | virtual void timerEvent ( QTimerEvent *te ); | 102 | virtual void timerEvent ( QTimerEvent *te ); |
103 | 103 | ||
104 | int m_power_timer; | 104 | int m_power_timer; |
105 | 105 | ||
106 | OLedState m_leds [2]; | 106 | OLedState m_leds [2]; |
107 | }; | 107 | }; |
108 | 108 | ||
109 | class Jornada : public ODevice { | 109 | class Jornada : public ODevice { |
110 | protected: | 110 | protected: |
111 | virtual void init ( ); | 111 | virtual void init ( ); |
112 | virtual void initButtons ( ); | 112 | //virtual void initButtons ( ); |
113 | public: | 113 | public: |
114 | virtual bool setSoftSuspend ( bool soft ); | 114 | virtual bool setSoftSuspend ( bool soft ); |
115 | virtual bool setDisplayBrightness ( int b ); | 115 | virtual bool setDisplayBrightness ( int b ); |
116 | virtual int displayBrightnessResolution ( ) const; | 116 | virtual int displayBrightnessResolution ( ) const; |
117 | static bool isJornada(); | 117 | static bool isJornada(); |
118 | 118 | ||
119 | }; | 119 | }; |
120 | 120 | ||
121 | class Zaurus : public ODevice { | 121 | class Zaurus : public ODevice { |
122 | protected: | 122 | protected: |
123 | virtual void init ( ); | 123 | virtual void init ( ); |
124 | virtual void initButtons ( ); | 124 | virtual void initButtons ( ); |
125 | 125 | ||
126 | public: | 126 | public: |
127 | virtual bool setSoftSuspend ( bool soft ); | 127 | virtual bool setSoftSuspend ( bool soft ); |
128 | 128 | ||
@@ -194,58 +194,58 @@ protected: | |||
194 | virtual bool filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); | 194 | virtual bool filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); |
195 | virtual void timerEvent ( QTimerEvent *te ); | 195 | virtual void timerEvent ( QTimerEvent *te ); |
196 | 196 | ||
197 | int m_power_timer; | 197 | int m_power_timer; |
198 | }; | 198 | }; |
199 | 199 | ||
200 | struct i_button { | 200 | struct i_button { |
201 | uint model; | 201 | uint model; |
202 | Qt::Key code; | 202 | Qt::Key code; |
203 | char *utext; | 203 | char *utext; |
204 | char *pix; | 204 | char *pix; |
205 | char *fpressedservice; | 205 | char *fpressedservice; |
206 | char *fpressedaction; | 206 | char *fpressedaction; |
207 | char *fheldservice; | 207 | char *fheldservice; |
208 | char *fheldaction; | 208 | char *fheldaction; |
209 | } ipaq_buttons [] = { | 209 | } ipaq_buttons [] = { |
210 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx, | 210 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, |
211 | Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), | 211 | Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), |
212 | "devicebuttons/ipaq_calendar", | 212 | "devicebuttons/ipaq_calendar", |
213 | "datebook", "nextView()", | 213 | "datebook", "nextView()", |
214 | "today", "raise()" }, | 214 | "today", "raise()" }, |
215 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx, | 215 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, |
216 | Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), | 216 | Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), |
217 | "devicebuttons/ipaq_contact", | 217 | "devicebuttons/ipaq_contact", |
218 | "addressbook", "raise()", | 218 | "addressbook", "raise()", |
219 | "addressbook", "beamBusinessCard()" }, | 219 | "addressbook", "beamBusinessCard()" }, |
220 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx, | 220 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx, |
221 | Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), | 221 | Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), |
222 | "devicebuttons/ipaq_menu", | 222 | "devicebuttons/ipaq_menu", |
223 | "QPE/TaskBar", "toggleMenu()", | 223 | "QPE/TaskBar", "toggleMenu()", |
224 | "QPE/TaskBar", "toggleStartMenu()" }, | 224 | "QPE/TaskBar", "toggleStartMenu()" }, |
225 | { Model_iPAQ_H38xx | Model_iPAQ_H39xx, | 225 | { Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, |
226 | Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), | 226 | Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), |
227 | "devicebuttons/ipaq_mail", | 227 | "devicebuttons/ipaq_mail", |
228 | "mail", "raise()", | 228 | "mail", "raise()", |
229 | "mail", "newMail()" }, | 229 | "mail", "newMail()" }, |
230 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx, | 230 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, |
231 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | 231 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
232 | "devicebuttons/ipaq_home", | 232 | "devicebuttons/ipaq_home", |
233 | "QPE/Launcher", "home()", | 233 | "QPE/Launcher", "home()", |
234 | "buttonsettings", "raise()" }, | 234 | "buttonsettings", "raise()" }, |
235 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx, | 235 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, |
236 | Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), | 236 | Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), |
237 | "devicebuttons/ipaq_record", | 237 | "devicebuttons/ipaq_record", |
238 | "QPE/VMemo", "toggleRecord()", | 238 | "QPE/VMemo", "toggleRecord()", |
239 | "sound", "raise()" }, | 239 | "sound", "raise()" }, |
240 | }; | 240 | }; |
241 | 241 | ||
242 | struct z_button { | 242 | struct z_button { |
243 | Qt::Key code; | 243 | Qt::Key code; |
244 | char *utext; | 244 | char *utext; |
245 | char *pix; | 245 | char *pix; |
246 | char *fpressedservice; | 246 | char *fpressedservice; |
247 | char *fpressedaction; | 247 | char *fpressedaction; |
248 | char *fheldservice; | 248 | char *fheldservice; |
249 | char *fheldaction; | 249 | char *fheldaction; |
250 | } z_buttons [] = { | 250 | } z_buttons [] = { |
251 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), | 251 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), |
@@ -1105,50 +1105,54 @@ void iPAQ::init ( ) | |||
1105 | 1105 | ||
1106 | if ( f. open ( IO_ReadOnly )) { | 1106 | if ( f. open ( IO_ReadOnly )) { |
1107 | QTextStream ts ( &f ); | 1107 | QTextStream ts ( &f ); |
1108 | 1108 | ||
1109 | d-> m_modelstr = "H" + ts. readLine ( ); | 1109 | d-> m_modelstr = "H" + ts. readLine ( ); |
1110 | 1110 | ||
1111 | if ( d-> m_modelstr == "H3100" ) | 1111 | if ( d-> m_modelstr == "H3100" ) |
1112 | d-> m_model = Model_iPAQ_H31xx; | 1112 | d-> m_model = Model_iPAQ_H31xx; |
1113 | else if ( d-> m_modelstr == "H3600" ) | 1113 | else if ( d-> m_modelstr == "H3600" ) |
1114 | d-> m_model = Model_iPAQ_H36xx; | 1114 | d-> m_model = Model_iPAQ_H36xx; |
1115 | else if ( d-> m_modelstr == "H3700" ) | 1115 | else if ( d-> m_modelstr == "H3700" ) |
1116 | d-> m_model = Model_iPAQ_H37xx; | 1116 | d-> m_model = Model_iPAQ_H37xx; |
1117 | else if ( d-> m_modelstr == "H3800" ) | 1117 | else if ( d-> m_modelstr == "H3800" ) |
1118 | d-> m_model = Model_iPAQ_H38xx; | 1118 | d-> m_model = Model_iPAQ_H38xx; |
1119 | else if ( d-> m_modelstr == "H3900" ) | 1119 | else if ( d-> m_modelstr == "H3900" ) |
1120 | d-> m_model = Model_iPAQ_H39xx; | 1120 | d-> m_model = Model_iPAQ_H39xx; |
1121 | else if ( d-> m_modelstr == "H5400" ) | ||
1122 | d-> m_model = Model_iPAQ_H5xxx; | ||
1121 | else | 1123 | else |
1122 | d-> m_model = Model_Unknown; | 1124 | d-> m_model = Model_Unknown; |
1123 | 1125 | ||
1124 | f. close ( ); | 1126 | f. close ( ); |
1125 | } | 1127 | } |
1126 | 1128 | ||
1127 | switch ( d-> m_model ) { | 1129 | switch ( d-> m_model ) { |
1128 | case Model_iPAQ_H31xx: | 1130 | case Model_iPAQ_H31xx: |
1129 | case Model_iPAQ_H38xx: | 1131 | case Model_iPAQ_H38xx: |
1130 | d-> m_rotation = Rot90; | 1132 | d-> m_rotation = Rot90; |
1131 | break; | 1133 | break; |
1132 | case Model_iPAQ_H36xx: | 1134 | case Model_iPAQ_H36xx: |
1133 | case Model_iPAQ_H37xx: | 1135 | case Model_iPAQ_H37xx: |
1134 | case Model_iPAQ_H39xx: | 1136 | case Model_iPAQ_H39xx: |
1135 | default: | 1137 | default: |
1136 | d-> m_rotation = Rot270; | 1138 | d-> m_rotation = Rot270; |
1137 | break; | 1139 | break; |
1138 | } | 1140 | case Model_iPAQ_H5xxx: |
1141 | d-> m_rotation = Rot0; | ||
1142 | } | ||
1139 | 1143 | ||
1140 | f. setName ( "/etc/familiar-version" ); | 1144 | f. setName ( "/etc/familiar-version" ); |
1141 | if ( f. open ( IO_ReadOnly )) { | 1145 | if ( f. open ( IO_ReadOnly )) { |
1142 | d-> m_systemstr = "Familiar"; | 1146 | d-> m_systemstr = "Familiar"; |
1143 | d-> m_system = System_Familiar; | 1147 | d-> m_system = System_Familiar; |
1144 | 1148 | ||
1145 | QTextStream ts ( &f ); | 1149 | QTextStream ts ( &f ); |
1146 | d-> m_sysverstr = ts. readLine ( ). mid ( 10 ); | 1150 | d-> m_sysverstr = ts. readLine ( ). mid ( 10 ); |
1147 | 1151 | ||
1148 | f. close ( ); | 1152 | f. close ( ); |
1149 | } else { | 1153 | } else { |
1150 | f. setName ( "/etc/oz_version" ); | 1154 | f. setName ( "/etc/oz_version" ); |
1151 | 1155 | ||
1152 | if ( f. open ( IO_ReadOnly )) { | 1156 | if ( f. open ( IO_ReadOnly )) { |
1153 | d-> m_systemstr = "OpenEmbedded/iPaq"; | 1157 | d-> m_systemstr = "OpenEmbedded/iPaq"; |
1154 | d-> m_system = System_Familiar; | 1158 | d-> m_system = System_Familiar; |
@@ -1279,33 +1283,34 @@ bool iPAQ::setLedState ( OLed l, OLedState st ) | |||
1279 | return true; | 1283 | return true; |
1280 | } | 1284 | } |
1281 | } | 1285 | } |
1282 | } | 1286 | } |
1283 | return false; | 1287 | return false; |
1284 | } | 1288 | } |
1285 | 1289 | ||
1286 | 1290 | ||
1287 | bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) | 1291 | bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) |
1288 | { | 1292 | { |
1289 | int newkeycode = keycode; | 1293 | int newkeycode = keycode; |
1290 | 1294 | ||
1291 | switch ( keycode ) { | 1295 | switch ( keycode ) { |
1292 | // H38xx/H39xx have no "Q" key anymore - this is now the Mail key | 1296 | // H38xx/H39xx have no "Q" key anymore - this is now the Mail key |
1293 | case HardKey_Menu: { | 1297 | case HardKey_Menu: { |
1294 | if (( d-> m_model == Model_iPAQ_H38xx ) || | 1298 | if (( d-> m_model == Model_iPAQ_H38xx ) || |
1295 | ( d-> m_model == Model_iPAQ_H39xx )) { | 1299 | ( d-> m_model == Model_iPAQ_H39xx ) || |
1300 | ( d-> m_model == Model_iPAQ_H5xxx)) { | ||
1296 | newkeycode = HardKey_Mail; | 1301 | newkeycode = HardKey_Mail; |
1297 | } | 1302 | } |
1298 | break; | 1303 | break; |
1299 | } | 1304 | } |
1300 | 1305 | ||
1301 | // Rotate cursor keys 180° | 1306 | // Rotate cursor keys 180° |
1302 | case Key_Left : | 1307 | case Key_Left : |
1303 | case Key_Right: | 1308 | case Key_Right: |
1304 | case Key_Up : | 1309 | case Key_Up : |
1305 | case Key_Down : { | 1310 | case Key_Down : { |
1306 | if (( d-> m_model == Model_iPAQ_H31xx ) || | 1311 | if (( d-> m_model == Model_iPAQ_H31xx ) || |
1307 | ( d-> m_model == Model_iPAQ_H38xx )) { | 1312 | ( d-> m_model == Model_iPAQ_H38xx )) { |
1308 | newkeycode = Key_Left + ( keycode - Key_Left + 2 ) % 4; | 1313 | newkeycode = Key_Left + ( keycode - Key_Left + 2 ) % 4; |
1309 | } | 1314 | } |
1310 | break; | 1315 | break; |
1311 | } | 1316 | } |
@@ -1423,32 +1428,34 @@ bool iPAQ::setDisplayBrightness ( int bright ) | |||
1423 | ::close ( fd ); | 1428 | ::close ( fd ); |
1424 | } | 1429 | } |
1425 | return res; | 1430 | return res; |
1426 | } | 1431 | } |
1427 | 1432 | ||
1428 | int iPAQ::displayBrightnessResolution ( ) const | 1433 | int iPAQ::displayBrightnessResolution ( ) const |
1429 | { | 1434 | { |
1430 | switch ( model ( )) { | 1435 | switch ( model ( )) { |
1431 | case Model_iPAQ_H31xx: | 1436 | case Model_iPAQ_H31xx: |
1432 | case Model_iPAQ_H36xx: | 1437 | case Model_iPAQ_H36xx: |
1433 | case Model_iPAQ_H37xx: | 1438 | case Model_iPAQ_H37xx: |
1434 | return 128; // really 256, but >128 could damage the LCD | 1439 | return 128; // really 256, but >128 could damage the LCD |
1435 | 1440 | ||
1436 | case Model_iPAQ_H38xx: | 1441 | case Model_iPAQ_H38xx: |
1437 | case Model_iPAQ_H39xx: | 1442 | case Model_iPAQ_H39xx: |
1438 | return 64; | 1443 | return 64; |
1444 | case Model_iPAQ_H5xxx: | ||
1445 | return 255; | ||
1439 | 1446 | ||
1440 | default: | 1447 | default: |
1441 | return 2; | 1448 | return 2; |
1442 | } | 1449 | } |
1443 | } | 1450 | } |
1444 | 1451 | ||
1445 | 1452 | ||
1446 | bool iPAQ::hasLightSensor ( ) const | 1453 | bool iPAQ::hasLightSensor ( ) const |
1447 | { | 1454 | { |
1448 | return true; | 1455 | return true; |
1449 | } | 1456 | } |
1450 | 1457 | ||
1451 | int iPAQ::readLightSensor ( ) | 1458 | int iPAQ::readLightSensor ( ) |
1452 | { | 1459 | { |
1453 | int fd; | 1460 | int fd; |
1454 | int val = -1; | 1461 | int val = -1; |
@@ -2503,62 +2510,62 @@ void Jornada::init ( ) | |||
2503 | d-> m_model = Model_Jornada_56x; | 2510 | d-> m_model = Model_Jornada_56x; |
2504 | d-> m_systemstr = "Familiar"; | 2511 | d-> m_systemstr = "Familiar"; |
2505 | d-> m_system = System_Familiar; | 2512 | d-> m_system = System_Familiar; |
2506 | d-> m_rotation = Rot0; | 2513 | d-> m_rotation = Rot0; |
2507 | 2514 | ||
2508 | QFile f ( "/etc/familiar-version" ); | 2515 | QFile f ( "/etc/familiar-version" ); |
2509 | f. setName ( "/etc/familiar-version" ); | 2516 | f. setName ( "/etc/familiar-version" ); |
2510 | if ( f. open ( IO_ReadOnly )) { | 2517 | if ( f. open ( IO_ReadOnly )) { |
2511 | 2518 | ||
2512 | QTextStream ts ( &f ); | 2519 | QTextStream ts ( &f ); |
2513 | d-> m_sysverstr = ts. readLine ( ). mid ( 10 ); | 2520 | d-> m_sysverstr = ts. readLine ( ). mid ( 10 ); |
2514 | 2521 | ||
2515 | f. close ( ); | 2522 | f. close ( ); |
2516 | } | 2523 | } |
2517 | } | 2524 | } |
2518 | 2525 | ||
2519 | 2526 | #if 0 | |
2520 | void Jornada::initButtons ( ) | 2527 | void Jornada::initButtons ( ) |
2521 | { | 2528 | { |
2522 | if ( d-> m_buttons ) | 2529 | if ( d-> m_buttons ) |
2523 | return; | 2530 | return; |
2524 | 2531 | ||
2525 | // Simulation uses iPAQ 3660 device buttons | 2532 | // Simulation uses iPAQ 3660 device buttons |
2526 | 2533 | ||
2527 | qDebug ( "init Buttons" ); | 2534 | qDebug ( "init Buttons" ); |
2528 | d-> m_buttons = new QValueList <ODeviceButton>; | 2535 | d-> m_buttons = new QValueList <ODeviceButton>; |
2529 | 2536 | ||
2530 | for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { | 2537 | for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { |
2531 | i_button *ib = ipaq_buttons + i; | 2538 | i_button *ib = ipaq_buttons + i; |
2532 | ODeviceButton b; | 2539 | ODeviceButton b; |
2533 | 2540 | ||
2534 | if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) { | 2541 | if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) { |
2535 | b. setKeycode ( ib-> code ); | 2542 | b. setKeycode ( ib-> code ); |
2536 | b. setUserText ( QObject::tr ( "Button", ib-> utext )); | 2543 | b. setUserText ( QObject::tr ( "Button", ib-> utext )); |
2537 | b. setPixmap ( Resource::loadPixmap ( ib-> pix )); | 2544 | b. setPixmap ( Resource::loadPixmap ( ib-> pix )); |
2538 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); | 2545 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); |
2539 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); | 2546 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); |
2540 | d-> m_buttons-> append ( b ); | 2547 | d-> m_buttons-> append ( b ); |
2541 | } | 2548 | } |
2542 | } | 2549 | } |
2543 | reloadButtonMapping ( ); | 2550 | reloadButtonMapping ( ); |
2544 | 2551 | ||
2545 | QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); | 2552 | QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); |
2546 | connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); | 2553 | connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); |
2547 | } | 2554 | } |
2548 | 2555 | #endif | |
2549 | int Jornada::displayBrightnessResolution ( ) const | 2556 | int Jornada::displayBrightnessResolution ( ) const |
2550 | { | 2557 | { |
2551 | } | 2558 | } |
2552 | 2559 | ||
2553 | bool Jornada::setDisplayBrightness ( int bright ) | 2560 | bool Jornada::setDisplayBrightness ( int bright ) |
2554 | { | 2561 | { |
2555 | bool res = false; | 2562 | bool res = false; |
2556 | int fd; | 2563 | int fd; |
2557 | 2564 | ||
2558 | if ( bright > 255 ) | 2565 | if ( bright > 255 ) |
2559 | bright = 255; | 2566 | bright = 255; |
2560 | if ( bright < 0 ) | 2567 | if ( bright < 0 ) |
2561 | bright = 0; | 2568 | bright = 0; |
2562 | 2569 | ||
2563 | if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) { | 2570 | if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) { |
2564 | FLITE_IN bl; | 2571 | FLITE_IN bl; |
diff --git a/libopie/odevice.h b/libopie/odevice.h index 35e3eff..46f1614 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -37,32 +37,33 @@ namespace Opie { | |||
37 | /** | 37 | /** |
38 | * The available devices | 38 | * The available devices |
39 | */ | 39 | */ |
40 | enum OModel { | 40 | enum OModel { |
41 | Model_Unknown, // = 0 | 41 | Model_Unknown, // = 0 |
42 | 42 | ||
43 | Model_Series_Mask = 0xff000000, | 43 | Model_Series_Mask = 0xff000000, |
44 | 44 | ||
45 | Model_iPAQ = ( 1 << 24 ), | 45 | Model_iPAQ = ( 1 << 24 ), |
46 | 46 | ||
47 | Model_iPAQ_All = ( Model_iPAQ | 0xffffff ), | 47 | Model_iPAQ_All = ( Model_iPAQ | 0xffffff ), |
48 | Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ), | 48 | Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ), |
49 | Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ), | 49 | Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ), |
50 | Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ), | 50 | Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ), |
51 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ), | 51 | Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ), |
52 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), | 52 | Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), |
53 | Model_iPAQ_H5xxx = ( Model_iPAQ | 0x000011 ), | ||
53 | 54 | ||
54 | Model_Jornada = ( 6 << 24 ), | 55 | Model_Jornada = ( 6 << 24 ), |
55 | Model_Jornada_56x = ( Model_Jornada | 0x000001 ), | 56 | Model_Jornada_56x = ( Model_Jornada | 0x000001 ), |
56 | 57 | ||
57 | Model_Zaurus = ( 2 << 24 ), | 58 | Model_Zaurus = ( 2 << 24 ), |
58 | 59 | ||
59 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ), | 60 | Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ), |
60 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ), | 61 | Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ), |
61 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x000003 ), | 62 | Model_Zaurus_SLA300 = ( Model_Zaurus | 0x000003 ), |
62 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ), | 63 | Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ), |
63 | Model_Zaurus_SLC700 = ( Model_Zaurus | 0x000005 ), | 64 | Model_Zaurus_SLC700 = ( Model_Zaurus | 0x000005 ), |
64 | 65 | ||
65 | Model_SIMpad = ( 3 << 24 ), | 66 | Model_SIMpad = ( 3 << 24 ), |
66 | 67 | ||
67 | Model_SIMpad_All = ( Model_SIMpad | 0xffffff ), | 68 | Model_SIMpad_All = ( Model_SIMpad | 0xffffff ), |
68 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x000001 ), | 69 | Model_SIMpad_CL4 = ( Model_SIMpad | 0x000001 ), |