author | alwin <alwin> | 2004-03-02 12:14:15 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:14:15 (UTC) |
commit | 0d59c780513da78033f4d9040475dee9db0256d4 (patch) (unidiff) | |
tree | 503d320b4aa3daae9982082e7b34e3e2c48bdfb7 /libopie2/opiecore/device/odevice_simpad.cpp | |
parent | a0981652d61776d70f25980f035748b21339e946 (diff) | |
download | opie-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/odevice_simpad.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_simpad.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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 | |||
@@ -144,97 +144,97 @@ void SIMpad::init() | |||
144 | f. close(); | 144 | f. close(); |
145 | } else { | 145 | } else { |
146 | f. setName ( "/etc/oz_version" ); | 146 | f. setName ( "/etc/oz_version" ); |
147 | 147 | ||
148 | if ( f. open ( IO_ReadOnly )) { | 148 | if ( f. open ( IO_ReadOnly )) { |
149 | d->m_systemstr = "OpenEmbedded/SIMpad"; | 149 | d->m_systemstr = "OpenEmbedded/SIMpad"; |
150 | d->m_system = System_OpenZaurus; | 150 | d->m_system = System_OpenZaurus; |
151 | 151 | ||
152 | QTextStream ts ( &f ); | 152 | QTextStream ts ( &f ); |
153 | ts.setDevice ( &f ); | 153 | ts.setDevice ( &f ); |
154 | d->m_sysverstr = ts. readLine(); | 154 | d->m_sysverstr = ts. readLine(); |
155 | f. close(); | 155 | f. close(); |
156 | } | 156 | } |
157 | } | 157 | } |
158 | 158 | ||
159 | m_leds [0] = m_leds [1] = Led_Off; | 159 | m_leds [0] = m_leds [1] = Led_Off; |
160 | 160 | ||
161 | m_power_timer = 0; | 161 | m_power_timer = 0; |
162 | 162 | ||
163 | } | 163 | } |
164 | 164 | ||
165 | void SIMpad::initButtons() | 165 | void SIMpad::initButtons() |
166 | { | 166 | { |
167 | if ( d->m_buttons ) | 167 | if ( d->m_buttons ) |
168 | return; | 168 | return; |
169 | 169 | ||
170 | if ( isQWS( ) ) | 170 | if ( isQWS( ) ) |
171 | QWSServer::setKeyboardFilter ( this ); | 171 | QWSServer::setKeyboardFilter ( this ); |
172 | 172 | ||
173 | d->m_buttons = new QValueList <ODeviceButton>; | 173 | d->m_buttons = new QValueList <ODeviceButton>; |
174 | 174 | ||
175 | for ( uint i = 0; i < ( sizeof( simpad_buttons ) / sizeof( s_button )); i++ ) { | 175 | for ( uint i = 0; i < ( sizeof( simpad_buttons ) / sizeof( s_button )); i++ ) { |
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 |
209 | #define SIMPAD_LED2_ON 0x1000 | 209 | #define SIMPAD_LED2_ON 0x1000 |
210 | #define SIMPAD_IRDA_MODE 0x2000 // Fast/Slow IrDA mode | 210 | #define SIMPAD_IRDA_MODE 0x2000 // Fast/Slow IrDA mode |
211 | #define SIMPAD_ENABLE_5V 0x4000 // Enable 5V circuit | 211 | #define SIMPAD_ENABLE_5V 0x4000 // Enable 5V circuit |
212 | #define SIMPAD_RESET_SIMCARD 0x8000 | 212 | #define SIMPAD_RESET_SIMCARD 0x8000 |
213 | 213 | ||
214 | //SIMpad touchscreen backlight strength control | 214 | //SIMpad touchscreen backlight strength control |
215 | #define SIMPAD_BACKLIGHT_CONTROL "/proc/driver/mq200/registers/PWM_CONTROL" | 215 | #define SIMPAD_BACKLIGHT_CONTROL "/proc/driver/mq200/registers/PWM_CONTROL" |
216 | #define SIMPAD_BACKLIGHT_MASK 0x00a10044 | 216 | #define SIMPAD_BACKLIGHT_MASK 0x00a10044 |
217 | 217 | ||
218 | QValueList <OLed> SIMpad::ledList() const | 218 | QValueList <OLed> SIMpad::ledList() const |
219 | { | 219 | { |
220 | QValueList <OLed> vl; | 220 | QValueList <OLed> vl; |
221 | vl << Led_Power; //FIXME which LED is LED2 ? The green one or the amber one? | 221 | vl << Led_Power; //FIXME which LED is LED2 ? The green one or the amber one? |
222 | //vl << Led_Mail; //TODO find out if LED1 is accessible anyway | 222 | //vl << Led_Mail; //TODO find out if LED1 is accessible anyway |
223 | return vl; | 223 | return vl; |
224 | } | 224 | } |
225 | 225 | ||
226 | QValueList <OLedState> SIMpad::ledStateList ( OLed l ) const | 226 | QValueList <OLedState> SIMpad::ledStateList ( OLed l ) const |
227 | { | 227 | { |
228 | QValueList <OLedState> vl; | 228 | QValueList <OLedState> vl; |
229 | 229 | ||
230 | if ( l == Led_Power ) //FIXME which LED is LED2 ? The green one or the amber one? | 230 | if ( l == Led_Power ) //FIXME which LED is LED2 ? The green one or the amber one? |
231 | vl << Led_Off << Led_On; | 231 | vl << Led_Off << Led_On; |
232 | //else if ( l == Led_Mail ) //TODO find out if LED1 is accessible anyway | 232 | //else if ( l == Led_Mail ) //TODO find out if LED1 is accessible anyway |
233 | //vl << Led_Off; | 233 | //vl << Led_Off; |
234 | return vl; | 234 | return vl; |
235 | } | 235 | } |
236 | 236 | ||
237 | OLedState SIMpad::ledState ( OLed l ) const | 237 | OLedState SIMpad::ledState ( OLed l ) const |
238 | { | 238 | { |
239 | switch ( l ) { | 239 | switch ( l ) { |
240 | case Led_Power: | 240 | case Led_Power: |