changeset 750:05c04e46a650

sim_app.c compiles
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sat, 11 Oct 2014 20:40:52 +0000
parents ec6e503c1fc7
children b15d4b9d49c4
files gsm-fw/g23m-gsm/sim/Makefile gsm-fw/g23m-gsm/sim/sim_app.c
diffstat 2 files changed, 60 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/gsm-fw/g23m-gsm/sim/Makefile	Mon Oct 06 18:33:53 2014 +0000
+++ b/gsm-fw/g23m-gsm/sim/Makefile	Sat Oct 11 20:40:52 2014 +0000
@@ -1,5 +1,13 @@
-# stub Makefile, to be filled out
-all:
+CC=	arm-elf-gcc
+LD=	arm-elf-ld
+
+CFLAGS=	-O2 -fno-builtin -mthumb-interwork -mthumb
+CPPFLAGS=-I. -I../../include -I../../include/condat -I../../gpf/inc \
+	-I../../cdginc
+
+OBJS=	sim_app.o
+
+all:	${OBJS}
 
 clean:
 	rm -f *.[oa] *.out *errs
--- a/gsm-fw/g23m-gsm/sim/sim_app.c	Mon Oct 06 18:33:53 2014 +0000
+++ b/gsm-fw/g23m-gsm/sim/sim_app.c	Sat Oct 11 20:40:52 2014 +0000
@@ -21,6 +21,10 @@
 #ifndef SIM_APP_C
 #define SIM_APP_C
 
+#include "config.h"
+#include "fixedconf.h"
+#include "condat-features.h"
+
 #define ENTITY_SIM
 
 /*==== INCLUDES ===================================================*/
@@ -437,7 +441,8 @@
   if (SIM_IS_FLAG_SET (SIM_INSERT))
   {
     sim_read_record_cnf->cause = FKT_Select (sim_read_record_req->datafield,
-                                             sim_read_record_req->v_path_info, &sim_read_record_req->path_info,
+                                             sim_read_record_req->v_path_info,
+					     &sim_read_record_req->path_info,
                                              response, SIM_MIN_EF_ST_LEN);
 
       if (sim_read_record_cnf->cause EQ SIM_NO_ERROR)
@@ -502,7 +507,8 @@
   else
   {
     sim_read_record_cnf->length = 0;
-    memset (sim_read_record_cnf->linear_data, 0, sizeof (sim_read_record_cnf->linear_data));
+    memset (sim_read_record_cnf->linear_data, 0,
+	    sizeof (sim_read_record_cnf->linear_data));
   }
 
   SIM_EM_READ_RECORD_FILE;
@@ -552,7 +558,7 @@
         sim_update_cnf->cause = SIM_CAUSE_PARAM_WRONG;
       }
       else
-	  {
+      {
         sim_update_cnf->cause =
              FKT_UpdateBinary (sim_update_req->trans_data,
                            (USHORT)sim_update_req->length,
@@ -561,38 +567,40 @@
         app_start_status_timer (FALSE);
 
         if ((sim_update_cnf->cause EQ SIM_NO_ERROR) AND (sim_update_req->v_path_info EQ FALSE))
-		{
+	{
           switch(sim_update_req->datafield) 
-		  {
+	  {
             case SIM_PLMNSEL:
               if (SIM_IS_FLAG_SET (SERVICE_7_SUPPORT))
-			  {
+	      {
                 /*
-                 * MM should be notified about the changed file so that MM can read this file.
+                 * MM should be notified about the changed file so that MM can
+		 * read this file.
                  */
                 PALLOC (sim_mm_info_ind, SIM_MM_INFO_IND);
                 sim_mm_info_ind->datafield = sim_update_req->datafield;
                 PSENDX (MM, sim_mm_info_ind);
-			  }
+	      }
               break;
 #ifdef REL99
             case SIM_UCPS_ACTEC:
               if (SIM_IS_FLAG_SET (SERVICE_43_SUPPORT))
-			  {
+	      {
                 /*
-                 * MM should be notified about the changed file so that MM can read this file.
+                 * MM should be notified about the changed file so that MM can
+		 * read this file.
                  */
                 PALLOC (sim_mm_info_ind, SIM_MM_INFO_IND);
                 sim_mm_info_ind->datafield = sim_update_req->datafield;
                 PSENDX (MM, sim_mm_info_ind);
-			  }
+	      }
               break;
 #endif
             default:
               break;
-		  }
-		}
 	  }
+	}
+      }
     }
   }
   else
@@ -743,7 +751,8 @@
   if (SIM_IS_FLAG_SET (SIM_INSERT))
   {
     sim_increment_cnf->cause = FKT_Select (sim_increment_req->datafield,
-                                           sim_increment_req->v_path_info, &sim_increment_req->path_info,
+                                           sim_increment_req->v_path_info,
+					   &sim_increment_req->path_info,
                                            response,SIM_MIN_EF_ST_LEN );
 
       if (sim_increment_cnf->cause EQ SIM_NO_ERROR)
@@ -781,7 +790,8 @@
   }
   else
   {
-    memset (&sim_increment_cnf->linear_data, 0, sizeof (sim_increment_cnf->linear_data));
+    memset (&sim_increment_cnf->linear_data, 0,
+	    sizeof (sim_increment_cnf->linear_data));
     sim_increment_cnf->length = 0;
   }
 
@@ -1263,12 +1273,12 @@
   }
 //TISH, OMAPS00133714
 //start
-	else
-	{
-		  sim_data.remove_error = error;
-      app_sim_remove ();
-      sim_data.remove_error = SIM_CAUSE_CARD_REMOVED;
-	} 
+  else
+  {
+    sim_data.remove_error = error;
+    app_sim_remove ();
+    sim_data.remove_error = SIM_CAUSE_CARD_REMOVED;
+  } 
 //end
 }
 
@@ -1288,16 +1298,16 @@
   {
     case 0x00:/*8GSM 5V - No voltage class bits set.*/
       voltage_class = 0x10; /*UMTS CLASS A - Bit 5 set*/
-    break;
+      break;
     case 0x10:/*GSM 3V - Voltage class bit 5 set.*/
       voltage_class = 0x20;/*UMTS CLASS B - Bit 6 set*/
-    break;
+      break;
     case 0x30:/*GSM 1.8V - Voltage class bit 5 and 6 set.*/
       voltage_class = 0x40;/*UMTS CLASS C - Bit 7 set*/
-    break;
+      break;
     default:
       voltage_class = 0x00;
-    break;
+      break;
   }
   config_characteristics->uicc_characteristics = (voltage_class | clock_stop);
   TRACE_EVENT_P1 ("SIMDRV - SIM File Characteristics (Converted) : 0x%02X", config_characteristics->uicc_characteristics);
@@ -1357,8 +1367,8 @@
   }
 #else
   /*
-     * stop card detection timer
-    */
+   * stop card detection timer
+   */
   vsi_t_stop (VSI_CALLER SIM_TIMER);
 #endif
 
@@ -1532,9 +1542,9 @@
        */
       if ((dir_status.characteristics & 0x80) EQ 0)
       {
-      /*
-       * PIN is enabled
-       */
+        /*
+         * PIN is enabled
+         */
         sim_activate_cnf->cause = SIM_CAUSE_PIN1_EXPECT;
         SIM_SET_FLAG (SIM_PIN_FLAG);
       }
@@ -2400,11 +2410,13 @@
     /*
      * Presence check all thirty seconds
      */
-     if (timer EQ SLEEP_TIMER AND sim_data.sat_session EQ TRUE)
-     {
-       TRACE_EVENT("STK SESSION RUNNING");
-       return;
-     }
+#ifdef SIM_TOOLKIT
+    if (timer EQ SLEEP_TIMER AND sim_data.sat_session EQ TRUE)
+    {
+      TRACE_EVENT("STK SESSION RUNNING");
+      return;
+    }
+#endif
      	
     if ((error = FKT_Status (&pin_cnt, &pin2_cnt, &puk_cnt, &puk2_cnt))
         NEQ SIM_NO_ERROR)
@@ -2799,7 +2811,9 @@
       sim_data.act_directory = NOT_PRESENT_16BIT;
       sim_data.act_field     = NOT_PRESENT_16BIT;
       sim_data.status_time   = THIRTY_SECONDS;
+#ifdef SIM_TOOLKIT
       sim_data.cust_mode     = sim_activate_req->cust_mode;
+#endif
 
       if (sim_activate_req->mmi_pro_file & SIM_MMI_BDN)
         SIM_SET_FLAG (BDN_SUPPORT_BY_MMI);
@@ -3066,7 +3080,7 @@
   else
   {
     /*
-     * ME doesn´t support Call control with SIM Toolkit
+     * ME doesn't support Call control with SIM Toolkit
      */
 
     /*
@@ -3871,5 +3885,4 @@
   PSENDX (MMI, sim_access_cnf);
 }
 
-
 #endif