FreeCalypso > hg > fc-tourmaline
comparison src/ui/bmi/mmiEm.c @ 92:c0052fe355d3
src/ui/bmi/*.[ch]: rm trailing white space
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 08 Nov 2020 06:39:16 +0000 |
parents | 67bfe9f274f6 |
children | 24ea5d2ad89b |
comparison
equal
deleted
inserted
replaced
91:c3d28a37caad | 92:c0052fe355d3 |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 | 2 |
3 CONDAT (UK) | 3 CONDAT (UK) |
4 | 4 |
5 ******************************************************************************** | 5 ******************************************************************************** |
6 | 6 |
7 This software product is the property of Condat (UK) Ltd and may not be | 7 This software product is the property of Condat (UK) Ltd and may not be |
8 disclosed to any third party without the express permission of the owner. | 8 disclosed to any third party without the express permission of the owner. |
9 | 9 |
10 ******************************************************************************** | 10 ******************************************************************************** |
11 | 11 |
12 $Project name: Basic MMI | 12 $Project name: Basic MMI |
13 $Project code: BMI (6349) | 13 $Project code: BMI (6349) |
14 $Module: MMI | 14 $Module: MMI |
15 $File: MmiEm.c | 15 $File: MmiEm.c |
16 $Revision: 1.0 | 16 $Revision: 1.0 |
17 | 17 |
18 $Author: Condat(UK) | 18 $Author: Condat(UK) |
19 $Date: 23/09/02 | 19 $Date: 23/09/02 |
20 | 20 |
21 ******************************************************************************** | 21 ******************************************************************************** |
22 | 22 |
23 Description: | 23 Description: |
24 | 24 |
25 MMI engineering mode handling | 25 MMI engineering mode handling |
26 | 26 |
27 ******************************************************************************** | 27 ******************************************************************************** |
28 $History: MmiEm.c | 28 $History: MmiEm.c |
29 | 29 |
30 Apr 24, 2006 ERT: OMAPS00067603 x0043642 | 30 Apr 24, 2006 ERT: OMAPS00067603 x0043642 |
31 Description: Engineering mode | 31 Description: Engineering mode |
32 Solution: Added new engineering mode functionalities to satisfy Neptune engineering mode | 32 Solution: Added new engineering mode functionalities to satisfy Neptune engineering mode |
33 requirements. | 33 requirements. |
34 | 34 |
35 | 35 |
36 23/09/02 Original Condat(UK) BMI version. | 36 23/09/02 Original Condat(UK) BMI version. |
37 | 37 |
38 $End | 38 $End |
39 | 39 |
40 | 40 |
41 | 41 |
42 | 42 |
43 ******************************************************************************* | 43 ******************************************************************************* |
44 | 44 |
45 Include Files | 45 Include Files |
46 | 46 |
47 *******************************************************************************/ | 47 *******************************************************************************/ |
48 #define ENTITY_MFW | 48 #define ENTITY_MFW |
49 | 49 |
50 /* includes */ | 50 /* includes */ |
51 #include <string.h> | 51 #include <string.h> |
123 | 123 |
124 #include "mmiColours.h" | 124 #include "mmiColours.h" |
125 | 125 |
126 #ifdef NEPTUNE_BOARD | 126 #ifdef NEPTUNE_BOARD |
127 #include "ffs.h" | 127 #include "ffs.h" |
128 #endif | 128 #endif |
129 | 129 |
130 #define EM_UPDATE_RATE 1000 | 130 #define EM_UPDATE_RATE 1000 |
131 | 131 |
132 #ifdef NEPTUNE_BOARD | 132 #ifdef NEPTUNE_BOARD |
133 #define EM_EDITOR_SIZE 500 /*SPR 1757, increased size of editor buffer*/ | 133 #define EM_EDITOR_SIZE 500 /*SPR 1757, increased size of editor buffer*/ |
145 EXTERN T_ENG_INFO_STATIC_REQ* Eng_Info_Static_Req; | 145 EXTERN T_ENG_INFO_STATIC_REQ* Eng_Info_Static_Req; |
146 | 146 |
147 EXTERN unsigned long *picture_col; | 147 EXTERN unsigned long *picture_col; |
148 EXTERN UBYTE RssiVal; | 148 EXTERN UBYTE RssiVal; |
149 | 149 |
150 int EmRequest = NULL; | 150 int EmRequest = NULL; |
151 #endif | 151 #endif |
152 | 152 |
153 /* | 153 /* |
154 **************************************Datatypes**************************************** | 154 **************************************Datatypes**************************************** |
155 */ | 155 */ |
188 int Mmi_em_event_cb(T_MFW_EVENT event, T_MFW_HND para); //Handles events from the MFW | 188 int Mmi_em_event_cb(T_MFW_EVENT event, T_MFW_HND para); //Handles events from the MFW |
189 T_MFW_HND Mmi_em_create(T_MFW_HND parent_window, MfwEmDataType data_type); //Create a window to display the information, specifying the keyboard, display and timer handlers. | 189 T_MFW_HND Mmi_em_create(T_MFW_HND parent_window, MfwEmDataType data_type); //Create a window to display the information, specifying the keyboard, display and timer handlers. |
190 void Mmi_em_destroy(T_MFW_HND own_window); //Deallocate window data and delete window. | 190 void Mmi_em_destroy(T_MFW_HND own_window); //Deallocate window data and delete window. |
191 int Mmi_em_kbd_cb(T_MFW_EVENT event,T_MFW_KBD * kc ); //Handles key presses in the display window | 191 int Mmi_em_kbd_cb(T_MFW_EVENT event,T_MFW_KBD * kc ); //Handles key presses in the display window |
192 int Mmi_em_win_cb(T_MFW_EVENT event,T_MFW_WIN * win );// Handles the information display. | 192 int Mmi_em_win_cb(T_MFW_EVENT event,T_MFW_WIN * win );// Handles the information display. |
193 void Mmi_em_tim_cb(T_MFW_EVENT event,T_MFW_TIM * t); //Handles the timer events. | 193 void Mmi_em_tim_cb(T_MFW_EVENT event,T_MFW_TIM * t); //Handles the timer events. |
194 | 194 |
195 | 195 |
196 | 196 |
197 | 197 |
198 /* | 198 /* |
203 /******************************************************************************* | 203 /******************************************************************************* |
204 | 204 |
205 $Function: mmi_em_init() | 205 $Function: mmi_em_init() |
206 | 206 |
207 $Description: initialise Engineering Mode module | 207 $Description: initialise Engineering Mode module |
208 | 208 |
209 $Returns: None | 209 $Returns: None |
210 | 210 |
211 $Arguments: None | 211 $Arguments: None |
212 | 212 |
213 *******************************************************************************/ | 213 *******************************************************************************/ |
214 void mmi_em_init(void) | 214 void mmi_em_init(void) |
215 { | 215 { |
216 Mfw_em_init(); | 216 Mfw_em_init(); |
217 | 217 |
220 /******************************************************************************* | 220 /******************************************************************************* |
221 | 221 |
222 $Function: mmi_em_enit() | 222 $Function: mmi_em_enit() |
223 | 223 |
224 $Description: exit Engineering Mode module | 224 $Description: exit Engineering Mode module |
225 | 225 |
226 $Returns: None | 226 $Returns: None |
227 | 227 |
228 $Arguments: None | 228 $Arguments: None |
229 | 229 |
230 *******************************************************************************/ | 230 *******************************************************************************/ |
231 void mmi_em_exit(void) | 231 void mmi_em_exit(void) |
232 { | 232 { |
233 Mfw_em_exit(); | 233 Mfw_em_exit(); |
234 } | 234 } |
238 /******************************************************************************* | 238 /******************************************************************************* |
239 | 239 |
240 $Function: mmi_em_start_eng_mode_menus() | 240 $Function: mmi_em_start_eng_mode_menus() |
241 | 241 |
242 $Description: starts the emergency mode menu | 242 $Description: starts the emergency mode menu |
243 | 243 |
244 $Returns: None | 244 $Returns: None |
245 | 245 |
246 $Arguments: parent window | 246 $Arguments: parent window |
247 | 247 |
248 *******************************************************************************/ | 248 *******************************************************************************/ |
249 void mmi_em_start_eng_mode_menus(T_MFW_HND parent) | 249 void mmi_em_start_eng_mode_menus(T_MFW_HND parent) |
250 { | 250 { |
251 TRACE_EVENT("mmi_em_start_eng_mode_menus"); | 251 TRACE_EVENT("mmi_em_start_eng_mode_menus"); |
252 bookMenuStart(parent, EngModeAttributes(), NULL); | 252 bookMenuStart(parent, EngModeAttributes(), NULL); |
253 | 253 |
254 } | 254 } |
255 #endif | 255 #endif |
259 /******************************************************************************* | 259 /******************************************************************************* |
260 | 260 |
261 $Function: Mmi_em_display_mobile_info_data() | 261 $Function: Mmi_em_display_mobile_info_data() |
262 | 262 |
263 $Description: Called from menu; begins process to display Mobile Information | 263 $Description: Called from menu; begins process to display Mobile Information |
264 | 264 |
265 $Returns: status integer | 265 $Returns: status integer |
266 | 266 |
267 $Arguments: menu and item (not used) | 267 $Arguments: menu and item (not used) |
268 | 268 |
269 *******************************************************************************/ | 269 *******************************************************************************/ |
270 | 270 |
271 | 271 |
272 int Mmi_em_display_mobile_info_data(MfwMnu* m, MfwMnuItem* i) | 272 int Mmi_em_display_mobile_info_data(MfwMnu* m, MfwMnuItem* i) |
273 { T_MFW_HND parent = mfwParent( mfw_header()); | 273 { T_MFW_HND parent = mfwParent( mfw_header()); |
274 TRACE_EVENT_P1("Mmi_em_display_mobile_info(), parent win %d", parent); | 274 TRACE_EVENT_P1("Mmi_em_display_mobile_info(), parent win %d", parent); |
275 TRACE_EVENT_P1("Memory left:%d", mfwCheckMemoryLeft()); | 275 TRACE_EVENT_P1("Memory left:%d", mfwCheckMemoryLeft()); |
276 Mmi_em_create(parent, EM_MOBILE_INFO); | 276 Mmi_em_create(parent, EM_MOBILE_INFO); |
277 | 277 |
278 return MFW_EVENT_CONSUMED; | 278 return MFW_EVENT_CONSUMED; |
279 } | 279 } |
280 /******************************************************************************* | 280 /******************************************************************************* |
281 | 281 |
282 $Function: Mmi_em_display_serving_cell_params() | 282 $Function: Mmi_em_display_serving_cell_params() |
283 | 283 |
284 $Description: Called from menu; begins process to display Serving Cell parameters | 284 $Description: Called from menu; begins process to display Serving Cell parameters |
285 | 285 |
286 $Returns: status integer | 286 $Returns: status integer |
287 | 287 |
288 $Arguments: menu and item (not used) | 288 $Arguments: menu and item (not used) |
289 | 289 |
290 *******************************************************************************/ | 290 *******************************************************************************/ |
291 | 291 |
292 int Mmi_em_display_serving_cell_params(MfwMnu* m, MfwMnuItem* i) | 292 int Mmi_em_display_serving_cell_params(MfwMnu* m, MfwMnuItem* i) |
293 { T_MFW_HND parent = mfwParent( mfw_header()); | 293 { T_MFW_HND parent = mfwParent( mfw_header()); |
294 TRACE_EVENT_P1("MMiEm, Memory left:%d", mfwCheckMemoryLeft()); | 294 TRACE_EVENT_P1("MMiEm, Memory left:%d", mfwCheckMemoryLeft()); |
295 Mmi_em_create(parent, EM_SERVING_CELL_PARAMS); | 295 Mmi_em_create(parent, EM_SERVING_CELL_PARAMS); |
296 | 296 |
297 return MFW_EVENT_CONSUMED; | 297 return MFW_EVENT_CONSUMED; |
298 } | 298 } |
299 /******************************************************************************* | 299 /******************************************************************************* |
300 | 300 |
301 $Function: Mmi_em_display_neighbour_cell_params() | 301 $Function: Mmi_em_display_neighbour_cell_params() |
302 | 302 |
303 $Description: Called from menu; begins process to display Neighbouring Cell parameters | 303 $Description: Called from menu; begins process to display Neighbouring Cell parameters |
304 | 304 |
305 $Returns: status integer | 305 $Returns: status integer |
306 | 306 |
307 $Arguments: menu and item (not used) | 307 $Arguments: menu and item (not used) |
308 | 308 |
309 *******************************************************************************/ | 309 *******************************************************************************/ |
310 int Mmi_em_display_neighbour_cell_params(MfwMnu* m, MfwMnuItem* i) | 310 int Mmi_em_display_neighbour_cell_params(MfwMnu* m, MfwMnuItem* i) |
311 { T_MFW_HND parent = mfwParent( mfw_header()); | 311 { T_MFW_HND parent = mfwParent( mfw_header()); |
312 TRACE_EVENT_P1("MMiEm, Memory left:%d", mfwCheckMemoryLeft()); | 312 TRACE_EVENT_P1("MMiEm, Memory left:%d", mfwCheckMemoryLeft()); |
313 Mmi_em_create(parent, EM_NEIGHBOURING_CELL_PARAMS); | 313 Mmi_em_create(parent, EM_NEIGHBOURING_CELL_PARAMS); |
314 | 314 |
315 return MFW_EVENT_CONSUMED; | 315 return MFW_EVENT_CONSUMED; |
316 } | 316 } |
317 | 317 |
318 /******************************************************************************* | 318 /******************************************************************************* |
319 | 319 |
320 $Function: Mmi_em_display_location_params() | 320 $Function: Mmi_em_display_location_params() |
321 | 321 |
322 $Description: Called from menu; begins process to display Locationparameters | 322 $Description: Called from menu; begins process to display Locationparameters |
323 | 323 |
324 $Returns: status integer | 324 $Returns: status integer |
325 | 325 |
326 $Arguments: menu and item (not used) | 326 $Arguments: menu and item (not used) |
327 | 327 |
328 *******************************************************************************/ | 328 *******************************************************************************/ |
329 int Mmi_em_display_location_params(MfwMnu* m, MfwMnuItem*i ) | 329 int Mmi_em_display_location_params(MfwMnu* m, MfwMnuItem*i ) |
330 { T_MFW_HND parent = mfwParent( mfw_header()); | 330 { T_MFW_HND parent = mfwParent( mfw_header()); |
331 | 331 |
332 Mmi_em_create(parent, EM_LOCATION_PARAMS); | 332 Mmi_em_create(parent, EM_LOCATION_PARAMS); |
333 | 333 |
334 return MFW_EVENT_CONSUMED; | 334 return MFW_EVENT_CONSUMED; |
335 } | 335 } |
336 | 336 |
337 /******************************************************************************* | 337 /******************************************************************************* |
338 | 338 |
339 $Function: Mmi_em_display_ciph_hop_DTX_params() | 339 $Function: Mmi_em_display_ciph_hop_DTX_params() |
340 | 340 |
341 $Description: Called from menu; begins process to display Ciphering, hopping and | 341 $Description: Called from menu; begins process to display Ciphering, hopping and |
342 discontinuous transmission parameters | 342 discontinuous transmission parameters |
343 | 343 |
344 $Returns: status integer | 344 $Returns: status integer |
345 | 345 |
346 $Arguments: menu and item (not used) | 346 $Arguments: menu and item (not used) |
347 | 347 |
348 *******************************************************************************/ | 348 *******************************************************************************/ |
349 int Mmi_em_display_ciph_hop_DTX_params(MfwMnu* m, MfwMnuItem* i) | 349 int Mmi_em_display_ciph_hop_DTX_params(MfwMnu* m, MfwMnuItem* i) |
350 { T_MFW_HND parent = mfwParent( mfw_header()); | 350 { T_MFW_HND parent = mfwParent( mfw_header()); |
351 TRACE_EVENT_P1("MMiEm, Memory left:%d", mfwCheckMemoryLeft()); | 351 TRACE_EVENT_P1("MMiEm, Memory left:%d", mfwCheckMemoryLeft()); |
352 Mmi_em_create(parent, EM_CIPH_HOP_DTX_PARAMS); | 352 Mmi_em_create(parent, EM_CIPH_HOP_DTX_PARAMS); |
353 | 353 |
354 return MFW_EVENT_CONSUMED; | 354 return MFW_EVENT_CONSUMED; |
355 } | 355 } |
356 | 356 |
357 /******************************************************************************* | 357 /******************************************************************************* |
358 | 358 |
359 $Function: Mmi_em_display_GPRS_params() | 359 $Function: Mmi_em_display_GPRS_params() |
360 | 360 |
361 $Description: Called from menu; begins process to display GPRS specific parameters | 361 $Description: Called from menu; begins process to display GPRS specific parameters |
362 | 362 |
363 $Returns: status integer | 363 $Returns: status integer |
364 | 364 |
365 $Arguments: menu and item (not used) | 365 $Arguments: menu and item (not used) |
366 | 366 |
367 *******************************************************************************/ | 367 *******************************************************************************/ |
368 | 368 |
369 int Mmi_em_display_GPRS_params(MfwMnu* m, MfwMnuItem* i) | 369 int Mmi_em_display_GPRS_params(MfwMnu* m, MfwMnuItem* i) |
370 { T_MFW_HND parent = mfwParent( mfw_header()); | 370 { T_MFW_HND parent = mfwParent( mfw_header()); |
371 TRACE_EVENT_P1("MMiEm, Memory left:%d", mfwCheckMemoryLeft()); | 371 TRACE_EVENT_P1("MMiEm, Memory left:%d", mfwCheckMemoryLeft()); |
372 Mmi_em_create(parent, EM_GPRS_PARAMS); | 372 Mmi_em_create(parent, EM_GPRS_PARAMS); |
373 | 373 |
374 return MFW_EVENT_CONSUMED; | 374 return MFW_EVENT_CONSUMED; |
375 } | 375 } |
376 | 376 |
377 #else /* if NEPTUNE_BOARD */ | 377 #else /* if NEPTUNE_BOARD */ |
378 | 378 |
381 T_MFW_HND parent = mfwParent( mfw_header()); | 381 T_MFW_HND parent = mfwParent( mfw_header()); |
382 TRACE_EVENT_P1("Mmi_em_display_mobile_info(), parent win %d", parent); | 382 TRACE_EVENT_P1("Mmi_em_display_mobile_info(), parent win %d", parent); |
383 TRACE_EVENT_P1("Memory left:%d", mfwCheckMemoryLeft()); | 383 TRACE_EVENT_P1("Memory left:%d", mfwCheckMemoryLeft()); |
384 | 384 |
385 TRACE_EVENT_P1("Selected item: %d", m->lCursor[m->level]); | 385 TRACE_EVENT_P1("Selected item: %d", m->lCursor[m->level]); |
386 | 386 |
387 Mmi_em_create(parent, m->lCursor[m->level]); | 387 Mmi_em_create(parent, m->lCursor[m->level]); |
388 | 388 |
389 if(!EmRequest) | 389 if(!EmRequest) |
390 { | 390 { |
391 sAT_PercentESINFO(CMD_SRC_LCL,TIMER_ONE_SEC); | 391 sAT_PercentESINFO(CMD_SRC_LCL,TIMER_ONE_SEC); |
392 sAT_PercentEINFO(CMD_SRC_LCL,TIMER_ONE_SEC); | 392 sAT_PercentEINFO(CMD_SRC_LCL,TIMER_ONE_SEC); |
393 } | 393 } |
394 EmRequest = SAT_REQUEST_SENT; | 394 EmRequest = SAT_REQUEST_SENT; |
395 | 395 |
396 return MFW_EVENT_CONSUMED; | 396 return MFW_EVENT_CONSUMED; |
397 } | 397 } |
398 | 398 |
399 | 399 |
400 #endif /* ifndef NEPTUNE_BOARD */ | 400 #endif /* ifndef NEPTUNE_BOARD */ |
405 /******************************************************************************* | 405 /******************************************************************************* |
406 | 406 |
407 $Function: Mmi_em_create() | 407 $Function: Mmi_em_create() |
408 | 408 |
409 $Description: Creates emergency mode display window | 409 $Description: Creates emergency mode display window |
410 | 410 |
411 $Returns: window handle | 411 $Returns: window handle |
412 | 412 |
413 $Arguments: parent window, kind of data to be displayed | 413 $Arguments: parent window, kind of data to be displayed |
414 | 414 |
415 *******************************************************************************/ | 415 *******************************************************************************/ |
416 | 416 |
417 T_MFW_HND Mmi_em_create(T_MFW_HND parent_window, MfwEmDataType data_type) | 417 T_MFW_HND Mmi_em_create(T_MFW_HND parent_window, MfwEmDataType data_type) |
418 { | 418 { |
419 tEmData * data = (tEmData *)ALLOC_MEMORY (sizeof (tEmData )); | 419 tEmData * data = (tEmData *)ALLOC_MEMORY (sizeof (tEmData )); |
481 | 481 |
482 /******************************************************************************* | 482 /******************************************************************************* |
483 | 483 |
484 $Function: Mmi_em_event_cb() | 484 $Function: Mmi_em_event_cb() |
485 | 485 |
486 $Description: Handles events coming from the MFW | 486 $Description: Handles events coming from the MFW |
487 | 487 |
488 $Returns: status integer | 488 $Returns: status integer |
489 | 489 |
490 $Arguments: event type, pointer to data | 490 $Arguments: event type, pointer to data |
491 | 491 |
492 *******************************************************************************/ | 492 *******************************************************************************/ |
493 int Mmi_em_event_cb(T_MFW_EVENT event,void* para) | 493 int Mmi_em_event_cb(T_MFW_EVENT event,void* para) |
494 { | 494 { |
495 T_MFW_HND win = mfw_parent (mfw_header()); | 495 T_MFW_HND win = mfw_parent (mfw_header()); |
496 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | 496 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; |
497 tEmData * data = (tEmData *)win_data->user; | 497 tEmData * data = (tEmData *)win_data->user; |
498 | 498 |
499 #ifndef NEPTUNE_BOARD | 499 #ifndef NEPTUNE_BOARD |
509 char file[10]; | 509 char file[10]; |
510 char timeAndDate[25]; | 510 char timeAndDate[25]; |
511 #endif | 511 #endif |
512 | 512 |
513 char *temp_buffer=NULL; | 513 char *temp_buffer=NULL; |
514 | 514 |
515 #ifdef NEW_EDITOR | 515 #ifdef NEW_EDITOR |
516 T_ATB_TEXT temp_text;/*SPR 1757*/ | 516 T_ATB_TEXT temp_text;/*SPR 1757*/ |
517 #endif | 517 #endif |
518 TRACE_EVENT_P1("Mmi_em_event_cb(), event:%d", event); | 518 TRACE_EVENT_P1("Mmi_em_event_cb(), event:%d", event); |
519 temp_buffer=(char*)malloc(EM_EDITOR_SIZE*2*sizeof(char)); /*a0393213 lint warnings removal - dynamically allocated*/ | 519 temp_buffer=(char*)malloc(EM_EDITOR_SIZE*2*sizeof(char)); /*a0393213 lint warnings removal - dynamically allocated*/ |
520 if(temp_buffer==NULL) | 520 if(temp_buffer==NULL) |
521 { | 521 { |
522 TRACE_ERROR("Mmi_em_event_cb():No memory"); | 522 TRACE_ERROR("Mmi_em_event_cb():No memory"); |
535 return FALSE; | 535 return FALSE; |
536 } | 536 } |
537 | 537 |
538 sprintf(timeAndDate, "%s %s\n", mfw_td_get_clock_str(), mfw_td_get_date_str()); | 538 sprintf(timeAndDate, "%s %s\n", mfw_td_get_clock_str(), mfw_td_get_date_str()); |
539 ffs_write(fd, timeAndDate, strlen(timeAndDate)); | 539 ffs_write(fd, timeAndDate, strlen(timeAndDate)); |
540 | 540 |
541 #endif | 541 #endif |
542 | 542 |
543 | 543 |
544 /*if event matches current window type*/ | 544 /*if event matches current window type*/ |
545 if (event == data->CurrentWindow) | 545 if (event == data->CurrentWindow) |
546 { | 546 { |
547 switch (event) | 547 switch (event) |
548 { | 548 { |
549 #ifndef NEPTUNE_BOARD /*EngMode */ | 549 #ifndef NEPTUNE_BOARD /*EngMode */ |
550 | 550 |
551 case EM_MOBILE_INFO: | 551 case EM_MOBILE_INFO: |
552 { | 552 { |
553 mob_info = (MFW_EM_Mobile_Info*)para;/*cast parameter to appropriate type*/ | 553 mob_info = (MFW_EM_Mobile_Info*)para;/*cast parameter to appropriate type*/ |
554 /*copy data to editor buffer*/ | 554 /*copy data to editor buffer*/ |
555 /*MC, SPR 1554 Added all SW versions to editor string*/ | 555 /*MC, SPR 1554 Added all SW versions to editor string*/ |
556 sprintf(temp_buffer, "SIM_VERSION:%s CC_VERSION:%s SS_VERSION:%s SMS_VERSION:%s MM_VERSION:%s RR_VERSION:%s DL_VERSION:%s ALR_VERSION:%s IMEI:%s IMSI:%s TMSI:%u", | 556 sprintf(temp_buffer, "SIM_VERSION:%s CC_VERSION:%s SS_VERSION:%s SMS_VERSION:%s MM_VERSION:%s RR_VERSION:%s DL_VERSION:%s ALR_VERSION:%s IMEI:%s IMSI:%s TMSI:%u", |
557 mob_info->SIM_version, mob_info->CC_version, mob_info->SS_version, | 557 mob_info->SIM_version, mob_info->CC_version, mob_info->SS_version, |
558 mob_info->SMS_version, mob_info->MM_version, mob_info->RR_version, | 558 mob_info->SMS_version, mob_info->MM_version, mob_info->RR_version, |
559 mob_info->DL_version, mob_info->ALR_version,mob_info->IMEI, mob_info->IMSI, | 559 mob_info->DL_version, mob_info->ALR_version,mob_info->IMEI, mob_info->IMSI, |
560 mob_info->TMSI); | 560 mob_info->TMSI); |
561 /* SPR#1428 - SH - New Editor - string has changed, update word wrap */ | 561 /* SPR#1428 - SH - New Editor - string has changed, update word wrap */ |
574 #endif | 574 #endif |
575 win_show(data->win);/*show data*/ | 575 win_show(data->win);/*show data*/ |
576 } | 576 } |
577 break; | 577 break; |
578 #endif | 578 #endif |
579 | 579 |
580 case EM_SERVING_CELL_PARAMS: | 580 case EM_SERVING_CELL_PARAMS: |
581 { | 581 { |
582 #ifndef NEPTUNE_BOARD | 582 #ifndef NEPTUNE_BOARD |
583 sc_info = (MFW_EM_Serving_Cell_Parameters*)para;/*cast parameter to appropriate type*/ | 583 sc_info = (MFW_EM_Serving_Cell_Parameters*)para;/*cast parameter to appropriate type*/ |
584 sprintf(temp_buffer, "ARFCN:%d RSSI:%d RXQ:%d RLT:%d C1:%d C2:%d LAC:%d BSIC:%d TAV:%d",\ | 584 sprintf(temp_buffer, "ARFCN:%d RSSI:%d RXQ:%d RLT:%d C1:%d C2:%d LAC:%d BSIC:%d TAV:%d",\ |
585 sc_info->arfcn, sc_info->RSSI, sc_info->RXQ, sc_info->RLT, sc_info->C1, sc_info->C2,\ | 585 sc_info->arfcn, sc_info->RSSI, sc_info->RXQ, sc_info->RLT, sc_info->C1, sc_info->C2,\ |
586 sc_info->LAC, sc_info->BSIC, sc_info->TAV); | 586 sc_info->LAC, sc_info->BSIC, sc_info->TAV); |
587 #else | 587 #else |
588 sprintf (temp_buffer, "AFRCN = %u Cell ID = %u \nMCC<>: = %u %u %u\nMNC<>: %u %u %u\nLAC<> = %u %u\nRAC = %u\nMultiframe period = %u \nTMSI<> = %u %u %u %u \nMax retransmission = %u \nCall re establishment status flag = %u \nMax o/p pw on common control channel = %u \nMinimum signal level for access = %u", | 588 sprintf (temp_buffer, "AFRCN = %u Cell ID = %u \nMCC<>: = %u %u %u\nMNC<>: %u %u %u\nLAC<> = %u %u\nRAC = %u\nMultiframe period = %u \nTMSI<> = %u %u %u %u \nMax retransmission = %u \nCall re establishment status flag = %u \nMax o/p pw on common control channel = %u \nMinimum signal level for access = %u", |
589 Eng_Info_Req->info_rr.gsm_info.gsm_info_idle.pccch_info.pccch_channel.gsm_channel_static.arfcn, | 589 Eng_Info_Req->info_rr.gsm_info.gsm_info_idle.pccch_info.pccch_channel.gsm_channel_static.arfcn, |
590 Eng_Info_Req->info_rr.gsm_info.gsm_info_idle.gsm_cell_id, | 590 Eng_Info_Req->info_rr.gsm_info.gsm_info_idle.gsm_cell_id, |
591 Eng_Info_Static_Req->info_mm.mm_cmd_info.user_selected_plmn.mcc[0], | 591 Eng_Info_Static_Req->info_mm.mm_cmd_info.user_selected_plmn.mcc[0], |
592 Eng_Info_Static_Req->info_mm.mm_cmd_info.user_selected_plmn.mcc[1], | 592 Eng_Info_Static_Req->info_mm.mm_cmd_info.user_selected_plmn.mcc[1], |
593 Eng_Info_Static_Req->info_mm.mm_cmd_info.user_selected_plmn.mcc[2], | 593 Eng_Info_Static_Req->info_mm.mm_cmd_info.user_selected_plmn.mcc[2], |
594 Eng_Info_Static_Req->info_mm.mm_cmd_info.user_selected_plmn.mnc[0], | 594 Eng_Info_Static_Req->info_mm.mm_cmd_info.user_selected_plmn.mnc[0], |
610 | 610 |
611 ffs_write(fd, "Serving cell info\n",20 ); | 611 ffs_write(fd, "Serving cell info\n",20 ); |
612 ffs_write(fd, temp_buffer, strlen(temp_buffer)); | 612 ffs_write(fd, temp_buffer, strlen(temp_buffer)); |
613 | 613 |
614 #endif | 614 #endif |
615 | 615 |
616 /* SPR#1428 - SH - New Editor - string has changed, update word wrap */ | 616 /* SPR#1428 - SH - New Editor - string has changed, update word wrap */ |
617 #ifdef NEW_EDITOR | 617 #ifdef NEW_EDITOR |
618 /*SPR 1757 Insert temp buffer into editor*/ | 618 /*SPR 1757 Insert temp buffer into editor*/ |
619 temp_text.data = (UBYTE*)temp_buffer; | 619 temp_text.data = (UBYTE*)temp_buffer; |
620 temp_text.dcs = ATB_DCS_ASCII; | 620 temp_text.dcs = ATB_DCS_ASCII; |
628 strncpy(data->edtBuffer, temp_buffer, EM_EDITOR_SIZE);/*SPR 1757*/ | 628 strncpy(data->edtBuffer, temp_buffer, EM_EDITOR_SIZE);/*SPR 1757*/ |
629 #endif | 629 #endif |
630 win_show(data->win); | 630 win_show(data->win); |
631 } | 631 } |
632 break; | 632 break; |
633 | 633 |
634 case EM_NEIGHBOURING_CELL_PARAMS: | 634 case EM_NEIGHBOURING_CELL_PARAMS: |
635 { | 635 { |
636 #ifndef NEPTUNE_BOARD | 636 #ifndef NEPTUNE_BOARD |
637 nc_info = (MFW_EM_Neighbour_Cell_Parameters*)para;/*cast parameter to appropriate type*/ | 637 nc_info = (MFW_EM_Neighbour_Cell_Parameters*)para;/*cast parameter to appropriate type*/ |
638 /*copy data to editor buffer*/ | 638 /*copy data to editor buffer*/ |
639 sprintf(temp_buffer, "NUM:%d\nARFCN:RSSI:C2:LAC:BSIC\n %5d%5d%5d%6d%5d\n %5d%5d%5d%6d%5d\n %5d%5d%5d%6d%5d\n %5d%5d%5d%6d%5d\n %5d%5d%5d%6d%5d\n %5d%5d%5d%6d%5d\n SC%4d%5d%5d%6d%5d",\ | 639 sprintf(temp_buffer, "NUM:%d\nARFCN:RSSI:C2:LAC:BSIC\n %5d%5d%5d%6d%5d\n %5d%5d%5d%6d%5d\n %5d%5d%5d%6d%5d\n %5d%5d%5d%6d%5d\n %5d%5d%5d%6d%5d\n %5d%5d%5d%6d%5d\n SC%4d%5d%5d%6d%5d",\ |
640 nc_info->NUM,\ | 640 nc_info->NUM,\ |
641 nc_info->arfcn[0], nc_info->RSSI[0], nc_info->C2[0], nc_info->LAC_NC[0], nc_info->BSIC_NC[0],\ | 641 nc_info->arfcn[0], nc_info->RSSI[0], nc_info->C2[0], nc_info->LAC_NC[0], nc_info->BSIC_NC[0],\ |
651 | 651 |
652 #else /* NEPTUNE_BOARD*/ | 652 #else /* NEPTUNE_BOARD*/ |
653 sprintf (temp_buffer, "NEIGHBOURING CELL\nNUM : %d\nBCCH <> %d \nBSIC <> %d %d %d %d %d %d \nRXLEV <> %d %d %d %d %d %d\nC1 <> %d %d %d %d %d %d\nC2 <> %d %d %d %d %d %d\nC31 <> %d %d %d %d %d %d\nC32 <> %d %d %d %d %d %d\nARFCN <> %d %d %d %d %d %d\nFRAME OFFSET <> %d %d %d %d %d %d\nTIME ALIGN <> %d %d %d %d %d %d", | 653 sprintf (temp_buffer, "NEIGHBOURING CELL\nNUM : %d\nBCCH <> %d \nBSIC <> %d %d %d %d %d %d \nRXLEV <> %d %d %d %d %d %d\nC1 <> %d %d %d %d %d %d\nC2 <> %d %d %d %d %d %d\nC31 <> %d %d %d %d %d %d\nC32 <> %d %d %d %d %d %d\nARFCN <> %d %d %d %d %d %d\nFRAME OFFSET <> %d %d %d %d %d %d\nTIME ALIGN <> %d %d %d %d %d %d", |
654 Eng_Info_Req->info_rr.c_gsm_bba_cell, | 654 Eng_Info_Req->info_rr.c_gsm_bba_cell, |
655 Eng_Info_Req->info_rr.gsm_info.gsm_info_active.gsm_info_dedicated.bcch_channel, | 655 Eng_Info_Req->info_rr.gsm_info.gsm_info_active.gsm_info_dedicated.bcch_channel, |
656 | 656 |
657 | 657 |
658 Eng_Info_Req->info_rr.gsm_bba_cell[1].gsm_cell_info.gsm_cell_info_pbcch.bsic_match, | 658 Eng_Info_Req->info_rr.gsm_bba_cell[1].gsm_cell_info.gsm_cell_info_pbcch.bsic_match, |
659 Eng_Info_Req->info_rr.gsm_bba_cell[2].gsm_cell_info.gsm_cell_info_pbcch.bsic_match, | 659 Eng_Info_Req->info_rr.gsm_bba_cell[2].gsm_cell_info.gsm_cell_info_pbcch.bsic_match, |
660 Eng_Info_Req->info_rr.gsm_bba_cell[3].gsm_cell_info.gsm_cell_info_pbcch.bsic_match, | 660 Eng_Info_Req->info_rr.gsm_bba_cell[3].gsm_cell_info.gsm_cell_info_pbcch.bsic_match, |
661 Eng_Info_Req->info_rr.gsm_bba_cell[4].gsm_cell_info.gsm_cell_info_pbcch.bsic_match, | 661 Eng_Info_Req->info_rr.gsm_bba_cell[4].gsm_cell_info.gsm_cell_info_pbcch.bsic_match, |
724 ATB_edit_InsertString(data->editor, &temp_text); /* Insert name string */ | 724 ATB_edit_InsertString(data->editor, &temp_text); /* Insert name string */ |
725 ATB_edit_SetMode(data->editor, ED_MODE_READONLY); /* Switch on read only again */ | 725 ATB_edit_SetMode(data->editor, ED_MODE_READONLY); /* Switch on read only again */ |
726 ATB_edit_Refresh(data->editor); | 726 ATB_edit_Refresh(data->editor); |
727 #else /* !NEW_EDITOR */ | 727 #else /* !NEW_EDITOR */ |
728 strncpy(data->edtBuffer, temp_buffer, EM_EDITOR_SIZE);/*SPR 1757*/ | 728 strncpy(data->edtBuffer, temp_buffer, EM_EDITOR_SIZE);/*SPR 1757*/ |
729 #endif | 729 #endif |
730 win_show(data->win); | 730 win_show(data->win); |
731 } | 731 } |
732 break; | 732 break; |
733 | 733 |
734 #ifndef NEPTUNE_BOARD | 734 #ifndef NEPTUNE_BOARD |
735 case EM_LOCATION_PARAMS: | 735 case EM_LOCATION_PARAMS: |
736 { | 736 { |
737 loc_info = (MFW_EM_Location_Parameters*)para;/*cast parameter to appropriate type*/ | 737 loc_info = (MFW_EM_Location_Parameters*)para;/*cast parameter to appropriate type*/ |
738 /*copy data to editor buffer*/ | 738 /*copy data to editor buffer*/ |
739 /*MC, SPR 1554 Removed Cell id from editor string*/ | 739 /*MC, SPR 1554 Removed Cell id from editor string*/ |
740 sprintf(temp_buffer, "LUP:%d MCC:%s MNC:%s LAC:%d ", loc_info->LUP, loc_info->MCC, loc_info->MNC, loc_info->LAC); | 740 sprintf(temp_buffer, "LUP:%d MCC:%s MNC:%s LAC:%d ", loc_info->LUP, loc_info->MCC, loc_info->MNC, loc_info->LAC); |
741 /* SPR#1428 - SH - New Editor - string has changed, update word wrap */ | 741 /* SPR#1428 - SH - New Editor - string has changed, update word wrap */ |
742 #ifdef NEW_EDITOR | 742 #ifdef NEW_EDITOR |
743 /*SPR 1757 Insert temp buffer into editor*/ | 743 /*SPR 1757 Insert temp buffer into editor*/ |
744 temp_text.data = (UBYTE*)temp_buffer; | 744 temp_text.data = (UBYTE*)temp_buffer; |
749 ATB_edit_InsertString(data->editor, &temp_text); /* Insert name string */ | 749 ATB_edit_InsertString(data->editor, &temp_text); /* Insert name string */ |
750 ATB_edit_SetMode(data->editor, ED_MODE_READONLY); /* Switch on read only again */ | 750 ATB_edit_SetMode(data->editor, ED_MODE_READONLY); /* Switch on read only again */ |
751 ATB_edit_Refresh(data->editor); | 751 ATB_edit_Refresh(data->editor); |
752 #else /* !NEW_EDITOR */ | 752 #else /* !NEW_EDITOR */ |
753 strncpy(data->edtBuffer, temp_buffer, EM_EDITOR_SIZE);/*SPR 1757*/ | 753 strncpy(data->edtBuffer, temp_buffer, EM_EDITOR_SIZE);/*SPR 1757*/ |
754 #endif | 754 #endif |
755 /*show the window*/ | 755 /*show the window*/ |
756 win_show(data->win); | 756 win_show(data->win); |
757 } | 757 } |
758 break; | 758 break; |
759 #endif | 759 #endif |
760 | 760 |
761 #ifndef NEPTUNE_BOARD | 761 #ifndef NEPTUNE_BOARD |
762 case EM_CIPH_HOP_DTX_PARAMS: | 762 case EM_CIPH_HOP_DTX_PARAMS: |
763 { | 763 { |
764 ciph_hop_dtx_info = (MFW_EM_Ciph_hop_DTX_Parameters*)para;/*cast parameter to appropriate type*/ | 764 ciph_hop_dtx_info = (MFW_EM_Ciph_hop_DTX_Parameters*)para;/*cast parameter to appropriate type*/ |
765 /*convert DTX status to string*/ | 765 /*convert DTX status to string*/ |
766 if (ciph_hop_dtx_info->DTX_status == FALSE) | 766 if (ciph_hop_dtx_info->DTX_status == FALSE) |
767 DTX_Status = "Off"; | 767 DTX_Status = "Off"; |
768 else | 768 else |
769 DTX_Status = "On"; | 769 DTX_Status = "On"; |
770 //copy data to editor | 770 //copy data to editor |
787 win_show(data->win); | 787 win_show(data->win); |
788 } | 788 } |
789 break; | 789 break; |
790 #endif | 790 #endif |
791 | 791 |
792 #ifndef NEPTUNE_BOARD | 792 #ifndef NEPTUNE_BOARD |
793 case EM_GPRS_PARAMS: | 793 case EM_GPRS_PARAMS: |
794 { | 794 { |
795 gprs_info = (MFW_EM_GPRS_Parameter*)para;//cast parameter to appropriate type | 795 gprs_info = (MFW_EM_GPRS_Parameter*)para;//cast parameter to appropriate type |
796 /*MC, SPR 1554 Changed ediotr string to show Network Mode of Operation*/ | 796 /*MC, SPR 1554 Changed ediotr string to show Network Mode of Operation*/ |
797 sprintf(temp_buffer, "NMO:%d NDTS:%d RAC:%d C31:%d C32:%d",\ | 797 sprintf(temp_buffer, "NMO:%d NDTS:%d RAC:%d C31:%d C32:%d",\ |
798 gprs_info->NMO, gprs_info->NDTS, gprs_info->RAC, gprs_info->C31, gprs_info->C32); | 798 gprs_info->NMO, gprs_info->NDTS, gprs_info->RAC, gprs_info->C31, gprs_info->C32); |
799 //show the window | 799 //show the window |
800 /* SPR#1428 - SH - New Editor - string has changed, update word wrap */ | 800 /* SPR#1428 - SH - New Editor - string has changed, update word wrap */ |
801 #ifdef NEW_EDITOR | 801 #ifdef NEW_EDITOR |
813 #endif | 813 #endif |
814 win_show(data->win); | 814 win_show(data->win); |
815 } | 815 } |
816 break; | 816 break; |
817 #endif | 817 #endif |
818 | 818 |
819 | 819 |
820 #ifdef NEPTUNE_BOARD | 820 #ifdef NEPTUNE_BOARD |
821 case EM_SERVING_CELL_RF_PARAMS: | 821 case EM_SERVING_CELL_RF_PARAMS: |
822 sprintf (temp_buffer, "RSSI = %u\nDTX = %d \nC1 = %u \nC2 = %u \nCELL-RESELECT HYSTERESIS = %u \nC32 = %d\nRXLEV (FULL) = %u \nRXLEV(SUB) = %u \nRXQUAL(FULL) = %u \nRXQUAL(SUB) = %u \nTXPOWER Timing advance = %u\nSignal variance =%u", | 822 sprintf (temp_buffer, "RSSI = %u\nDTX = %d \nC1 = %u \nC2 = %u \nCELL-RESELECT HYSTERESIS = %u \nC32 = %d\nRXLEV (FULL) = %u \nRXLEV(SUB) = %u \nRXQUAL(FULL) = %u \nRXQUAL(SUB) = %u \nTXPOWER Timing advance = %u\nSignal variance =%u", |
823 RssiVal, | 823 RssiVal, |
896 Eng_Info_Req->info_grlc.channel_quality.bep_lqm.bep_period, | 896 Eng_Info_Req->info_grlc.channel_quality.bep_lqm.bep_period, |
897 Eng_Info_Req->info_grlc.channel_quality.bep_lqm.lqm_mode | 897 Eng_Info_Req->info_grlc.channel_quality.bep_lqm.lqm_mode |
898 ); | 898 ); |
899 | 899 |
900 ffs_write(fd, "Serving AMR info\n",20 ); | 900 ffs_write(fd, "Serving AMR info\n",20 ); |
901 ffs_write(fd, temp_buffer, strlen(temp_buffer)); | 901 ffs_write(fd, temp_buffer, strlen(temp_buffer)); |
902 | 902 |
903 /* SPR#1428 - SH - New Editor - string has changed, update word wrap */ | 903 /* SPR#1428 - SH - New Editor - string has changed, update word wrap */ |
904 #ifdef NEW_EDITOR | 904 #ifdef NEW_EDITOR |
905 /*SPR 1757 Insert temp buffer into editor*/ | 905 /*SPR 1757 Insert temp buffer into editor*/ |
906 temp_text.data = (UBYTE*)temp_buffer; | 906 temp_text.data = (UBYTE*)temp_buffer; |
930 Eng_Info_Req->info_sm.connection_info_sm[2].compression_data, | 930 Eng_Info_Req->info_sm.connection_info_sm[2].compression_data, |
931 Eng_Info_Req->info_sm.connection_info_sm[3].compression_data | 931 Eng_Info_Req->info_sm.connection_info_sm[3].compression_data |
932 ); | 932 ); |
933 | 933 |
934 ffs_write(fd, "Serving SNDCP info\n",21 ); | 934 ffs_write(fd, "Serving SNDCP info\n",21 ); |
935 ffs_write(fd, temp_buffer, strlen(temp_buffer)); | 935 ffs_write(fd, temp_buffer, strlen(temp_buffer)); |
936 | 936 |
937 /* SPR#1428 - SH - New Editor - string has changed, update word wrap */ | 937 /* SPR#1428 - SH - New Editor - string has changed, update word wrap */ |
938 #ifdef NEW_EDITOR | 938 #ifdef NEW_EDITOR |
939 /*SPR 1757 Insert temp buffer into editor*/ | 939 /*SPR 1757 Insert temp buffer into editor*/ |
940 temp_text.data = (UBYTE*)temp_buffer; | 940 temp_text.data = (UBYTE*)temp_buffer; |
949 strncpy(data->edtBuffer, temp_buffer, EM_EDITOR_SIZE);/*SPR 1757*/ | 949 strncpy(data->edtBuffer, temp_buffer, EM_EDITOR_SIZE);/*SPR 1757*/ |
950 #endif | 950 #endif |
951 win_show(data->win);/*show data*/ | 951 win_show(data->win);/*show data*/ |
952 break; | 952 break; |
953 | 953 |
954 | 954 |
955 case EM_USERLEVEL_PARAMS: | 955 case EM_USERLEVEL_PARAMS: |
956 | 956 |
957 sprintf (temp_buffer, "Application Data throughput\n Data rate = %u %u\n data_rate_retx = %u %u", | 957 sprintf (temp_buffer, "Application Data throughput\n Data rate = %u %u\n data_rate_retx = %u %u", |
958 Eng_Info_Req->info_grlc.rlc_mac_statistic[0].throughput.data_rate, | 958 Eng_Info_Req->info_grlc.rlc_mac_statistic[0].throughput.data_rate, |
959 Eng_Info_Req->info_grlc.rlc_mac_statistic[1].throughput.data_rate, | 959 Eng_Info_Req->info_grlc.rlc_mac_statistic[1].throughput.data_rate, |
1196 strncpy(data->edtBuffer, temp_buffer, EM_EDITOR_SIZE);/*SPR 1757*/ | 1196 strncpy(data->edtBuffer, temp_buffer, EM_EDITOR_SIZE);/*SPR 1757*/ |
1197 #endif | 1197 #endif |
1198 win_show(data->win);/*show data*/ | 1198 win_show(data->win);/*show data*/ |
1199 | 1199 |
1200 break; | 1200 break; |
1201 | 1201 |
1202 #endif /*ifndef NEPTUNE BOARD */ | 1202 #endif /*ifndef NEPTUNE BOARD */ |
1203 default: | 1203 default: |
1204 free(temp_buffer); | 1204 free(temp_buffer); |
1205 return MFW_EVENT_REJECTED; | 1205 return MFW_EVENT_REJECTED; |
1206 } | 1206 } |
1207 } | 1207 } |
1208 else | 1208 else |
1209 { | 1209 { |
1210 free(temp_buffer); | 1210 free(temp_buffer); |
1221 | 1221 |
1222 /******************************************************************************* | 1222 /******************************************************************************* |
1223 $Function: Mmi_em_destroy() | 1223 $Function: Mmi_em_destroy() |
1224 $Description: Delete the window | 1224 $Description: Delete the window |
1225 $Returns: none | 1225 $Returns: none |
1226 $Arguments: window handle | 1226 $Arguments: window handle |
1227 *******************************************************************************/ | 1227 *******************************************************************************/ |
1228 void Mmi_em_destroy(T_MFW_HND own_window) | 1228 void Mmi_em_destroy(T_MFW_HND own_window) |
1229 { | 1229 { |
1230 T_MFW_WIN * win = ((T_MFW_HDR *)own_window)->data; | 1230 T_MFW_WIN * win = ((T_MFW_HDR *)own_window)->data; |
1231 tEmData * data = (tEmData *)win->user; | 1231 tEmData * data = (tEmData *)win->user; |
1265 /******************************************************************************* | 1265 /******************************************************************************* |
1266 | 1266 |
1267 $Function: Mmi_em_kbd_cb() | 1267 $Function: Mmi_em_kbd_cb() |
1268 | 1268 |
1269 $Description: Keyboard handler | 1269 $Description: Keyboard handler |
1270 | 1270 |
1271 $Returns: status int | 1271 $Returns: status int |
1272 | 1272 |
1273 $Arguments: event, keyboard data | 1273 $Arguments: event, keyboard data |
1274 | 1274 |
1275 *******************************************************************************/ | 1275 *******************************************************************************/ |
1276 int Mmi_em_kbd_cb(T_MFW_EVENT event,T_MFW_KBD * kc ) | 1276 int Mmi_em_kbd_cb(T_MFW_EVENT event,T_MFW_KBD * kc ) |
1277 { | 1277 { |
1278 T_MFW_HND win = mfw_parent (mfw_header()); | 1278 T_MFW_HND win = mfw_parent (mfw_header()); |
1279 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | 1279 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; |
1292 if(strlen(command) > 8) | 1292 if(strlen(command) > 8) |
1293 { | 1293 { |
1294 memset(command, '\0', sizeof(command)); | 1294 memset(command, '\0', sizeof(command)); |
1295 } | 1295 } |
1296 #endif | 1296 #endif |
1297 | 1297 |
1298 TRACE_EVENT_P2("Mmi_em_kbd_cb, key:%d, win;%d", kc->code, data->win); | 1298 TRACE_EVENT_P2("Mmi_em_kbd_cb, key:%d, win;%d", kc->code, data->win); |
1299 | 1299 |
1300 switch(kc->code) | 1300 switch(kc->code) |
1301 { | 1301 { |
1302 | 1302 |
1303 case KCD_MNUUP:/*scroll up */ | 1303 case KCD_MNUUP:/*scroll up */ |
1304 /* SPR#1428 - SH - New Editor changes */ | 1304 /* SPR#1428 - SH - New Editor changes */ |
1305 #ifdef NEW_EDITOR | 1305 #ifdef NEW_EDITOR |
1306 ATB_edit_MoveCursor(data->editor, ctrlUp, TRUE); | 1306 ATB_edit_MoveCursor(data->editor, ctrlUp, TRUE); |
1307 #else /* NEW_EDITOR */ | 1307 #else /* NEW_EDITOR */ |
1308 edtChar(data->edt,ecUp); | 1308 edtChar(data->edt,ecUp); |
1309 #endif /* NEW_EDITOR */ | 1309 #endif /* NEW_EDITOR */ |
1310 break; | 1310 break; |
1311 | 1311 |
1312 case KCD_MNUDOWN:/*scroll down*/ | 1312 case KCD_MNUDOWN:/*scroll down*/ |
1313 /* SPR#1428 - SH - New Editor changes */ | 1313 /* SPR#1428 - SH - New Editor changes */ |
1314 #ifdef NEW_EDITOR | 1314 #ifdef NEW_EDITOR |
1315 ATB_edit_Char(data->editor,ctrlDown, TRUE); | 1315 ATB_edit_Char(data->editor,ctrlDown, TRUE); |
1316 #else /* NEW_EDITOR */ | 1316 #else /* NEW_EDITOR */ |
1317 edtChar(data->edt,ecDown); | 1317 edtChar(data->edt,ecDown); |
1318 #endif /* NEW_EDITOR */ | 1318 #endif /* NEW_EDITOR */ |
1319 | 1319 |
1320 break; | 1320 break; |
1321 #ifdef NEPTUNE_BOARD /*EngMode */ | 1321 #ifdef NEPTUNE_BOARD /*EngMode */ |
1322 case KCD_0: | 1322 case KCD_0: |
1323 strcat(command, "0"); | 1323 strcat(command, "0"); |
1324 break; | 1324 break; |
1354 break; | 1354 break; |
1355 case KCD_HASH: | 1355 case KCD_HASH: |
1356 strcat(command, "#"); | 1356 strcat(command, "#"); |
1357 if(!strcmp(command,"###1234#")) | 1357 if(!strcmp(command,"###1234#")) |
1358 { | 1358 { |
1359 TRACE_EVENT_P1("Handle capture, command :%s", command); | 1359 TRACE_EVENT_P1("Handle capture, command :%s", command); |
1360 | 1360 |
1361 strcpy(file, "/NOR/pic"); | 1361 strcpy(file, "/NOR/pic"); |
1362 // strcpy(strTemp, "/NOR/pic"); | 1362 // strcpy(strTemp, "/NOR/pic"); |
1363 memset(strTemp, '\0', sizeof(strTemp)); | 1363 memset(strTemp, '\0', sizeof(strTemp)); |
1364 nCopy = 0; | 1364 nCopy = 0; |
1368 nCopy++; | 1368 nCopy++; |
1369 sprintf(strTemp, "%d", nCopy); | 1369 sprintf(strTemp, "%d", nCopy); |
1370 strcat(file, strTemp); | 1370 strcat(file, strTemp); |
1371 ffs_close((fd_t) fd); | 1371 ffs_close((fd_t) fd); |
1372 } | 1372 } |
1373 TRACE_EVENT_P1("nCopy:%d", nCopy); | 1373 TRACE_EVENT_P1("nCopy:%d", nCopy); |
1374 sprintf( strTemp, "%d", nCopy); | 1374 sprintf( strTemp, "%d", nCopy); |
1375 // strcat( file, strTemp ); | 1375 // strcat( file, strTemp ); |
1376 TRACE_EVENT_P1("file:%s", file); | 1376 TRACE_EVENT_P1("file:%s", file); |
1377 fd = ffs_open(file, FFS_O_CREATE|FFS_O_WRONLY|FFS_O_TRUNC); | 1377 fd = ffs_open(file, FFS_O_CREATE|FFS_O_WRONLY|FFS_O_TRUNC); |
1378 ffs_write(fd, picture_col, 320*240); | 1378 ffs_write(fd, picture_col, 320*240); |
1379 ffs_close(fd); | 1379 ffs_close(fd); |
1380 | 1380 |
1381 memset(command, '\0', sizeof(command)); | 1381 memset(command, '\0', sizeof(command)); |
1382 | 1382 |
1383 } | 1383 } |
1384 | 1384 |
1385 break; | 1385 break; |
1386 #endif | 1386 #endif |
1387 | 1387 |
1388 case KCD_HUP: /*destroy window*/ | 1388 case KCD_HUP: /*destroy window*/ |
1389 case KCD_RIGHT: | 1389 case KCD_RIGHT: |
1390 #ifdef NEPTUNE_BOARD | 1390 #ifdef NEPTUNE_BOARD |
1391 EmRequest = NULL; | 1391 EmRequest = NULL; |
1392 sAT_PercentEINFO(CMD_SRC_LCL,TIMER_STOP); | 1392 sAT_PercentEINFO(CMD_SRC_LCL,TIMER_STOP); |
1393 sAT_PercentESINFO(CMD_SRC_LCL,TIMER_STOP); | 1393 sAT_PercentESINFO(CMD_SRC_LCL,TIMER_STOP); |
1394 Mmi_em_destroy(data->win); | 1394 Mmi_em_destroy(data->win); |
1395 memset(command, '\0', sizeof(command)); | 1395 memset(command, '\0', sizeof(command)); |
1397 Mmi_em_destroy(data->win); | 1397 Mmi_em_destroy(data->win); |
1398 #endif | 1398 #endif |
1399 break; | 1399 break; |
1400 default: | 1400 default: |
1401 break; | 1401 break; |
1402 } | 1402 } |
1403 return MFW_EVENT_CONSUMED; | 1403 return MFW_EVENT_CONSUMED; |
1404 } | 1404 } |
1405 | 1405 |
1406 /******************************************************************************* | 1406 /******************************************************************************* |
1407 | 1407 |
1408 $Function: Mmi_em_win_cb() | 1408 $Function: Mmi_em_win_cb() |
1409 | 1409 |
1410 $Description: Display handler | 1410 $Description: Display handler |
1411 | 1411 |
1412 $Returns: status int | 1412 $Returns: status int |
1413 | 1413 |
1414 $Arguments: event, window handle | 1414 $Arguments: event, window handle |
1415 | 1415 |
1416 *******************************************************************************/ | 1416 *******************************************************************************/ |
1417 int Mmi_em_win_cb(T_MFW_EVENT event,T_MFW_WIN * win ) | 1417 int Mmi_em_win_cb(T_MFW_EVENT event,T_MFW_WIN * win ) |
1418 { | 1418 { |
1419 tEmData* data = (tEmData *)win->user; | 1419 tEmData* data = (tEmData *)win->user; |
1420 | 1420 |
1449 /******************************************************************************* | 1449 /******************************************************************************* |
1450 | 1450 |
1451 $Function: Mmi_em_tim_cb() | 1451 $Function: Mmi_em_tim_cb() |
1452 | 1452 |
1453 $Description: Timer handler (every second) | 1453 $Description: Timer handler (every second) |
1454 | 1454 |
1455 $Returns: none | 1455 $Returns: none |
1456 | 1456 |
1457 $Arguments: event, timer data | 1457 $Arguments: event, timer data |
1458 | 1458 |
1459 *******************************************************************************/ | 1459 *******************************************************************************/ |
1460 void Mmi_em_tim_cb(T_MFW_EVENT event,T_MFW_TIM * t) | 1460 void Mmi_em_tim_cb(T_MFW_EVENT event,T_MFW_TIM * t) |
1461 { | 1461 { |
1462 T_MFW_HND win = mfw_parent (mfw_header()); | 1462 T_MFW_HND win = mfw_parent (mfw_header()); |
1463 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; | 1463 T_MFW_WIN * win_data = ((T_MFW_HDR *)win)->data; |