changeset 786:e7250023ca12

aci: ati_phb.c, ati_prs.c and ati_ret.c done
author Space Falcon <falcon@ivan.Harhan.ORG>
date Thu, 12 Mar 2015 06:53:01 +0000
parents 09382de17df9
children 0b85dd2dec6a
files gsm-fw/g23m-aci/aci/Makefile gsm-fw/g23m-aci/aci/ati_phb.c gsm-fw/g23m-aci/aci/ati_prs.c gsm-fw/g23m-aci/aci/ati_ret.c
diffstat 4 files changed, 57 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/gsm-fw/g23m-aci/aci/Makefile	Thu Mar 12 05:29:06 2015 +0000
+++ b/gsm-fw/g23m-aci/aci/Makefile	Thu Mar 12 06:53:01 2015 +0000
@@ -8,7 +8,8 @@
 OBJS=	aci_aci.o aci_csf.o aci_em.o aci_lst.o aci_mem.o aci_mfw.o aci_pei.o \
 	aci_tim.o aci_util.o aoc.o \
 	ati_bas.o ati_cc.o ati_cmd.o ati_cphs.o ati_csc.o ati_dti.o ati_em.o \
-	ati_em_ret.o ati_err.o ati_io.o ati_mm.o ati_mmi.o ati_pdu.o
+	ati_em_ret.o ati_err.o ati_io.o ati_mm.o ati_mmi.o ati_pdu.o ati_phb.o \
+	ati_prs.o ati_ret.o
 
 all:	${OBJS}
 
--- a/gsm-fw/g23m-aci/aci/ati_phb.c	Thu Mar 12 05:29:06 2015 +0000
+++ b/gsm-fw/g23m-aci/aci/ati_phb.c	Thu Mar 12 06:53:01 2015 +0000
@@ -21,6 +21,11 @@
 #ifndef ATI_PHB_C
 #define ATI_PHB_C
 
+#include "config.h"
+#include "fixedconf.h"
+#include "condat-features.h"
+#include "aci_conf.h"
+
 #undef DUMMY_ATI_STRINGS
 
 #include "aci_all.h"
--- a/gsm-fw/g23m-aci/aci/ati_prs.c	Thu Mar 12 05:29:06 2015 +0000
+++ b/gsm-fw/g23m-aci/aci/ati_prs.c	Thu Mar 12 06:53:01 2015 +0000
@@ -21,6 +21,11 @@
 #ifndef ATI_PRS_C
 #define ATI_PRS_C
 
+#include "config.h"
+#include "fixedconf.h"
+#include "condat-features.h"
+#include "aci_conf.h"
+
 #include "aci_all.h"
 
 #include <stdio.h>
@@ -308,8 +313,9 @@
                 return 0;
             s++;
         }
-        if ( *b > '9' OR *b < '0') return 0; /*check if numeric value*/
-		else
+        if ( *b > '9' OR *b < '0')
+	    return 0; /*check if numeric value*/
+	else
             *s++ = *b++;
     }
     if(*(b-1) NEQ '"')
@@ -416,7 +422,7 @@
     b++;
   }
 
-    return ((*len) ? b : 0);
+  return ((*len) ? b : 0);
 }
 
 
--- a/gsm-fw/g23m-aci/aci/ati_ret.c	Thu Mar 12 05:29:06 2015 +0000
+++ b/gsm-fw/g23m-aci/aci/ati_ret.c	Thu Mar 12 06:53:01 2015 +0000
@@ -21,6 +21,11 @@
 #ifndef ATI_RET_C
 #define ATI_RET_C
 
+#include "config.h"
+#include "fixedconf.h"
+#include "condat-features.h"
+#include "aci_conf.h"
+
 #include "aci_all.h"  /* defines FF_TIMEZONE */
 
 #include "line_edit.h"
@@ -307,7 +312,7 @@
   cmdErrStr   = NULL;
 
 #ifdef ACI /* for ATI only version */
-	cmhMMI_handleAudioTone ( cmdId, RAT_NO_CARRIER, CPI_MSG_NotPresent );
+  cmhMMI_handleAudioTone ( cmdId, RAT_NO_CARRIER, CPI_MSG_NotPresent );
 #endif
 }
 
@@ -369,7 +374,7 @@
   cmdErrStr   = NULL;
 
 #ifdef ACI /* for ATI only version */
-	cmhMMI_handleAudioTone ( cmdId, RAT_NO_ANSWER, CPI_MSG_NotPresent );
+  cmhMMI_handleAudioTone ( cmdId, RAT_NO_ANSWER, CPI_MSG_NotPresent );
 #endif
 }
 
@@ -489,7 +494,7 @@
   cmdErrStr   = NULL;
 
 #ifdef ACI /* for ATI only version */
-	cmhMMI_handleAudioTone ( cmdId, RAT_CONNECT, CPI_MSG_NotPresent );
+  cmhMMI_handleAudioTone ( cmdId, RAT_CONNECT, CPI_MSG_NotPresent );
 #endif
 }
 
@@ -531,7 +536,7 @@
     cmdErrStr   = NULL;
 
 #ifdef ACI /* for ATI only version */
-		cmhMMI_handleAudioTone ( cmdId, RAT_CME, CPI_MSG_NotPresent );
+    cmhMMI_handleAudioTone ( cmdId, RAT_CME, CPI_MSG_NotPresent );
 #endif
   }
   else
@@ -606,7 +611,7 @@
 
   default:
     return(STAT_Other);
-   }
+  }
 }
 
 LOCAL T_ACI_NTW_STATUS get_raw_stat_among_P_CGREG( T_P_CGREG_STAT status )
@@ -621,7 +626,7 @@
 
   default:
     return(STAT_Other);
-   }
+  }
 }
 #endif /* GPRS */
 
@@ -5285,20 +5290,19 @@
 
 void aci_format_plmn_name(T_full_name * plmn, UBYTE *out)
 { 
-	USHORT size_of_plmn_name;
-	UBYTE dest_len=0;
-	UBYTE buf[MMR_MAX_TEXT_LEN];
-	
-	if(plmn->dcs ==0) /*GSM default */
-	{
-		dest_len = utl_cvt7To8(plmn->text,plmn->c_text,buf,0);
-	 	utl_chsetFromGsm(buf,dest_len,out,MMR_MAX_TEXT_LEN,&size_of_plmn_name,GSM_ALPHA_Def);
-	}
-	else if(plmn->dcs ==1) /*UCS2 */
-	{
-		utl_hexFromGsm(plmn->text,plmn->c_text,out,MMR_MAX_TEXT_LEN,&size_of_plmn_name,GSM_ALPHA_Def,CSCS_ALPHA_7_Bit);
-		
-	}
+  USHORT size_of_plmn_name;
+  UBYTE dest_len=0;
+  UBYTE buf[MMR_MAX_TEXT_LEN];
+
+  if(plmn->dcs ==0) /*GSM default */
+  {
+    dest_len = utl_cvt7To8(plmn->text,plmn->c_text,buf,0);
+    utl_chsetFromGsm(buf,dest_len,out,MMR_MAX_TEXT_LEN,&size_of_plmn_name,GSM_ALPHA_Def);
+  }
+  else if(plmn->dcs ==1) /*UCS2 */
+  {
+    utl_hexFromGsm(plmn->text,plmn->c_text,out,MMR_MAX_TEXT_LEN,&size_of_plmn_name,GSM_ALPHA_Def,CSCS_ALPHA_7_Bit);
+  }
 }	
 
 /*
@@ -5314,21 +5318,21 @@
 GLOBAL void rCI_PercentCNIV (T_MMR_INFO_IND *mmr_info_ind)
 {
   UBYTE srcId = srcId_cb;
-	char  buf1[MMR_MAX_TEXT_LEN] ; /*we limit the size of printed symbols to avoid stack size increase*/
-	char  buf2[MMR_MAX_TEXT_LEN] ;
-  
+  char  buf1[MMR_MAX_TEXT_LEN] ; /*we limit the size of printed symbols to avoid stack size increase*/
+  char  buf2[MMR_MAX_TEXT_LEN] ;
+
   char  plmn[7] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00};
   SHORT mcc = 0; 
   SHORT mnc = 0;
 
   TRACE_FUNCTION("rCI_PercentCNIV()");
 
-	memset(buf1,0,MMR_MAX_TEXT_LEN);
-	memset(buf2,0,MMR_MAX_TEXT_LEN);
+  memset(buf1,0,MMR_MAX_TEXT_LEN);
+  memset(buf2,0,MMR_MAX_TEXT_LEN);
 
   if (mmr_info_ind->plmn.v_plmn)
   {
-		cmhMM_CnvrtPLMN2INT( mmr_info_ind->plmn.mcc, mmr_info_ind->plmn.mnc, &mcc, &mnc );
+    cmhMM_CnvrtPLMN2INT( mmr_info_ind->plmn.mcc, mmr_info_ind->plmn.mnc, &mcc, &mnc );
   }
 
   /* build numeric plmn representation */
@@ -5341,17 +5345,17 @@
     sprintf (plmn, "\"%03X%03X\"", mcc, mnc);
   }
 
-	if (mmr_info_ind->short_name.v_name)  /* short name  */
-	{ 
-		aci_format_plmn_name(&mmr_info_ind->short_name, (UBYTE *)buf1);
-	}
+  if (mmr_info_ind->short_name.v_name)  /* short name  */
+  { 
+    aci_format_plmn_name(&mmr_info_ind->short_name, (UBYTE *)buf1);
+  }
+
+  if (mmr_info_ind->full_name.v_name) /* full name  */
+  {
+    aci_format_plmn_name(&mmr_info_ind->full_name, (UBYTE *)buf2);
+  }
   
-	if (mmr_info_ind->full_name.v_name) /* full name  */
-	{ 
-		aci_format_plmn_name(&mmr_info_ind->full_name, (UBYTE *)buf2);
-	}
-  
-	sprintf (g_sa, "%s \"%s\",\"%s\",%s", "%CNIV:", buf2, buf1, plmn);  
+  sprintf (g_sa, "%s \"%s\",\"%s\",%s", "%CNIV:", buf2, buf1, plmn);  
   
   /* Send response to AT interface */
   io_sendIndication(srcId, g_sa, ATI_NORMAL_OUTPUT);
@@ -5479,7 +5483,7 @@
 
   TRACE_FUNCTION("rCI_PercentCSTAT()");
 
-   if (ati_user_output_cfg[srcId].CSTAT_stat EQ 1)
+  if (ati_user_output_cfg[srcId].CSTAT_stat EQ 1)
   {
     pos = sprintf(g_sa,"%s: ","%CSTAT");