comparison gsm-fw/g23m-gsm/sim/sim_pei.c @ 753:7f68d2ab0d33

SIM_TOOLKIT re-enabled: the SIM entity code is broken without it
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sat, 11 Oct 2014 21:24:24 +0000
parents 2f7df7a314f8
children
comparison
equal deleted inserted replaced
752:ec171ca4afb4 753:7f68d2ab0d33
19 +----------------------------------------------------------------------------- 19 +-----------------------------------------------------------------------------
20 */ 20 */
21 21
22 #ifndef SIM_PEI_C 22 #ifndef SIM_PEI_C
23 #define SIM_PEI_C 23 #define SIM_PEI_C
24
25 #include "config.h"
26 #include "fixedconf.h"
27 #include "condat-features.h"
24 28
25 #define ENTITY_SIM 29 #define ENTITY_SIM
26 30
27 /*==== INCLUDES ===================================================*/ 31 /*==== INCLUDES ===================================================*/
28 32
587 #if defined (_SIMULATION_) 591 #if defined (_SIMULATION_)
588 sim_data.mode = 0; 592 sim_data.mode = 0;
589 #endif 593 #endif
590 594
591 #ifdef FF_EM_MODE 595 #ifdef FF_EM_MODE
592 em_init_sim_event_trace(); 596 em_init_sim_event_trace();
593 #endif /* FF_EM_MODE */ 597 #endif /* FF_EM_MODE */
594 cl_shrd_init(sim_handle); 598 cl_shrd_init(sim_handle);
595 return PEI_OK; 599 return PEI_OK;
596 } 600 }
597 601
643 647
644 */ 648 */
645 649
646 static void sim_timeout (USHORT index) 650 static void sim_timeout (USHORT index)
647 { 651 {
648 if (index EQ SIM_TIMER) 652 if (index EQ SIM_TIMER)
649 { 653 {
650 if(sleepTimerRunning == TRUE) 654 if(sleepTimerRunning == TRUE)
651 { 655 {
652 TIMER_STOP(sim_handle, SLEEP_TIMER); 656 TIMER_STOP(sim_handle, SLEEP_TIMER);
653 } 657 }
654 sleepTimerRunning = FALSE; 658 sleepTimerRunning = FALSE;
655 app_sim_timeout (SIM_TIMER); 659 app_sim_timeout (SIM_TIMER);
656 } 660 }
657 else if(index EQ SLEEP_TIMER) 661 else if(index EQ SLEEP_TIMER)
658 { 662 {
659 sleepTimerRunning = FALSE; 663 sleepTimerRunning = FALSE;
660 app_sim_timeout (SLEEP_TIMER); 664 app_sim_timeout (SLEEP_TIMER);
661 } 665 }
662 #ifdef SIM_TOOLKIT 666 #ifdef SIM_TOOLKIT
663 else 667 else
664 { 668 {
665 if(sleepTimerRunning == TRUE) 669 if(sleepTimerRunning == TRUE)
666 { 670 {
667 TIMER_STOP(sim_handle, SLEEP_TIMER); 671 TIMER_STOP(sim_handle, SLEEP_TIMER);
668 } 672 }
669 sleepTimerRunning = FALSE; 673 sleepTimerRunning = FALSE;
670 stk_timeout (index); 674 stk_timeout (index);
671 } 675 }
672 #endif 676 #endif
673 677
674 if((startTimerPollOff == TRUE)&&(sim_data.idle_polling != TRUE)) 678 if((startTimerPollOff == TRUE)&&(sim_data.idle_polling != TRUE))
675 { 679 {
676 startTimerPollOff = FALSE; 680 startTimerPollOff = FALSE;
677 sleepTimerRunning = TRUE; 681 sleepTimerRunning = TRUE;
678 TIMER_START(sim_handle,SLEEP_TIMER,35000); // this will not be effective as the SIM TIMER will expire before this and stop it. Just to takecare of Sleep after the POLLING_OFF STK command 682 TIMER_START(sim_handle,SLEEP_TIMER,35000);
679 } 683 // this will not be effective as the SIM TIMER will expire before this and
680 684 // stop it. Just to takecare of Sleep after the POLLING_OFF STK command
681 } 685 }
682 686 }
683 687
684 688
685 #ifdef _SIMULATION_ 689 #ifdef _SIMULATION_
686 /* 690 /*
687 +--------------------------------------------------------------------+ 691 +--------------------------------------------------------------------+