changeset 662:a712c95b60c1

gsm-fw/include/condat: import of TI's g23m/condat/com/include custom.h, pwr.h and rtc.h taken from TCS211 version, the others are the versions from LoCosto
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 28 Sep 2014 01:14:48 +0000
parents c36fe9d1da7e
children 643379e7e141
files gsm-fw/include/condat/audio.h gsm-fw/include/condat/cl_des.h gsm-fw/include/condat/cl_imei.h gsm-fw/include/condat/cl_list.h gsm-fw/include/condat/cl_md5.h gsm-fw/include/condat/cl_ribu.h gsm-fw/include/condat/cl_rlcmac.h gsm-fw/include/condat/cl_shrd.h gsm-fw/include/condat/custom.h gsm-fw/include/condat/dspl.h gsm-fw/include/condat/dti.h gsm-fw/include/condat/em.h gsm-fw/include/condat/ffs_coat.h gsm-fw/include/condat/font_bitmaps.h gsm-fw/include/condat/gsm.h gsm-fw/include/condat/kbd.h gsm-fw/include/condat/light.h gsm-fw/include/condat/message.h gsm-fw/include/condat/pcm.h gsm-fw/include/condat/prim.h gsm-fw/include/condat/pwr.h gsm-fw/include/condat/ra_l1int.h gsm-fw/include/condat/rtc.h gsm-fw/include/condat/rtcdrv.h gsm-fw/include/condat/rx.h gsm-fw/include/condat/socket_api.h gsm-fw/include/condat/vmd.h
diffstat 27 files changed, 8602 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/audio.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,273 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  GSM (6301)
+|  Modul   :  
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Types definitions for the audio driver
+|             .
++----------------------------------------------------------------------------- 
+
+********************************************************************************
+ 	$History: audio.h
+
+ 	xpradipg - LOCOST-SPR-33914: 25 Aug 2005
+ 	Description: MO to the Agilent resets the target
+ 	Solution: The enum value was assigned in one of the array which was not
+ 			propogated to another, due to buzzer removal there was a mismatch
+ 			the enum value assignment is guarded by a compiler flag
+
+ 	xpradipg - GSM-ENH-32494 : 23 June 2005
+ 	Description:	Support for various audio profiles
+ 	Solution:	The support for audio device's carkit/headset/loudspeaker/handheld.
+ 			The audio device is enabled as per the user actions.
+ 			
+********************************************************************************
+ 
+ 
+|		  Apr 04, 2005    REF: ENH 30063 xdeepadh
+|		  Description: Buzzer removal activity for Locosto MMI
+|		  Fix:All the Buzzer related calls are under the  compilation flag FF_BUZZER.
+|			The GSM tones which were playing in the buzzer are now routed to the speaker(Audio).     
++-----------------------------------------------------------------------------
+*/
+#ifdef FF_MMI_AUDIO_PROFILE
+#include "rv/rv_general.h"
+#include "audio/audio_api.h"
+#endif
+#ifndef AUDIO_H
+#define AUDIO_H
+
+/*
+ * Signal Types
+ */
+#define AUDIO_SIGTYPE_SOUNDDEND    0
+
+/*
+ * Return Values
+ */
+#define AUDIO_FCT_NOTSUPPORTED     20
+
+/*
+ * Audio Devices
+ */
+#define AUDIO_SPEAKER              1
+#define AUDIO_MICROPHONE           2
+#define AUDIO_BUZZER               3
+
+/*
+ * Audio Status
+ */
+/*#define NO_TONE          0 already defined in audio.h in L1 */
+#define BUZZER_ON        1
+#define BUZZER_SILENT    2
+#define TONE_ON          3
+#define TONE_SILENT      4
+
+/*
+ * Mute Status
+ */
+#define AUDIO_MUTING_ON  0
+#define AUDIO_MUTING_OFF 1
+
+/*
+ * Minimum and Maximum Volumes
+ */
+#define AUDIO_MIN_VOLUME      0
+#define AUDIO_MAX_VOLUME      255
+#define AUDIO_MIN_BUZ_VOLUME  0
+#define AUDIO_MAX_BUZ_VOLUME  255
+#define AUDIO_MIN_MIC_VOLUME  75
+#define AUDIO_MAX_MIC_VOLUME  75
+
+//xpradipg - 32494
+#ifdef FF_MMI_AUDIO_PROFILE
+#define CALLBACK_HEADSET 0
+#define CALLBACK_CARKIT 1
+#define MAX_EXT_AUD_DEVICE 2
+#endif
+
+enum AUDIO_SOUND_IDS
+{
+    AUDIO_MEL_LOW_BAT,
+    AUDIO_MEL_SMS_ALRT,
+    AUDIO_MEL_SWITCH_OFF,
+    AUDIO_MEL_AUTO_REDIAL,
+    AUDIO_MEL_KEY_BEEP,
+    AUDIO_MEL_ERROR_TONE,
+    AUDIO_MEL_USSD_TONE,
+    AUDIO_MEL_DIARY_TONE,
+    AUDIO_MEL_CB_TONE,
+    AUDIO_MEL_SVC_TONE,
+    AUDIO_MEL_MAN_PLMN_TONE,
+    AUDIO_MEL_CONNECT_CHARGER,
+    AUDIO_MEL_LOW_CREDIT,
+    AUDIO_MEL_ALARM_TONE,
+
+    AUDIO_MEL_TUNES,
+    AUDIO_PLAY_SINGLE_NOTE = 0xFF
+};
+
+//Apr 04, 2005    REF: ENH 30063 xdeepadh
+//Tone ids for Buzzer
+//When the buzzer is not available, the ringing tones will be played with midiringer.
+enum AUDIO_TONES_IDS
+{
+#ifndef FF_MMI_NO_BUZZER
+    TONES_RING_0,
+    TONES_RING_1,
+    TONES_RING_2,
+    TONES_RING_3,
+    TONES_RING_4,
+    TONES_RING_5,
+    TONES_RING_6,
+    TONES_RING_7,
+    TONES_RING_8,
+    TONES_RING_9,
+    TONES_RING_10,
+    TONES_RING_11,
+    TONES_RING_12,
+    TONES_RING_13,
+    TONES_RING_14,
+    TONES_RING_15,
+#endif
+    TONES_ERROR,
+    TONES_BUSY,
+    TONES_CONGEST,
+    TONES_DROPPED,
+    TONES_ACK,
+    TONES_CW,
+    TONES_DTMF_0,
+    TONES_DTMF_1,
+    TONES_DTMF_2,
+    TONES_DTMF_3,
+    TONES_DTMF_4,
+    TONES_DTMF_5,
+    TONES_DTMF_6,
+    TONES_DTMF_7,
+    TONES_DTMF_8,
+    TONES_DTMF_9,
+    TONES_DTMF_A,
+    TONES_DTMF_B,
+    TONES_DTMF_C,
+    TONES_DTMF_D,
+    TONES_DTMF_STAR,
+    TONES_DTMF_HASH,
+//xpradipg - LOCOST-SPR-33914: 25 Aug 2005    
+#ifndef FF_MMI_NO_BUZZER
+    TONES_KEYBEEP = 0x26,
+#else
+    TONES_KEYBEEP,
+#endif    
+    TONES_RINGING_TONE, /* SPR#2340 - DS - Added */
+    TONES_LAST_TONE_ID
+};
+
+/*
+ * internal data structures
+ */
+typedef struct
+{
+  USHORT      command_1;
+  USHORT      command_2;
+  USHORT      length;
+} T_DESCR;
+
+typedef struct
+{
+  UBYTE       status;
+  UBYTE       call_tone;
+  UBYTE       type;
+  T_DESCR   * descr;
+  UBYTE       volume;
+  UBYTE       style;
+  USHORT      descr_index;
+} T_ACT_TONE;
+
+/*
+ * Status Type
+ */
+typedef struct audio_Status_Type
+{
+  UBYTE min_volume;
+  UBYTE max_volume;
+} audio_Status_Type;
+
+enum AUDIO_PLAY_STYLES
+{
+    AUDIO_PLAY_CRESCENDO    = 0xff,
+    AUDIO_PLAY_INFINITE     =  0,
+    AUDIO_PLAY_ONCE         =  1
+};
+
+/*
+ * TTY definitions
+ */
+typedef enum
+{
+  TTY_OFF = 0,
+  TTY_VCO,
+  TTY_HCO,
+  TTY_ALL
+} T_TTY_CMD;
+
+#if defined (NEW_FRAME)
+/*
+ * to achieve backward compatibility with older definitions
+ */
+#define drv_SignalCB_Type           T_DRV_CB_FUNC
+#define drv_SignalID_Type           T_DRV_SIGNAL
+#define T_VSI_THANDLE               USHORT
+#endif
+/*
+ * Prototypes
+ */
+
+//  	xpradipg - GSM-ENH-32494 : 23 June 2005
+#ifdef FF_MMI_AUDIO_PROFILE
+EXTERN UBYTE audio_Init(T_ACCESSORY_CALLBACK *audioConfig);
+EXTERN void audio_set_path(int audioDevice,int stereo);
+#else
+EXTERN UBYTE audio_Init             (drv_SignalCB_Type   in_SignalCBPtr);
+#endif
+EXTERN void  audio_Exit             (void);
+EXTERN UBYTE audio_SetMute          (UBYTE               in_DeviceID,
+                                     UBYTE               in_Mode);
+EXTERN UBYTE audio_GetMute          (UBYTE               in_DeviceID,
+                                     UBYTE             * out_Mode);
+EXTERN UBYTE audio_GetSoundImage    (UBYTE               in_SoundID,
+                                     void              * out_SoundImagePtr);
+EXTERN UBYTE audio_SetAmplf         (UBYTE               in_DeviceID,
+                                     UBYTE               in_Amplf);
+EXTERN UBYTE audio_GetAmplf         (UBYTE               in_DeviceID,
+                                     UBYTE             * out_Amplf);
+EXTERN UBYTE audio_GetStatus        (UBYTE               in_DeviceID,
+                                     audio_Status_Type * out_StatusPtr);
+EXTERN UBYTE audio_PlaySoundID      (UBYTE               in_DeviceID,
+                                     UBYTE               in_SoundID,
+                                     BYTE                in_RelVolume,
+                                     UBYTE               in_Repeats);
+EXTERN UBYTE audio_PlaySoundbyImage (UBYTE               in_DeviceID,
+                                     void              * in_SoundImagePtr,
+                                     BYTE                in_RelVolume,
+                                     UBYTE               in_Repeats);
+EXTERN UBYTE audio_StopSoundbyID    (UBYTE               in_DeviceID,
+                                     UBYTE               in_SoundID);
+EXTERN UBYTE audio_StopSoundbyImage (UBYTE               in_DeviceID,
+                                     void              * in_SoundImagePtr);
+EXTERN UBYTE audio_SetSignal        (drv_SignalID_Type * in_SignalIDPtr);
+EXTERN UBYTE audio_ResetSignal      (drv_SignalID_Type * in_SignalIDPtr);
+GLOBAL void  audio_timeout          (T_VSI_THANDLE       handle);
+EXTERN void  audio_set_tty          (T_TTY_CMD           tty);
+EXTERN void  audio_dyn_set_tty          (T_TTY_CMD           tty);
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/cl_des.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,58 @@
+/*
++-----------------------------------------------------------------------------
+|  Project :  COMLIB
+|  Modul   :  cl_des.h
++-----------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas
+|                 Instruments Berlin, AG
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++-----------------------------------------------------------------------------
+|  Purpose :  Definitions of global types used by common library functions
+|             and the prototypes of those functions.
++-----------------------------------------------------------------------------
+*/
+/*
+ *  Version 1.0
+ */
+
+/**********************************************************************************/
+
+#ifndef CL_DES_H
+#define CL_DES_H
+
+/**********************************************************************************/
+
+#define CL_DES_BUFFER_SIZE   8
+#define CL_DES_KEY_SIZE      8
+#define CL_DES_ENCRYPTION    1
+#define CL_DES_DECRYPTION    2
+
+#if defined(CL_IMEI_CALYPSO_PLATFORM) && defined(FF_PROTECTED_IMEI)
+
+/*
++------------------------------------------------------------------------------
+| Function    : cl_des
++------------------------------------------------------------------------------
+| Description : The function performs DES encrypting or decrypting
+|
+| Parameters  : inMsgPtr   : pointer to input message M. The length of message
+|                            has to be min. 8 bytes e.g. M = 0123456789abcdef
+|               desKeyPtr  : pointer to DES key. Length has to be 8 bytes
+|                outMsgPtr : output encrypted/decrypted message. The length is 8 b.
+|                     code : CL_DES_ENCRYPTION, CL_DES_DECRYPTION
++------------------------------------------------------------------------------
+*/
+EXTERN void cl_des(UBYTE *inMsgPtr, UBYTE *desKeyPtr, UBYTE *outMsgPtr, UBYTE code);
+
+
+/**********************************************************************************/
+
+#endif
+#endif /* CL_DES_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/cl_imei.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,114 @@
+/*
++-----------------------------------------------------------------------------
+|  Project :  COMLIB
+|  Modul   :  cl_imei
++-----------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas
+|                 Instruments Berlin, AG
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++-----------------------------------------------------------------------------
+|  Purpose :  Definitions of global types used by common library functions
+|             and the prototypes of those functions.
++-----------------------------------------------------------------------------
+*/
+/*
+ *  Version 1.0
+ */
+
+/**********************************************************************************/
+
+#ifndef CL_IMEI_H
+#define CL_IMEI_H
+
+/**********************************************************************************/
+
+/*
+ * Compiler switches
+ */
+
+  /* Chipset Type          Value          Value name
+   * Gemini/Pole Star        0              _ge
+   * Hercules                2              _he
+ 	 * Ulysse                  3              _ul
+	 * Samson                  4              _sa
+	 * Ulysse G1 13MHz         5              _g1_13
+	 * Ulysse G1 26MHz         6              _g1_26
+	 * Calypso C05 (rev. A)    7              _cal
+   * Calypso C05 (rev. B)    8              _calb
+	 * Ulysse C035             9              _ul35
+	 * Calypso C035            10             _cal35
+	 * Calypso C035 Lite       11             _lite
+   * Calypso+                12             _cplus
+   */
+/******************************************************************************
+ * DIE ID and Platform settings
+ *****************************************************************************/
+/* DIE ID register
+  #define MEM_DEV_ID0     0xFFFEF000
+  #define MEM_DEV_ID1     0xFFFEF002
+*/
+/* For D-Sample: $CHIPSET  =  7 or 8 (=10 for D-sample AMR). */
+
+#ifdef _SIMULATION_
+#undef FF_PROTECTED_IMEI
+#endif
+
+#ifdef FF_PROTECTED_IMEI
+#ifdef CL_IMEI_CALYPSO_PLATFORM
+#define CL_IMEI_DIE_ID_REG    (MEM_DEV_ID0 | 0xF010) //+ 0xFFFEF010 for Calypso
+#endif
+#if !defined (CL_IMEI_CALYPSO_PLUS_PLATFORM) && !defined (CL_IMEI_CALYPSO_PLATFORM)
+#define CL_IMEI_OTHER_PLATFORM
+#endif
+#endif /* FF_PROTECTED_IMEI */
+
+/* DIE ID SIZE is 4 words (16 bits)long */
+#define CL_IMEI_SIZE                  8
+#define CL_IMEI_ISDID_SIZE            16
+#define CL_IMEI_DIE_ID_SIZE           4
+
+/* Return values */
+#define CL_IMEI_OK                    0
+#define CL_IMEI_ERROR                -1
+#define CL_IMEI_INVALID_DIE_ID       -2
+#define CL_IMEI_READ_IMEI_FAILED     -3
+
+/* Possible values for imeiType */
+#define CL_IMEI_GET_SECURE_IMEI       0
+#define CL_IMEI_GET_STORED_IMEI       1
+#define CL_IMEI_CONTROL_IMEI          2
+
+/*
++------------------------------------------------------------------------------
+| Function    : cl_get_imeisv
++------------------------------------------------------------------------------
+| Description : Common IMEI getter function
+|
+| Parameters  : imeiBufSize  - size of buffer where to store IMEI, min 8 BYTEs
+|               *imeiBufPtr  - pointer to buffer where to store the IMEI
+|               imeiType     - indicates, if the IMEI should be read from
+|                              FFS/Secure ROM (value=CL_IMEI_GET_SECURE_IMEI) or
+|                              if the already read and stored IMEI (if available)
+|                              should be delivered (value=CL_IMEI_GET_STORED_IMEI)
+|                              The second option should be used only by ACI or
+|                              BMI to show the IMEISV on mobile's display or
+|                              in terminal window, e.g. if user calls *#06#.
+|                              For IMEI Control reason (user by ACI), the value
+|                              has to be CL_IMEI_CONTROL_IMEI
+| Return      :           OK - 0
+|                      ERROR - negative values
++------------------------------------------------------------------------------
+*/
+extern BYTE cl_get_imeisv(USHORT imeiBufSize, UBYTE *imeiBufPtr, UBYTE imeiType);
+
+/**********************************************************************************/
+
+
+#endif /* CL_IMEI_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/cl_list.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,88 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  COMLIB
+|  Modul   :  RR/PL
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions of global types used by List Processing functions
+|             and the prototypes of those functions: RR/PL layer.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef CL_LIST_H
+#define CL_LIST_H
+
+/*==== CONST ================================================================*/
+
+#define BITOFFSET_LIST          1024
+
+#define MAX_BYTES_900           16
+#define MAX_BYTES_EGSM          23
+#define MAX_BYTES_1800          47
+#define MAX_BYTES_1900          38
+#define MAX_BYTES_DUAL          63
+#define MAX_BYTES_850           16
+#define MAX_BYTES_DUAL_EGSM     70
+#define MAX_BYTES_DUAL_US       54
+
+#define SET_CHANNEL_BIT     0
+#define RESET_CHANNEL_BIT   1
+#define GET_CHANNEL_BIT     2
+#define CHECK_CHANNEL       3
+
+
+#define T_LIST_MAX_SIZE 128 /* 1024/8 = 128 */
+typedef struct
+{
+  UBYTE                 channels [T_LIST_MAX_SIZE];
+} T_LIST;
+
+
+
+/*==== MACROS ================================================================*/
+
+#define srv_set_channel(list,ch)    scr_channel_bit(list,ch,SET_CHANNEL_BIT)
+#define srv_unset_channel(list,ch)  scr_channel_bit(list,ch,RESET_CHANNEL_BIT)
+#define srv_get_channel(list,ch)    scr_channel_bit(list,ch,GET_CHANNEL_BIT)
+
+/*==== VARS =================================================================*/
+
+/*==== TYPES =================================================================*/
+
+/*==== FUNCTIONS ============================================================*/
+
+EXTERN UBYTE  scr_channel_bit             (T_LIST              *list,
+                                           int                  channel,
+                                           int                  mode);
+EXTERN int    srv_create_list             (T_LIST              *list,
+                                           USHORT              *channel_array,
+                                           USHORT              size,
+                                           UBYTE               zero_at_start,
+                                           USHORT              start_index);
+EXTERN void   srv_clear_list              (T_LIST              *list);
+EXTERN void   srv_copy_list               (T_LIST              *target_list,
+                                           T_LIST              *source_list,
+                                           UBYTE               size);
+EXTERN UBYTE  srv_compare_list            (T_LIST              *list1,
+                                           T_LIST              *list2);
+EXTERN void   srv_merge_list              (T_LIST              *target_list,
+                                           T_LIST              *list);
+EXTERN void   srv_unmask_list             (T_LIST *target,T_LIST *source);
+EXTERN void   srv_trace_freq_in_list      (T_LIST *list);
+EXTERN U8     srv_get_region_from_std     (U8 std);
+EXTERN U16    srv_count_list              (T_LIST *list);
+extern BOOL   srv_is_list_set             (T_LIST *list);
+
+#endif /* #ifndef CL_LIST_H */
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/cl_md5.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,46 @@
+/*
++-----------------------------------------------------------------------------
+|  Project :  COMLIB
+|  Modul   :  cl_md5
++-----------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas
+|                 Instruments Berlin, AG
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++-----------------------------------------------------------------------------
+|  Purpose :  Definitions of global types used by common library functions
+|             and the prototypes of those functions.
++-----------------------------------------------------------------------------
+*/
+/*
+ *  Version 1.0
+ */
+
+/**********************************************************************************/
+
+#ifndef CL_MD5_H
+#define CL_MD5_H
+
+/**********************************************************************************/
+
+/* MD5 context. */
+typedef struct {
+  UINT state[4];                                   /* state (ABCD) */
+  UINT count[2];        /* number of bits, modulo 2^64 (lsb first) */
+  unsigned char buffer[64];                         /* input buffer */
+} MD5_CTX;
+
+/**********************************************************************************/
+
+EXTERN void cl_md5 (UBYTE *input, UINT len, UBYTE *digest);
+#ifdef _SIMULATION_
+EXTERN void cl_md5TestSuite (void);
+#endif
+
+#endif /* CL_RIBU_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/cl_ribu.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,71 @@
+/*
++-----------------------------------------------------------------------------
+|  Project :  COMLIB
+|  Modul   :  cl_ribu
++-----------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas
+|                 Instruments Berlin, AG
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++-----------------------------------------------------------------------------
+|  Purpose :  Definitions of global types used by common library functions
+|             and the prototypes of those functions.
++-----------------------------------------------------------------------------
+*/
+/*
+ *  Version 1.0
+ */
+
+/**********************************************************************************/
+
+#ifndef CL_RIBU_H
+#define CL_RIBU_H
+
+/**********************************************************************************/
+
+typedef struct
+{
+  U8 ri;        /* ring buffer read index */
+  U8 wi;        /* ring buffer write index */
+  U8 depth;     /* ring buffer depth */
+  U8 filled;    /* ring buffer filled flag */
+} T_RIBU;
+
+typedef struct
+{
+  U8 type;
+  U8 status;
+  U8 len;   /* buffer length */
+  U8 *buf;  /* buffer start address */
+} T_FD;     /* frame descriptor */
+
+typedef struct
+{
+  T_RIBU idx;
+  T_FD **pFDv;  /* frame descriptor vector */
+} T_RIBU_FD;
+
+/**********************************************************************************/
+
+EXTERN void cl_ribu_create(T_RIBU_FD **ribu, const U8 buflen, const U8 depth);
+EXTERN void cl_ribu_release(T_RIBU_FD **ribu);
+
+EXTERN void cl_ribu_put(const T_FD fd, T_RIBU_FD *ribu);
+EXTERN T_FD *cl_ribu_get(T_RIBU_FD *ribu);
+EXTERN T_FD *cl_ribu_get_new_frame_desc(T_RIBU_FD *ribu);
+
+EXTERN void cl_ribu_init(T_RIBU *ribu, const U8 depth);
+EXTERN U8   cl_ribu_read_index(T_RIBU *ribu);
+EXTERN U8   cl_ribu_write_index(T_RIBU *ribu);
+EXTERN BOOL cl_ribu_data_avail(const T_RIBU_FD *ribu);
+
+EXTERN  void cl_set_frame_desc(T_FRAME_DESC *frame_desc, U8 *A0, U16 L0, U8 *A1, U16 L1);
+EXTERN  void cl_set_frame_desc_0(T_FRAME_DESC *frame_desc, U8 *A0, U16 L0);
+
+#endif /* CL_RIBU_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/cl_rlcmac.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,84 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  COMLIB
+|  Modul   :  RLCMAC
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions of global types used by common library functions
+|             and the prototypes of those functions: RLC/MAC layer.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef CL_RLCMAC_H
+#define CL_RLCMAC_H
+
+/*==== CONST ================================================================*/
+/*
+ * Start defintions from entity RR
+ */
+
+/*
+ ******************************************************************************
+ * The following declarations shall be identical with the corresponding 
+ * declarations located in RR. 
+ ******************************************************************************
+ */
+
+EXTERN UBYTE rr_csf_get_radio_access_capability( T_ra_cap *ra_cap      );
+EXTERN void  RX_SetRxQual                      ( UBYTE     new_rx_qual );
+
+/*
+ ******************************************************************************
+ * The above declarations shall be identical with the corresponding 
+ * declarations located in RR. 
+ ******************************************************************************
+ */
+
+/*
+ * End defintions from entity RR
+ */
+
+/*
+ * Used for tracing purposes, see also function cl_rlcmac_get_msg_name
+ */
+
+#define RLC_MAC_MAX_LEN_CHANNEL_REQ  2
+
+#define D_MSG_TYPE_CRC_ERROR_c       0xFD
+#define D_MSG_TYPE_2ND_SEGMENT_c     0xFE
+#define D_MSG_TYPE_UNKNOWN_c         0xFF
+
+#define U_MSG_TYPE_CHANNEL_REQ_c     0xFE
+#define U_MSG_TYPE_UNKNOWN_c         0xFF
+
+typedef enum /* T_RLC_MAC_ROUTE */
+{
+  RLC_MAC_ROUTE_UL,
+  RLC_MAC_ROUTE_DL
+} T_RLC_MAC_ROUTE;
+
+/*==== VARS =================================================================*/
+
+/*==== TYPES =================================================================*/
+
+/*==== FUNCTIONS ============================================================*/
+
+#if !defined (NTRACE)
+
+EXTERN char*  cl_rlcmac_get_msg_name   ( UBYTE           msg_type,
+                                         T_RLC_MAC_ROUTE route                );
+
+#endif /* #if !defined (NTRACE) */
+
+#endif /* #ifndef CL_RLCMAC_H */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/cl_shrd.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,113 @@
+/*
++-----------------------------------------------------------------------------
+|  Project :  COMLIB
+|  Modul   :  cl_shrd
++-----------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas
+|                 Instruments Berlin, AG
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++-----------------------------------------------------------------------------
+|  Purpose :  Definitions of global types used by common library functions
+|             and the prototypes of those functions.
++-----------------------------------------------------------------------------
+*/
+/*
+ *  Version 1.0
+ */
+
+/**********************************************************************************/
+#ifndef CL_SHRD_H
+#define CL_SHRD_H
+
+#ifdef TI_PS_FF_AT_P_CMD_CTREG
+#define MAX_CTREG_TAB_LEN 25
+#endif /* TI_PS_FF_AT_P_CMD_CTREG */
+
+/* ME STATUS for Timing advance structure */
+#define ME_STATUS_IDLE         0
+#define ME_STATUS_NOT_IDLE     1
+
+
+/*====STRUCTURE DEFINITION=========================================*/
+
+typedef struct
+{
+  UBYTE service_mode;
+  U16   lac;
+  U8    mcc [3];
+  U8    mnc [3];
+  USHORT cell_id;
+}T_LOC_INFO;
+
+typedef struct
+{
+  UBYTE me_status;
+  UBYTE tm_adv;
+}T_TIM_ADV;
+
+#ifdef TI_PS_FF_AT_P_CMD_CTREG
+typedef enum
+{
+    MODE_NotPresent = 0,
+    TREG_READ_MODE,
+    TREG_WRITE_MODE
+}T_TREG_MODE;
+
+typedef enum
+{
+    MODE_TIME_NotPresent = 0,
+    NOSERVICE_MODE_TIME,
+    LIMSERVICE_MODE_TIME
+}T_TREG_TABLE;
+
+typedef struct
+{
+    T_TREG_MODE mode;
+    T_TREG_TABLE tab_id;
+    UBYTE tab_val[25];
+}T_TREG;
+#endif /* TI_PS_FF_AT_P_CMD_CTREG */
+
+typedef struct
+{
+  T_LOC_INFO location_info;
+  T_TIM_ADV timing_advance;
+#ifdef TI_PS_FF_AT_P_CMD_CTREG
+  UBYTE no_serv_mod_time[25];
+  UBYTE lim_serv_mod_time[25];
+#endif /* TI_PS_FF_AT_P_CMD_CTREG */
+}T_SHRD_DATA;
+
+EXTERN T_SHRD_DATA *shared_data;
+
+#ifdef TI_PS_FF_AT_P_CMD_CTREG
+EXTERN  const UBYTE no_service_mode_time[25];
+EXTERN  const UBYTE lim_service_mode_time[25];
+#endif /* TI_PS_FF_AT_P_CMD_CTREG */
+
+/*=================================================================*/
+
+/*====FUNCTION PROTOTYPE===========================================*/
+
+EXTERN void cl_shrd_init (T_HANDLE handle);
+EXTERN void cl_shrd_exit (void);
+EXTERN BOOL cl_shrd_get_loc (T_LOC_INFO *loc_info);
+EXTERN void cl_shrd_set_loc (T_LOC_INFO *loc_info);
+EXTERN BOOL cl_shrd_get_tim_adv(T_TIM_ADV *tim_adv);
+EXTERN void cl_shrd_set_tim_adv(T_TIM_ADV *tim_adv);
+
+#ifdef TI_PS_FF_AT_P_CMD_CTREG
+EXTERN BOOL cl_shrd_set_treg_val(T_TREG *treg);
+EXTERN BOOL cl_shrd_get_treg_val(T_TREG *treg);
+EXTERN BOOL cl_shrd_get_treg (UBYTE tab_id, UBYTE offset, UBYTE *tab_val);
+#endif /* TI_PS_FF_AT_P_CMD_CTREG */
+
+/*=================================================================*/
+#endif   /* CL_SHRD_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/custom.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,586 @@
+/*
++-----------------------------------------------------------------------------
+|  Project :  GSM-PS (6147)
+|  Modul   :  CUSTOM
++-----------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas
+|                 Instruments Berlin, AG
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++-----------------------------------------------------------------------------
+|  Purpose :  Custom dependent definitions
+|
+|             Use this header for definitions to integrate the
+|             protocol stack in your target system !
++-----------------------------------------------------------------------------
+*/
+
+#ifndef CUSTOM_H
+#define CUSTOM_H
+
+/*
+ * OPTION_MULTITHREAD
+ *
+ * Description :  For Operationg systems where the entire protocol
+ *                stack is linked as an process and the entitys are
+ *                started as threads, this option must be set. In
+ *                this case all the pei_ functions of one entity
+ *                were prefixed by the entity name like cc_pei...
+ *
+ * Options:       #define OPTION_MULTITHREAD
+ *                                       Multithread application
+ *                #undef  OPTION_MULTITHREAD
+ *                                       No multithread application.
+ *                                       Each entity is linked seperatly.
+ *
+ */
+/*
+#undef OPTION_MULTITHREAD must be passed as compile switch
+*/
+/*==== ENTITY DEPENDENT CONFIGURATION PARAMETER ===================*/
+
+#ifndef __PFRAME_C__ /* do not include the entity specific custom
+                        header if we compile the frame */
+
+#ifdef ENTITY_CST
+#include "cst/cus_cst.h"
+#endif
+
+#if defined (ENTITY_SMI) || defined (ENTITY_MFW) || defined (ENTITY_ACI) || defined (ENTITY_MMI)
+#include "cus_aci.h"
+#endif
+
+#ifdef ENTITY_PAN
+#endif
+
+#ifdef ENTITY_DL
+#include "cus_dl.h"
+#endif
+
+#ifdef ENTITY_RR
+#include "cus_rr.h"
+#endif
+
+#ifdef ENTITY_MM
+#include "cus_mm.h"
+#endif
+
+#ifdef ENTITY_CC
+#include "cus_cc.h"
+#endif
+
+#ifdef ENTITY_SS
+#include "cus_ss.h"
+#endif
+
+#ifdef ENTITY_ESIM
+#include "cus_esim.h"
+#endif
+
+#ifdef ENTITY_SMS
+#include "cus_sms.h"
+#endif
+
+#ifdef ENTITY_PL
+  #ifdef ALR
+    #include "cus_alr.h"
+  #else
+    #include "cus_til.h"
+  #endif
+#endif
+
+#ifdef ENTITY_L1
+#include "cus_l1.h"
+#endif
+
+#ifdef ENTITY_SIM
+#include "cus_sim.h"
+#endif
+
+#ifdef ENTITY_L2R
+#include "cus_l2r.h"
+#endif
+
+#ifdef ENTITY_RLP
+#include "cus_rlp.h"
+#endif
+
+#ifdef ENTITY_T30
+#include "cus_t30.h"
+#endif
+
+#ifdef ENTITY_FAD
+#include "cus_fad.h"
+#endif
+
+#ifdef ENTITY_RA
+#include "cus_ra.h"
+#endif
+
+#ifdef ENTITY_WAP
+#ifdef FF_GPF_TCPIP
+#include "cus_wapmic.h"
+#endif
+#ifdef CO_UDP_IP
+#include "cus_wap.h"
+#endif
+#endif
+
+#ifdef ENTITY_UDP
+#include "cus_udp.h"
+#endif
+
+#ifdef ENTITY_IP
+#include "cus_ip.h"
+#endif
+
+#ifdef ENTITY_TCP
+#include "cus_tcp.h"
+#endif
+
+#endif
+
+/*==== ENTITY NAMES ===============================================*/
+/*
+ *  The names are used as identifier for the communication resource
+ */
+
+#define NULL_NAME     "NULL"
+#define L1_NAME       "L1"
+#define PL_NAME       "PL"
+#define DL_NAME       "DL"
+#define RR_NAME       "RR"
+#define MM_NAME       "MM"
+#define CC_NAME       "CC"
+#define SS_NAME       "SS"
+#define ESIM_NAME       "ESIM"
+#define SMS_NAME      "SMS"
+#define SIM_NAME      "SIM"
+#define PAN_NAME      "PAN"
+#define DMYA_NAME     "DMYA"
+#define DMYB_NAME     "DMYB"
+#define CST_NAME      "CST"
+#define GRR_NAME      "GRR"
+
+#define ACI_NAME      "MMI"
+#define AAA_NAME      "AAA"
+#define RIV_NAME      "RIV"
+
+#define L2R_NAME      "L2R"
+#define TRA_NAME      L2R_NAME  /* TRA running in L2R task */
+#define RLP_NAME      "RLP"
+#define T30_NAME      "T30"
+#define FAD_NAME      "FAD"
+#define RA_NAME       "RA"
+#define WAP_NAME      "WAP"
+#define UDP_NAME      "UDP"
+#define IP_NAME       "IP"
+#define PPP_NAME      "PPP"
+#define UART_NAME     "UART"
+#define PSI_NAME      "PSI"
+#define DTI_NAME      "DTI"
+#define TAP_NAME      "TAP"
+#define BTI_NAME      "BTI"   /* BTI is not an entity, but the name is used to identify BTI */
+#define LC_NAME       "LC"
+#define RRLP_NAME     "RRLP"
+
+
+#ifdef FF_TRACE_OVER_MTST
+#define MTST_NAME     "MTST"
+#endif /* FF_TRACE_OVER_MTST */
+
+#ifdef GPRS
+#define GMM_NAME      "GMM"
+#define GRR_NAME      "GRR"
+#define GRLC_NAME     "GRLC"
+#define PKTIO_NAME    "PKT"
+#define GPL_NAME      "GRR"
+#endif /* #ifdef GPRS */
+
+#define DCM_NAME      "MMI"
+#define TCPIP_NAME    "TCP"
+
+#define APP_NAME      "APP"
+#define GDD_DIO_NAME  "GDDI"
+
+#ifndef NEW_FRAME
+/*==== STATIC CONFIGURATION =======================================*/
+/*
+ * TRACE_FKT
+ *
+ * Description :  A trace string is send to the environment when a
+ *                function is called.
+ *
+ * Options:       #define TRACE_FKT     configuration is active
+ *                #undef  TRACE_FKT     configuration is not active
+ *                #define TC_FUNC  <n>  used trace class
+ *
+ * Function Traces only under Windows and for MMI
+ */
+
+/*
+ * It is nearly impossible to debug ACI/MFW/SMI without function traces
+ */
+#if defined(WIN32) OR defined(ENTITY_MFW) OR defined(ENTITY_ACI) OR defined(ENTITY_SMI)
+#define  TRACE_FKT
+#define TC_FUNC             1
+#else
+#undef TRACE_FKT
+#endif
+
+/*
+ * TRACE_EVE
+ *
+ * Description :  A trace string is given to the environment when
+ *                an event has happened, for example start of cell
+ *                selection.
+ *
+ * Options:       #define TRACE_EVE     configuration is active
+ *                #undef  TRACE_EVE     configuration is not active
+ *                #define TC_EVENT  <n> used trace class
+ */
+
+#if !defined (NTRACE)
+#define TRACE_EVE
+#define TC_EVENT           2
+#else
+#undef TRACE_EVE
+#endif
+
+/*
+ * TRACE_ERR
+ *
+ * valid for   :  Mobile and Base Station
+ *
+ * Description :  A trace string is given to the environment when
+ *                an error has occured, for example parameter error
+ *                by dynamic configuration.
+ *
+ * Options:       #define TRACE_ERR     configuration is active
+ *                #undef  TRACE_ERR     configuration is not active
+ *                #define TC_ERROR  <n> used trace class
+ */
+
+#if !defined (NTRACE)
+#define TRACE_ERR
+#define TC_ERROR           3
+#else
+#undef TRACE_ERR
+#endif
+
+/*
+ * TRACE_PRIM
+ *
+ * Description :  A trace string is send to the environment when a
+ *                primitive is received or send.
+ *
+ * Options:       #define TRACE_PRIM     configuration is active
+ *                #undef  TRACE_PRIM     configuration is not active
+ *                #define TC_PRIM   <n>  used trace class
+ */
+
+#if !defined (NTRACE)
+#define TRACE_PRIM
+#define TC_PRIM            4
+#else
+#undef TRACE_PRIM
+#endif
+
+/*
+ * TRACE_STATE
+ *
+ * Description :  A trace string is send to the environment when a
+ *                state variable is changed or retrieved.
+ *
+ * Options:       #define TRACE_STATE     configuration is active
+ *                #undef  TRACE_STATE     configuration is not active
+ *                #define TC_STATE   <n>  used trace class
+ */
+
+#if !defined (NTRACE)
+#define TRACE_STATE
+#define TC_STATE           8
+#else
+#undef TRACE_STATE
+#endif
+
+#endif /* NEW_FRAME */
+
+/*
+ * SIM Application Toolkit
+ *
+ * Description :  Depending of the general activation of SIM application
+ *                Toolkit, specific parts can be activated
+ *
+ * Options:       #define SAT_CBM_DNL_SUPPORT   Cell Broadcast Data
+ *                                              Download shall be supported
+ *                #define SAT_SMS_DNL_SUPPORT   SMS Data Download shall
+ *                                              be supported
+ *                #define SAT_CALL_CTRL_SUPPORT Call Control by SIM shall
+ *                                              be supported
+ *                #define SAT_CALL_REQ_SUPPORT  Setup Call and Send SS/USSD
+ *                                              shall be supported
+ */
+
+#ifdef SIM_TOOLKIT
+#define SAT_CBM_DNL_SUPPORT
+#define SAT_SMS_DNL_SUPPORT
+#define SAT_CALL_CTRL_SUPPORT
+#define SAT_CALL_REQ_SUPPORT
+#endif
+
+/*
+ * Engineering Mode
+ *
+ * Description :  The configuration enables feature flag for engineering mode under WIN32.
+ *
+ * Options:       #define FF_EM_MODE       engineering mode is supported
+ *
+ */
+
+#if defined (WIN32)
+#define FF_EM_MODE
+#endif
+
+/*
+ * OPTION_REF
+ *
+ * Description :  There are two ways defined to communicate
+ *                between protocol stack entities. Either by
+ *                copying buffers or by exchanging buffer
+ *                addresses. This options defines which
+ *                way is used.
+ *
+ * Options:       #define OPTION_REF    communication is
+ *                                      carried out by
+ *                                      exchanging buffer addresses
+ *                #undef  OPTION_REF    communication is
+ *                                      carried out by
+ *                                      copying buffers
+ */
+
+#define OPTION_REF
+
+/*
+ * OPTION_LENGTH
+ *
+ * Description :  If the communication is carried out by
+ *                exchanging buffer addresses it is not
+ *                necessary to calculate the length of
+ *                the buffer. This option suppresses
+ *                the calculation of the size parameter
+ *                of the sending communication buffer.
+ *
+ * Options:       #undef  OPTION_LENGTH  size parameter is set
+ *                                       to zero.
+ *                #define OPTION_LENGTH  size parameter is set
+ *                                       to buffer size
+ */
+
+#define OPTION_LENGTH
+
+/*
+ * OPTION_SET_CONFIG_ONLY
+ *
+ * Description :  The pei_config () function is used
+ *                to set and/or to read dynamic configuration.
+ *                The possibility to read a dynamic configuration
+ *                is switched off by this configuration.
+ *
+ * Options:       #define OPTION_SET_CONFIG_ONLY
+ *                                       It is not possible to read
+ *                                       a dynamic configuration
+ *                #undef  OPTION_SET_CONFIG_ONLY
+ *                                       It is possible to read
+ *                                       a dynamic configuration
+ */
+
+#define OPTION_SET_CONFIG_ONLY
+
+/*
+ * OPTION_GSM_ONLY
+ *
+ * Description :  If the environment ensures that only GSM
+ *                primitives are forwarded to the protocol
+ *                stack entity this option suppresses the
+ *                use of the vsi_c_primitive() function.
+ *
+ * Options:       #define OPTION_GSM_ONLY
+ *                                       The environment sends
+ *                                       only GSM primitives
+ *                #undef  OPTION_GSM_ONLY
+ *                                       The environment sends
+ *                                       GSM and SYSTEM primitives
+ */
+
+#undef OPTION_GSM_ONLY
+
+/*
+ * OPTION_TIMEOUT_SYNC
+ *
+ * Description :  If the environment ensures that the
+ *                pei_primitive and pei_timeout function
+ *                not called at the same time this option
+ *                suppresses the use of the vsi_c_awake()
+ *                function. The timeout-handling is started
+ *                directly by the pei_timeout() function.
+ *
+ * Options:       #define OPTION_TIMOUT_SYNC
+ *                                       direct timeout-handling
+ *                #undef  OPTION_TIMEOUT_SYNC
+ *                                       indirect timeout-handling
+ *                                       by using vsi_c_awake ()
+ */
+
+#undef OPTION_TIMEOUT_SYNC
+
+/*
+ * OPTION_SIGNAL
+ *
+ * Description :  The options defines whether signal processing
+ *                in the entity is possible or not.
+ *
+ * Options:       #define OPTION_SIGNAL
+ *                                       Signal processing is possible
+ *                #undef  OPTION_SIGNAL
+ *                                       Signal processing is not possible
+ *
+ */
+
+#define OPTION_SIGNAL
+
+/*
+ * OPTION_TIMER
+ *
+ * Description :  The options defines whether timer values are
+ *                changeable by dynamic configuration or not.
+ *
+ * Options:       #define OPTION_TIMER
+ *                                       Timer values are changeable
+ *                #undef  OPTION_TIMER
+ *                                       Timer values are not
+ *                                       changeable
+ */
+
+#if !defined (NCONFIG)
+#define OPTION_TIMER
+#else
+#undef OPTION_TIMER
+#endif
+
+/*
+ * OPTION_RELATIVE
+ *
+ * Description :  If the compiler for the target system
+ *                uses relative addressing it is possible
+ *                that the offset at run-time must be
+ *                added to some jump tables containing only
+ *                the offset at compile-time.
+ *
+ * Options:       #define OPTION_RELATIVE
+ *                                       add run-time offset
+ *                #undef  OPTION_RELATIVE
+ *                                       don't add run-time offset
+ */
+
+#undef OPTION_RELATIVE
+
+/*
+ * OPTION_MULTI_INSTANCE
+ * MAX_INSTANCES
+ *
+ *
+ * Description :  The option is used if multiple instances are
+ *                used. The routing information is stored in the
+ *                header (T_ROUTE route). The routing information
+ *                consists of instance number (inst_no),
+ *                channel number (chan_no) and timeslot number
+ *                (ts_no). The upper layer uses instance number
+ *                for routing, at the interface to physical layer
+ *                the channel and timeslot number are used. The
+ *                constant MAX_INSTANCES defines the maximum of
+ *                instances.
+ *
+ * Options:       #define OPTION_MULTI_INSTANCE
+ *                                       use multi instances
+ *                #undef  OPTION_MULTI_INSTANCE
+ *                                       only one instance
+ */
+
+#undef OPTION_MULTI_INSTANCE
+#define MAX_INSTANCES      1
+
+/*==== TYPES ======================================================*/
+/*
+ * T_PRIM_HEADER
+ *
+ * Description :  This type definition defines the custom specific
+ *                part of a primitive. All primitives have the
+ *                general format: header followed by data. The
+ *                header of a primitive is changeable according to
+ *                the requirements of the target system.
+ * Hints:         Only the operation code opc as a USHORT value must
+ *                be present. For multi-instance protocol stacks
+ *                the routing information must be include in the
+ *                header (T_ROUTE route).
+ */
+
+#ifdef OPTION_MULTI_INSTANCES
+
+typedef struct
+{
+  USHORT  inst_no;
+  USHORT  chan_no;
+  UBYTE   ts_no;
+} T_ROUTE;
+
+#endif
+
+#if !defined (T_PRIM_HEADER_DEFINED)
+
+#define T_PRIM_HEADER_DEFINED
+
+#ifdef _TMS470
+
+typedef struct
+{
+   USHORT opc;         /* equal to int SignalCode */
+   USHORT opc2;
+   USHORT len;
+   USHORT idx;
+   T_sdu *sdu;
+   UBYTE * Sender;     /* not used                */
+   UBYTE * SigP;       /* Pointer to data area    */
+} T_PRIM_HEADER;
+
+#else
+
+typedef struct
+{
+   UBYTE  ps;
+   UBYTE  fill;
+   UBYTE  snd;
+   UBYTE  rcv;
+   ULONG  timestamp;
+   USHORT len;
+   USHORT idx;
+   T_sdu *sdu;
+   USHORT lng;
+#ifdef OPTION_MULTI_INSTANCES
+   T_ROUTE route;
+#endif
+   USHORT opc;
+   USHORT opc2;
+} T_PRIM_HEADER;
+
+#endif
+
+#endif /* T_PRIM_HEADER_DEFINED */
+
+#endif /* CUSTOM_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/dspl.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,337 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  GSM (6103)
+|  Modul   :  
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Types definitions for the display driver
+|             .
++-----------------------------------------------------------------------------
+     History:
+ 	Sept 15, 2005 REF: LOCOSTO-ENH-34257 - xpradipg
+	Description: Locosto: MIgration to New LCD APIs
+	Solution: Migrated to New APIs by replacing the old driver APIs with
+	corresponding New LCD APIs
++----------------------------------------------------------------------------- 
+*/ 
+#ifndef DSPL_H
+#define DSPL_H
+#include "font_bitmaps.h"
+
+//Sept 15, 2005 REF: LOCOSTO-ENH-34257 - xpradipg
+//The file is included for the definition of T_RV_RET
+
+
+/*
+ *   Device Capabilities data Type
+ */
+typedef struct dspl_DevCaps
+{
+  UBYTE    DisplayType;
+  USHORT   Width;
+  USHORT   Height;
+} dspl_DevCaps;
+
+/*
+ * Display Types
+ */
+#define    DSPL_TYPE_CHARACTER    0
+#define    DSPL_TYPE_GRAPHIC      1
+#define    DSPL_TYPE_COLOR        2
+
+/*
+ * Character Types
+ */
+
+#define    DSPL_TYPE_ASCII         1
+#define    DSPL_TYPE_UNICODE      2
+#define    DSPL_TYPE_ASCII_12_6    3
+
+
+/*
+ * Display Text Attributes
+ */
+#define    DSPL_TXTATTR_NORMAL              0x00
+#define    DSPL_TXTATTR_INVERS              0x01
+#define    DSPL_TXTATTR_UNICODE             0x02
+#define   DSPL_TXTATTR_CURRENT_MODE         0x04    /*Represents the string in the current display mode,unicode or ASCII*/
+#define   DSPL_TXTATTR_SIGNED_COORDS        0x08    /*SH - if this is set, coordinates can have negative numbers*/
+#define    DSPL_TXTATTR_HLIGHT    			0x10   /*Same as 'inverse' on B+W - diff colour highlight on colour display */
+
+/*
+ * Cursor Types
+ */
+#define    DSPL_FBOX_CURSOR_TYPE  1
+#define    DSPL_OBOX_CURSOR_TYPE  2
+#define    DSPL_TLIN_CURSOR_TYPE  3
+#define    DSPL_BLIN_CURSOR_TYPE  4
+
+#define    DSPL_SLOWFLASH_MODE    1
+#define    DSPL_FASTFLASH_MODE    2
+#define    DSPL_STATIC_MODE       3
+
+#define    DSPL_CURSOR_VISIBLE    1
+#define    DSPL_CURSOR_INVISIBLE  0
+/*
+ * Raster Operations
+ */
+#define    DSPL_BMPINVERT         1
+#define    DSPL_BMPAND            2
+#define    DSPL_BMPCOPY           4
+#define    DSPL_BMPERASE          8
+#define    DSPL_BMPPAINT          16
+
+
+/*mc, SPR 1319 moved definitions to header*/
+#define TXT_STYLE_NORMAL		(0)
+#define TXT_STYLE_INVERT		(1)
+#define TXT_STYLE_HIGHLIGHT		(2)
+#define TXT_STYLE_BORDER		(3)
+#define TXT_STYLE_SHADOW1		(4)
+#define TXT_STYLE_SHADOW2		(5)
+#define TXT_STYLE_2PIXEL_BORDER		(6)
+#define TXT_STYLE_3PIXEL_BORDER		(7)
+#define TXT_STYLE_4PIXEL_BORDER		(8)
+#define TXT_STYLE_MASK			(0x00FF)
+#define TXT_STYLE_WIDECHAR		(0x0100)
+#define TXT_STYLE_HIGHCHAR		(0x0200)
+#define TXT_STYLE_UNICODE		(0x0400)
+
+/*mc end*/
+
+/*
+ * Return Values
+ */
+#define    DSPL_FCT_NOTSUPPORTED  1
+
+#if defined (NEW_FRAME)
+/*
+ * to achieve backward compatibility with older definitions
+ */
+#define drv_SignalCB_Type           T_DRV_CB_FUNC
+#define drv_SignalID_Type           T_DRV_SIGNAL
+#define T_VSI_THANDLE               USHORT
+#endif
+
+/*
+ * Prototypes
+ */
+
+EXTERN UBYTE    dspl_Init                (void);
+EXTERN void     dspl_Exit                (void);
+EXTERN UBYTE    dspl_Clear               (USHORT              in_X1,
+                                          USHORT              in_Y1,
+                                          USHORT              in_X2,
+                                          USHORT              in_Y2);
+EXTERN UBYTE    dspl_ClearAll            (void);
+EXTERN UBYTE dspl_unfocusDisplay (void);
+
+EXTERN UBYTE    dspl_Enable              (UBYTE               in_Enable);
+EXTERN void     dspl_GetDeviceCaps       (dspl_DevCaps      * out_DeviceCapsPtr);
+EXTERN void     dspl_SetDeviceCaps       (dspl_DevCaps      * in_DeviceCapsPtr);
+EXTERN UBYTE    dspl_GetIconImage        (UBYTE               in_Icon,
+                                          USHORT              in_Size,
+                                          UBYTE             * out_IconImagePtr);
+EXTERN UBYTE    dspl_SetCursor           (UBYTE               in_CursorType,
+                                          UBYTE               in_CursorMode);
+EXTERN UBYTE    dspl_SetCursorPos        (USHORT              in_X,
+                                          USHORT              in_Y,
+                                          USHORT              in_SizeX,
+                                          USHORT              in_SizeY);//GW 05/09/01
+EXTERN UBYTE    dspl_ShowCursor          (UBYTE               in_Show);
+EXTERN UBYTE    dspl_SetBkgColor         (UBYTE               in_Color);
+EXTERN UBYTE    dspl_SetFrgColor         (UBYTE               in_Color);
+EXTERN UBYTE    dspl_DrawIcon            (UBYTE               in_IconID,
+                                          USHORT              in_X,
+                                          USHORT              in_Y);
+EXTERN UBYTE    dspl_DrawLine            (USHORT              in_X1,
+                                          USHORT              in_Y1,
+                                          USHORT              in_X2,
+                                          USHORT              in_Y2);
+EXTERN UBYTE    dspl_DrawRect            (USHORT              in_X1,
+                                          USHORT              in_Y1,
+                                          USHORT              in_X2,
+                                          USHORT              in_Y2);
+EXTERN UBYTE dspl_roundRect (int px,
+                            	int  py,
+                            	int sx,
+                            	int sy,
+                            	int border);
+EXTERN UBYTE dspl_roundRectFill (int px,
+                            	int  py,
+                            	int sx,
+                            	int sy,
+                            	int border);
+EXTERN UBYTE dspl_DrawFilledRect (USHORT in_X1,
+								  USHORT in_Y1,
+								  USHORT in_X2,
+								  USHORT in_Y2);
+EXTERN UBYTE dspl_DrawFilledBgdRect (USHORT in_X1,
+								  USHORT in_Y1,
+								  USHORT in_X2,
+								  USHORT in_Y2);
+EXTERN UBYTE dspl_DrawFilledColRect (USHORT in_X1,
+								  USHORT in_Y1,
+								  USHORT in_X2,
+								  USHORT in_Y2,
+								  U32 Col);
+
+EXTERN UBYTE    dspl_Ellipse             (USHORT              in_X1,
+                                          USHORT              in_Y1,
+                                          USHORT              in_X2,
+                                          USHORT              in_Y2);
+EXTERN UBYTE    dspl_BitBlt              (USHORT              in_X,
+                                          USHORT              in_Y,
+                                          USHORT              in_Width,
+                                          USHORT              in_Height,
+                                          USHORT              in_Index,
+                                          void              * in_BmpPtr,
+                                          USHORT              in_Rop);
+EXTERN UBYTE dspl_BitBlt2(short in_X,
+                          short in_Y,
+                          USHORT in_Width,
+                          USHORT in_Height,
+                          void * in_BmpPtr,
+                          USHORT in_index,
+                          int bmpFormat);
+
+void fastCopyBitmap(int startX, 	int startY, 	// start position of bitmap
+						int bmpSx,	int bmpSy,		//size of bitmap
+						char*	srcBitmap,
+						int posX,   	int posY,   	// start of area to be copied into
+						int sx,     	int sy,     	// size of area to be copied into 
+						U32 bgd_col,	int bmptype);
+
+EXTERN UBYTE    dspl_SelectFontbyID      (UBYTE               in_Font);
+EXTERN UBYTE    dspl_SelectFontbyImage   (UBYTE             * in_FontPtr);
+EXTERN UBYTE    dspl_GetFontImage        (UBYTE               in_Font,
+                                          USHORT              in_Size,
+                                          UBYTE             * out_FontPtr);
+EXTERN UBYTE    dspl_GetFontHeight       (void);
+EXTERN USHORT   dspl_GetTextExtent       (char              * in_Text,
+                                          USHORT              in_Length);
+EXTERN USHORT   dspl_GetMaxTextLen       (char              * in_Text,
+                                          USHORT              in_HSize);
+EXTERN UBYTE    dspl_TextOut_Cmode             (USHORT              in_X,
+                                          USHORT              in_Y,
+                                          UBYTE               in_Attrib,
+                                          char              * in_Text);
+EXTERN UBYTE    dspl_TextOut             (USHORT              in_X,
+                                          USHORT              in_Y,
+                                          UBYTE               in_Attrib,
+                                          char              * in_Text);
+EXTERN void dspl_ScrText (int x, int y, char *txt, int style);
+
+EXTERN UBYTE    dspl_SetWorkShadow       (UBYTE             * in_ShadowPtr);
+EXTERN UBYTE    dspl_SetDisplayShadow    (UBYTE             * in_ShadowPtr);
+
+EXTERN UBYTE     dspl_str_length(char * str);
+
+EXTERN void dspl_set_char_type(UBYTE char_type);
+EXTERN UBYTE dspl_get_char_type(void);
+
+int dspl_getDisplayType( void );
+
+GLOBAL USHORT dspl_GetNcharToFit (char * in_Text, USHORT pixelWidth);/*SPR 1541*/
+
+//Functions to allow us to set-up the border around text.
+int dspl_setBorderWidth(int borderSize);
+int dspl_getBorderWidth(void);
+//Condat UK Resources functions
+
+EXTERN UBYTE dspl_Prompt (USHORT x, USHORT y, UBYTE in_Attrib, int StringID);
+
+//GW Added new prototypes for setting and getting foreground and background colours
+//NB Existing (unsupported) procedures cannot be used as these have colour defined as 256 colour not 32bit
+EXTERN U32 dspl_SetBgdColour (U32 inColour);
+EXTERN U32 dspl_GetBgdColour (void);
+EXTERN U32 dspl_SetFgdColour (U32 inColour);
+EXTERN U32 dspl_GetFgdColour (void);
+GLOBAL void dspl_RestoreColour (void);
+GLOBAL void dspl_InitColour (void);
+
+//Select a colour to contrast with another colour -used when the foreground and background colours are the same
+int dspl_GetContrastColour( int ipCol);
+
+//Window types when displaying a bitmap
+enum {
+	DSPL_WIN_NORMAL = 0,
+	DSPL_WIN_CENTRE,
+	DSPL_WIN_CLIP,
+	DSPL_WIN_CENTRE_CLIP,
+	DSPL_WIN_TILE,
+	DSPL_WIN_LAST
+};
+//Draw win - create window with display area as specified
+EXTERN UBYTE    dspl_DrawWin (	USHORT		in_PX, 	USHORT	in_PY,
+             						USHORT 	in_SX,	USHORT	in_SY,
+                                    int		format, t_font_bitmap* bmp );
+
+//Functions to allow us to limit where things are drawn - text/bitmaps outside the window are not drawn
+GLOBAL UBYTE dspl_SetWindow(USHORT   in_X1,
+                         USHORT   in_Y1,
+                         USHORT   in_X2,
+                         USHORT   in_Y2);
+GLOBAL UBYTE dspl_GetWindow(USHORT* x1,USHORT* y1,USHORT* x2,USHORT* y2 );
+GLOBAL UBYTE dspl_ResetWindow( void ); //reset to full screen
+
+
+//GW Added (temp)
+typedef enum {
+	BMP_FORMAT_BW_PACKED    = 0x00,
+	BMP_FORMAT_BW_UNPACKED  =   0x01,/*MC, SPR1319*/
+	BMP_FORMAT_256_COLOUR   = 0x02,
+	BMP_FORMAT_32BIT_COLOUR = 0x03,
+	BMP_FORMAT_16BIT_LCD_COLOUR = 0x04, /* GW matches current LCD data format */
+	BMP_FORMAT_16BIT_LCD_COMPRESSED_COLOUR = 0x05, /* GW matches future LCD data format */
+	BMP_FORMAT_BW_2x4  = 0x0080, /* GW display bitmap scaled 2x width and 4x height */
+	BMP_FORMAT_END
+
+} BMP_FORMAT_ENUM;
+
+#define SHOWBITMAP_NORMAL 0x0000
+#define SHOWBITMAP_INVERT 	0x0001
+#define SHOWBITMAP_NORMAL_MASK 	0x0001
+#define SHOWBITMAP_SCALE_2x4 0x0080
+
+//Enumerated type for display (for MFW layout)
+enum {
+	DSPL_BW 		= 0,
+	DSPL_COLOUR 	= 1,
+	DSPL_END
+};
+
+//Sept 15, 2005 REF: LOCOSTO-ENH-34257 - xpradipg
+enum
+{
+	DSPL_ACCESS_ENABLE = 0,
+	DSPL_ACCESS_DISABLE ,
+	DSPL_ACCESS_QUERY
+};
+
+#ifdef _SIMULATION_
+EXTERN void scrMobUpdate (void);
+#endif
+#ifdef FF_SSL_ADAPTATION
+void dspl_set_to_mixed_mode(void);
+void dspl_set_to_mmi_mode(void);
+#endif
+
+
+//xpradipg : New LCD API Migration
+//New function added to control the refresh of the LCD, the earlier implement
+//-ion of the global variable is moved inside this function and also adopted 
+//for the new LCD API migration
+EXTERN int	dspl_control(int state);
+	
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/dti.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,453 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  DTILIB
+|  Modul   :  DTI
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definitions for the Data Transmission Interface, DTI.
+|             Includefile for every entity using DTILIB.
++----------------------------------------------------------------------------- 
+*/ 
+/*
+ *  Version 1.6
+ */
+
+/**********************************************************************************/
+
+/* NOTE:
+ * there is a MACRO definition for "interface" in objbase.h
+ * which says
+ * #define interface struct
+ * and thus would collide with the name "interface"
+ * as a quick fix, all "interface" have been changed to "interfac"
+ * in the dtilib project. This should not affect any external files
+ */
+
+/**********************************************************************************/
+
+#ifndef DTI_H
+#define DTI_H
+
+/**********************************************************************************/
+
+#if defined (DTI2)
+/*
+ *  Use SAP DTI2.DOC
+ */
+#include "P_DTI2.h"
+#else
+/*
+ *  Make this code compatible to SAP dti.doc.
+ */
+#include "P_DTI.h"
+
+#define T_DTI2_DATA_IND      T_DTI_DATA_IND
+#define T_DTI2_DATA_REQ      T_DTI_DATA_REQ
+#define T_DTI2_READY_IND     T_DTI_READY_IND
+#define T_DTI2_GETDATA_REQ   T_DTI_GETDATA_REQ
+#define T_DTI2_DATA_TEST_REQ T_DTI_DATA_TEST_REQ
+#define T_DTI2_DATA_TEST_IND T_DTI_DATA_TEST_IND
+
+/*
+ * By use the SAP DTI.DOC and the DTI2.DOC there could be double
+ * defines. So an undef is used.
+ */
+
+#ifdef DTI2_DATA_IND
+  #undef DTI2_DATA_IND
+#endif
+#ifdef DTI2_DATA_REQ
+  #undef DTI2_DATA_REQ
+#endif
+#ifdef DTI2_READY_IND
+  #undef DTI2_READY_IND
+#endif
+#ifdef DTI2_GETDATA_REQ
+  #undef DTI2_GETDATA_REQ
+#endif
+#ifdef DTI2_DATA_TEST_REQ
+  #undef DTI2_DATA_TEST_REQ
+#endif
+#ifdef DTI2_DATA_TEST_IND
+  #undef DTI2_DATA_TEST_IND
+#endif
+
+/*
+ *  For calling the primitives over the macros.
+ */
+#define DTI2_DATA_IND      DTI_DATA_IND
+#define DTI2_DATA_REQ      DTI_DATA_REQ
+#define DTI2_READY_IND     DTI_READY_IND
+#define DTI2_GETDATA_REQ   DTI_GETDATA_REQ
+#define DTI2_DATA_TEST_REQ DTI_DATA_TEST_REQ
+#define DTI2_DATA_TEST_IND DTI_DATA_TEST_IND
+
+/*
+ * Version related to DTI SAP 1.
+ */
+
+#define T_desc2 T_desc
+#define T_desc_list2 T_desc_list
+#define desc_list2 desc_list
+
+#endif
+
+/**********************************************************************************
+ * Externally visible dtilib defines
+ **********************************************************************************/
+/*
+ *  Reason parameter for the callback function
+ */
+#define DTI_NO_SIGNAL                 0 /* No signal shall be sended */
+#define DTI_REASON_CONNECTION_OPENED  1 /* DTI connection opened or reseted */
+#define DTI_REASON_CONNECTION_CLOSED  2 /* DTI connection closed */
+#define DTI_REASON_DATA_RECEIVED      3 /* UL Data primitive received */
+#define DTI_REASON_TX_BUFFER_FULL     4 /* DTI send-queue full */
+#define DTI_REASON_TX_BUFFER_READY    5 /* DTI DTI send-queue no longer full */
+
+/*
+ * Connection states
+ */
+#define DTI_CLOSED      0   /* DTI connection is not established */
+#define DTI_SETUP       1   /* Waiting for connection_opened signal from DTILIB */
+#define DTI_IDLE        2   /* DTI connection is opened */
+
+/*
+ * dti_open - direction parameter
+ *
+ * to lower layer: send request primitives (_REQ / _CNF)
+ * to higher layer: send indications       (_IND / _RES)
+ * null link: do not send anything
+ */
+#define DTI_CHANNEL_TO_HIGHER_LAYER 0x00
+#define DTI_CHANNEL_TO_LOWER_LAYER 0x01
+#define DTI_NULL_LINK 0x02    /* null link (null device) */
+
+/*
+ * dti_open - link_options parameter
+ *
+ * the 0 is legacy from previous versions - upon reception of this value
+ * the queue-length parameter has to be used to find out about desired
+ * behaviour for the send queue
+ *   #define FLOW_CNTRL_ENABLED    0     -- Flow control enabled
+ */
+#define DTI_FLOW_CNTRL_DISABLED 1 /* Flow control entirely disabled */
+/*
+ * Modes for handling of the send queue
+ *
+ * Queue is not used
+ */
+#define DTI_QUEUE_UNUSED 2
+/*
+ * Queue without size limitation
+ */
+#define DTI_QUEUE_UNBOUNDED 3
+/*
+ * Notify entity when queue is full,
+ * afterwards discard oldest piece of data upon arrival of new data packets
+ */
+#define DTI_QUEUE_RM_FIFO 4
+/*
+ * Notify entity when queue is full,
+ * afterwards discard newly arriving data packets
+ */
+#define DTI_QUEUE_RM_LIFO 5
+/*
+ * Notify entity when queue is full but keep all buffered data
+ */
+#define DTI_QUEUE_WATERMARK 6
+
+/*
+ * dti_init - entity_options (flags!)
+ */
+#define DTI_DEFAULT_OPTIONS 0x0
+#define DTI_NO_TRACE    (1<<0)
+
+/*
+ * Some parameter which are used for initialization.
+ */
+#define  D_NO_DATA_BASE     NULL
+#define  D_NO_INSTANCE      0xFF
+#define  D_NO_INTERFACE     0xFF
+#define  D_NO_CHANNEL_NR    0xFF
+
+/**********************************************************************************
+ * Obsolete dtilib defines
+ *
+ * NOTE: use of these defines is STRONGLY DISCOURAGED since their functionality
+ *       is no longer needed and they will be removed some time in the future
+ *
+ **********************************************************************************/
+
+/*
+ * NOTE: this is _obsolete_ and maintained only for compatibility reasons!!
+ * (see link_options parameter)
+ */
+#define DTI_QUEUE_DISABLED    0 /* Queue not used */
+#define DTI_QUEUE_UNLIMITED 255 /* Queue without limitations in size */
+
+/*
+ * Home and neighbor entity.
+ * NOTE: this is _obsolete_ and maintained only for compatibility reasons!!
+ *       instead use the defines
+ *       DTI_CHANNEL_TO_HIGHER_LAYER and
+ *       DTI_CHANNEL_TO_LOWER_LAYER
+ */
+#define HOME        TRUE    /* Indicate the entity or instance which send dti_connect_req */
+#define NEIGHBOR    FALSE   /* Indicate the entity or instance which send dti_connect_ind */
+
+/*
+ *  Type of the link
+ */
+
+#define ENTITY_LINK           0x01   /* normal link with an entity */
+#define NULL_LINK              0x02   /* null link (null device) */
+#define RIVIERA_BT_LINK   0x03    /* link to BT riviera entity */
+#define RIVIERA_ATP_LINK  0x04    /* link to RNET riviera entity */
+
+/*
+ * Communication type
+ * NOTE: this is _obsolete_ and maintained only for compatibility reasons!!
+ * (see link_options parameter)
+ */
+#define FLOW_CNTRL_ENABLED    0     /* Flow control enabled */
+#define FLOW_CNTRL_DISABLED   1     /* Flow control disabled */
+
+/*
+ * Connection states
+ * NOTE: this is _obsolete_ and maintained only for compatibility reasons!!
+ *       these states should be defined in the entities or the prefixec versiones
+ *       above should be used
+ */
+#define CLOSED  0   /* DTI connection is not established */
+#define SETUP   1   /* Waiting for connection_opened signal from DTILIB */
+#define IDLE    2   /* DTI connection is opened */
+
+/*
+ * Entity states for sending
+ * NOTE: this is _obsolete_ and maintained only for compatibility reasons!!
+ *       these states should be defined in the entity itself
+ *       to ensure proper prefixing
+ */
+#define TX_IDLE      3  /* The entity must not send data primitives (initial state) */
+#define TX_READY     4  /* The entity can send data primitives */
+
+/*
+ * Entity states for receiving
+ * NOTE: this is _obsolete_ and maintained only for compatibility reasons!!
+ *       these states should be defined in the entity itself
+ *       to ensure proper prefixing
+ */
+#define RX_IDLE     5   /* Data reception stopped (initial state) */
+#define RX_READY    6   /* Ready to receive data */
+
+#define ENTITY_NAME_LEN    0x6         
+
+#define MAX_ATP_LINKS       0x4   /* max. number of links towards the RIV/ATP environment,
+                                                       set by AAA*/
+/*
+ * Value constants for capability
+ */
+#define DTI_CPBLTY_NO                  0x0         /* used as initial value  = no capabilities */
+#define DTI_CPBLTY_CMD                 0x1         /* AT cmd capability              */
+#define DTI_CPBLTY_PKT                 0x2         /* packet capability              */
+#define DTI_CPBLTY_SER                 0x4         /* serial capability              */
+
+/**********************************************************************************
+ * typedefs
+ **********************************************************************************/
+
+/*
+ * Data Base for each entity.
+ */
+
+typedef struct
+{
+  T_HANDLE  handle;                   /* GPF task handle */ 
+  U8 max_links;                       /* Number of links in the link list
+                                        - started from the pointer first_link */
+  U32 entity_options;                 /* user specified entity_options */
+  void ((*sig_callback)               /* Callback function */
+    (U8 instance,                     /* Instance of the entity */
+     U8 interfac,                     /* Interface of the entity */
+     U8 channel,                      /* Channel */
+     U8 reason,                       /* Reason for the callback */
+     T_DTI2_DATA_IND *dti_data_ind)); /* Data primitive ul */
+#ifdef FF_TCP_IP
+  char* own_name;                     /* name of the own entity, held by AAA */
+  U16 entity_id_p;                    /* entity id within ATP, the same for all 
+                                         entities and AAA */ 
+#endif
+  U32 first_link;                     /* Pointer to link table */
+} DTI_DATA_BASE;
+
+typedef DTI_DATA_BASE * DTI_HANDLE;   /* For calling the data base */
+
+
+/*
+ * Link Table, parameter for each DTI connection.
+ * For detail information - please see the MSC DTILIB.DOC
+ */
+typedef struct
+{
+  U32             link_id;        /* Identity for the link communication */
+  U8              direction;      /* Direction for the link communication */
+  U32             version;        /* DTI Version */
+  U8              instance;       /* Instance of the entity */
+  U8              interfac;       /* Selected interface */
+  U8              channel;        /* Channel number */
+  U32             link_options;   /* type of flow control, queueing, .. */
+  T_HANDLE        link_handle;    /* Handle for the communication channel */
+  U8              queue_size;     /* DTI queue size */
+  U8              queue_len;      /* length of the queue */
+  T_DTI2_DATA_IND *dti_data_ind;  /* DTI data primitive */
+  U8              connect_state;  /* State for connect */
+  U8              rx_state;       /* State for receive */
+  U8              tx_state;       /* State for send */
+  U32             next_link;      /* Pointer to next DTI_LINK struct, last */
+                                          /*  linkpointer = NULL */
+  U8              link_type;      /* indicate Riviera, NULL or GPF link */
+#ifdef FF_TCP_IP
+  U16             ul_next_atp_data; /* data to be got from ATP */
+  U8              atp_tx_state;   /* flow state of ATP */
+  U8              dti_id;         /* ACI identity for the link */
+  DTI_DATA_BASE*  entity_db;      /* pointer back to home database */
+  UINT16          port_nb;        /* port number, if linked towards RIV */
+#endif
+                                      
+} DTI_LINK;
+
+/**********************************************************************************
+ * Prototypes for DTILIB
+ **********************************************************************************/
+
+EXTERN DTI_HANDLE dti_init(
+  U8 maximum_links,
+  T_HANDLE handle,
+  U32 entity_options,
+  void (sig_callback(
+    U8 instance,
+    U8 interfac,
+    U8 channel,
+    U8 reason,
+    T_DTI2_DATA_IND *dti_data_ind
+    ) )
+  );
+
+EXTERN void dti_deinit( DTI_HANDLE hDTI);
+
+EXTERN BOOL dti_open(
+  DTI_HANDLE hDTI,
+  U8 instance,
+  U8 interfac,
+  U8 channel,
+  U8 queue_size,
+  U8 direction,
+  U32 link_options,
+  U32 version,
+  U8 *neighbor_entity,
+  U32 link_id
+  );
+
+EXTERN BOOL dti_resolve_link_id(
+  DTI_HANDLE hDTI,
+  U8 instance,
+  U8 interfac,
+  U8 channel,
+  U32 *link_id
+  );
+
+EXTERN void dti_close(
+  DTI_HANDLE hDTI,
+  U8 instance,
+  U8 interfac,
+  U8 channel,
+  BOOL flush
+  );
+
+EXTERN void dti_start( DTI_HANDLE hDTI, U8 instance, U8 interfac, U8 channel);
+
+EXTERN void dti_stop( DTI_HANDLE hDTI, U8 instance, U8 interfac, U8 channel);
+
+EXTERN void dti_send_data(
+  DTI_HANDLE hDTI,
+  U8 instance,
+  U8 interfac,
+  U8 channel,
+  T_DTI2_DATA_IND *dti_data_ind
+  );
+
+EXTERN void mfree_desc(DTI_HANDLE hDTI, T_desc_list2 * desc_list2);
+
+EXTERN BOOL dti_tx_buffer_status(
+  DTI_HANDLE hDTI,
+  U8 instance,
+  U8 interfac,
+  U8 channel,
+  U8 *queue_len
+  );
+
+/**********************************************************************************
+ * Functions in ip_kerp.c
+ **********************************************************************************/
+
+#if defined (DTI2)
+EXTERN GLOBAL  void dti_dti_connect_req (DTI_HANDLE hDTI,
+                            T_DTI2_CONNECT_REQ *dti_connect_req);
+
+EXTERN GLOBAL  void dti_dti_disconnect_req (DTI_HANDLE hDTI,
+                            T_DTI2_DISCONNECT_REQ *dti_disconnect_req);
+
+EXTERN GLOBAL  void dti_dti_disconnect_ind (DTI_HANDLE hDTI,
+                            T_DTI2_DISCONNECT_IND *dti_disconnect_ind);
+
+EXTERN GLOBAL  void dti_dti_connect_cnf (DTI_HANDLE hDTI,
+                            T_DTI2_CONNECT_CNF *dti_connect_cnf);
+
+EXTERN GLOBAL  void dti_dti_connect_res (DTI_HANDLE hDTI,
+                            T_DTI2_CONNECT_RES *dti_connect_res);
+
+EXTERN GLOBAL  void dti_dti_connect_ind (DTI_HANDLE hDTI,
+                            T_DTI2_CONNECT_IND *dti_connect_ind);
+#endif
+
+EXTERN GLOBAL  void dti_dti_ready_ind (DTI_HANDLE hDTI,
+                            T_DTI2_READY_IND *dti_ready_ind);
+
+EXTERN GLOBAL  void dti_dti_data_req (DTI_HANDLE hDTI,
+                            T_DTI2_DATA_REQ *dti_data_req);
+
+EXTERN GLOBAL  void dti_dti_getdata_req (DTI_HANDLE hDTI,
+                            T_DTI2_GETDATA_REQ *dti_getdata_req);
+
+EXTERN GLOBAL  void dti_dti_data_ind (DTI_HANDLE hDTI,
+                            T_DTI2_DATA_IND *dti_data_ind);
+
+/**********************************************************************************
+ * Test functions used in the windows operating system.
+ **********************************************************************************/
+
+#if defined (_SIMULATION_)
+EXTERN  void dti_dti_data_test_ind (DTI_HANDLE hDTI,
+                    T_DTI2_DATA_TEST_IND *dti_data_test_ind);
+
+EXTERN  void dti_dti_data_test_req (DTI_HANDLE hDTI,
+                    T_DTI2_DATA_TEST_REQ *dti_data_test_req);
+
+EXTERN BOOL dti_make_new_desc (DTI_HANDLE hDTI,
+                               T_desc2 **p_desc_new,
+                               U16 malloc_len,
+                               BOOL buff_init_0);
+
+#endif /* _SIMULATION_ */
+#endif /* DTI_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/em.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,487 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  GSM (6301)
+|  Modul   :  
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Types definitions for the engineering mode driver
+|             .
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef EM_H
+#define EM_H
+
+
+/*
+ * Return Values
+ */
+#define EM_INVALID_CLASS           10
+#define EM_INVALID_SUBCLASS        11
+#define EM_INVALID_TYPE            12
+#define EM_INVALID_ACCESS          13
+#define EM_NO_MORE_DATA            14
+#define EM_DATA_NOT_AVAIL          15
+
+#define MAX_EM_LENGTH              80
+
+/*
+ * Data Types
+ */
+typedef struct
+{
+  UBYTE em_class;
+  UBYTE em_subclass;
+  UBYTE em_type;
+  UBYTE em_length;
+  UBYTE em_parameter [MAX_EM_LENGTH];
+} em_data_type;
+
+/*
+ * EM classes
+ */
+
+#define EM_CLASS_EVENT_TRACE        1
+#define EM_CLASS_COUNTER            2
+#define EM_CLASS_INFRA_DATA         3
+#define EM_CLASS_MS_DATA            4
+
+/*
+ * EM Subclasses Event Tracing / Counter
+ */
+#define EM_SUBCLASS_LAYER_1         1
+#define EM_SUBCLASS_DL              2
+#define EM_SUBCLASS_RR              3
+#define EM_SUBCLASS_MM              4
+#define EM_SUBCLASS_CC              5
+#define EM_SUBCLASS_SS              6
+#define EM_SUBCLASS_SMS             7
+#define EM_SUBCLASS_SIM             8
+
+
+/*
+ * EM Subclasses Infrastructure data
+ */
+#define EM_SUBCLASS_SC_INFO         9
+#define EM_SUBCLASS_NC_INFO         10
+#define EM_SUBCLASS_LUP_AND_PAG     12
+#define EM_SUBCLASS_PLMN_PARA       13
+#define EM_SUBCLASS_CIPH_HOP_DTX    14
+ 
+/*
+ * EM Subclasses Mobile Data   
+ */
+#define EM_SUBCLASS_POWER           15
+#define EM_SUBCLASS_IDENTITY        16
+#define EM_SUBCLASS_VERSION         17
+
+/*
+ * EM types
+ */
+
+typedef struct
+{
+  USHORT            arfcn;               /* channel number              */
+  SHORT             c1;                  /* C1 Path Loss Criterion      */
+  SHORT             c2;                  /* C2 Reselection Criterion    */
+  UBYTE             rxlev;               /* fieldstrength               */
+  UBYTE             bsic;                /* BSIC                        */
+  UBYTE             mcc[3];              /* Mobile Country Code         */
+  UBYTE             mnc[3];              /* Mobile Network Code         */
+  USHORT            lac;                 /* Location Area Code          */
+  USHORT            cell_id;             /* cell identifier             */
+  UBYTE             cba;                 /* Cell barred access          */
+  UBYTE             cbq;                 /* Cell barred qualify         */
+  UBYTE             til_state;           /* State of cell in TIL/ALR    */
+  UBYTE             sync_cnt;            /* Pending L1 cells sync       */
+  UBYTE             bcch_cnt;            /* Pending L1 cells bcch read  */
+  UBYTE             rxlev_f;             /* RSSI full in dedicated mode */
+  UBYTE             rxlev_s;             /* RSSI sub in dedicated mode  */
+  UBYTE             rxqual_f;            /* Qual full in dedicated mode */
+  UBYTE             rxqual_s;            /* Qual sub in dedicated mode  */
+} T_EM_NC_DATA;
+
+
+/*
+ * internal prototypes for em driver
+ */
+EXTERN void    em_trace_single (UBYTE class, UBYTE subclass, UBYTE type);
+EXTERN void    em_trace_ubyte  (UBYTE class, UBYTE subclass, UBYTE type, UBYTE value);
+EXTERN void    em_trace_ushort (UBYTE class, UBYTE subclass, UBYTE type, USHORT value);
+EXTERN void    em_trace_array  (UBYTE class, UBYTE subclass, UBYTE type, UBYTE * value, UBYTE len);
+
+EXTERN UBYTE * em_get_sys_info (UBYTE sys_info_type);
+EXTERN UBYTE   em_get_nc_data  (T_EM_NC_DATA * em_nc_data, UBYTE index);
+EXTERN UBYTE   em_get_network_meas (UBYTE * chan_list);
+EXTERN UBYTE   em_get_bcch_chan_list (em_data_type * out_em_data);
+/*
+ * Access Functions
+ */
+#if defined (EM_TRACE)
+
+#define EM_EV_L1_TRACE(a)           em_trace_single(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_LAYER_1,a);
+#define EM_EV_L1_TRACE_UBYTE(a,b)   em_trace_ubyte(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_LAYER_1,a,b);
+#define EM_EV_L1_TRACE_USHORT(a,b)  em_trace_ushort(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_LAYER_1,a,b);
+#define EM_EV_L1_TRACE_ARRAY(a,b,c) em_trace_array(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_LAYER_1,a,b,c);
+
+#define EM_EV_DL_TRACE(a)           em_trace_single(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_DL,a);
+#define EM_EV_DL_TRACE_UBYTE(a,b)   em_trace_ubyte(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_DL,a,b);
+#define EM_EV_DL_TRACE_USHORT(a,b)  em_trace_ushort(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_DL,a,b);
+#define EM_EV_DL_TRACE_ARRAY(a,b,c) em_trace_array(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_DL,a,b,c);
+
+#define EM_EV_RR_TRACE(a)           em_trace_single(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_RR,a);
+#define EM_EV_RR_TRACE_UBYTE(a,b)   em_trace_ubyte(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_RR,a,b);
+#define EM_EV_RR_TRACE_USHORT(a,b)  em_trace_ushort(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_RR,a,b);
+#define EM_EV_RR_TRACE_ARRAY(a,b,c) em_trace_array(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_RR,a,b,c);
+
+#define EM_EV_MM_TRACE(a)           em_trace_single(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_MM,a);
+#define EM_EV_MM_TRACE_UBYTE(a,b)   em_trace_ubyte(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_MM,a,b);
+#define EM_EV_MM_TRACE_USHORT(a,b)  em_trace_ushort(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_MM,a,b);
+#define EM_EV_MM_TRACE_ARRAY(a,b,c) em_trace_array(EM_CLASS_EVENT_TRACE,EM_SUBCLASS_MM,a,b,c);
+
+#else
+
+#define EM_EV_L1_TRACE(a)         
+#define EM_EV_L1_TRACE_UBYTE(a,b) 
+#define EM_EV_L1_TRACE_USHORT(a,b) 
+#define EM_EV_L1_TRACE_ARRAY(a,b,c)
+
+#define EM_EV_DL_TRACE(a)         
+#define EM_EV_DL_TRACE_UBYTE(a,b) 
+#define EM_EV_DL_TRACE_USHORT(a,b) 
+#define EM_EV_DL_TRACE_ARRAY(a,b,c)
+
+#define EM_EV_RR_TRACE(a)         
+#define EM_EV_RR_TRACE_UBYTE(a,b) 
+#define EM_EV_RR_TRACE_USHORT(a,b) 
+#define EM_EV_RR_TRACE_ARRAY(a,b,c)
+
+#define EM_EV_MM_TRACE(a)         
+#define EM_EV_MM_TRACE_UBYTE(a,b) 
+#define EM_EV_MM_TRACE_USHORT(a,b) 
+#define EM_EV_MM_TRACE_ARRAY(a,b,c)
+
+#endif
+
+/*
+ * Event trace, layer 1
+ */
+#define EM_EV_L1_POWER_MEAS_REQ      1
+#define EM_EV_L1_RX_MEAS_REQ         2
+#define EM_EV_L1_RX_MEAS_CNF         3
+#define EM_EV_L1_POWER_MEAS_CNF      4
+#define EM_EV_L1_BSIC_REQ            5
+#define EM_EV_L1_BSIC_AVAIL          6
+#define EM_EV_L1_BSIC_NOT_AVAIL      7
+#define EM_EV_L1_BCCH_READ_ERR       8
+#define EM_EV_L1_CONFIG_CLASSMARK    9
+#define EM_EV_L1_CONFIG_IDLE_MODE    10
+#define EM_EV_L1_CONFIG_CBCH         11
+#define EM_EV_L1_CONFIG_NCELL        12
+#define EM_EV_L1_CHANGE_EXT_PAG      13
+#define EM_EV_L1_CHANGE_REORG_PAG    14
+#define EM_EV_L1_CHANGE_NORM_PAG     15
+#define EM_EV_L1_CHANGE_IDLE_BCCH    16
+#define EM_EV_L1_DOWNLINK_ERROR      17
+#define EM_EV_L1_PAGING_DETECTED     18
+#define EM_EV_L1_READ_NCELL_BSIC     19
+#define EM_EV_L1_NCELL_BSIC_AVAIL    20
+#define EM_EV_L1_NCELL_BSIC_NO_AVAIL 21
+#define EM_EV_L1_READ_NCELL_SB       22
+#define EM_EV_L1_NCELL_SB_AVAIL      23
+#define EM_EV_L1_NCELL_SB_NO_AVAIL   24
+#define EM_EV_L1_READ_NCELL_BCCH     25
+#define EM_EV_L1_NCELL_BCCH_AVAIL    26
+#define EM_EV_L1_NCELL_BCCH_NO_AVAIL 27
+#define EM_EV_L1_CONFIG_CELL_RESEL   28
+#define EM_EV_L1_START_CON_EST       29
+#define EM_EV_L1_CONFIG_IMM_ASS      30
+#define EM_EV_L1_STOP_CON_EST        31
+#define EM_EV_L1_CONFIG_CHN_ASS      32
+#define EM_EV_L1_CONFIG_ASYNC_HO     33
+#define EM_EV_L1_CONFIG_SYNC_HO      34
+#define EM_EV_L1_CONFIG_PRE_HO       35
+#define EM_EV_L1_CONFIG_PSEUDO_HO    36
+#define EM_EV_L1_CONFIG_FREQ_REDEF   37
+#define EM_EV_L1_CONFIG_CHN_MODIFY   38
+#define EM_EV_L1_CONFIG_CIPH_SET     39
+#define EM_EV_L1_START_CBCH_READ     40
+#define EM_EV_L1_RECEIVE_CBCH        41
+#define EM_EV_L1_CBCH_MSG_COMPLETE   42
+#define EM_EV_L1_STOP_CBCH_READ      43
+#define EM_EV_L1_RECEIVE_NULL        44
+#define EM_EV_L1_RECEIVE_SCHEDULE    45
+#define EM_EV_L1_CONFIG_TCH_LOOP     46
+#define EM_EV_L1_CONFIG_DAT          47
+#define EM_EV_L1_DEACTIVATE          48
+
+/*
+ * Event trace, data link layer 
+ */
+#define EM_EV_DL_SDCCH_EST_PASSED     1
+#define EM_EV_DL_SDCCH_EST_FAILED     2
+#define EM_EV_DL_FACCH_EST_PASSED     3
+#define EM_EV_DL_FACCH_EST_FAILED     4
+#define EM_EV_DL_SDCCH_3_EST_PASSED   5
+#define EM_EV_DL_SDCCH_3_EST_FAILED   6
+#define EM_EV_DL_SACCH_3_EST_PASSED   7
+#define EM_EV_DL_SACCH_3_EST_FAILED   8
+#define EM_EV_DL_SDCCH_REL            9
+#define EM_EV_DL_FACCH_REL           10
+#define EM_EV_DL_SDCCH_3_REL         11
+#define EM_EV_DL_FACCH_3_REL         12
+#define EM_EV_DL_SDCCH_SUSPEND       13
+#define EM_EV_DL_FACCH_SUSPEND       14
+#define EM_EV_DL_SDCCH_MINOR_ERR     15
+#define EM_EV_DL_FACCH_MINOR_ERR     16
+#define EM_EV_DL_SDCCH_3_MINOR_ERR   17
+#define EM_EV_DL_SACCH_3_MINOR_ERR   18
+#define EM_EV_DL_SDCCH_MAJOR_ERR     19
+#define EM_EV_DL_FACCH_MAJOR_ERR     20
+#define EM_EV_DL_SDCCH_3_MAJOR_ERR   21
+#define EM_EV_DL_SACCH_3_MAJOR_ERR   22
+
+
+/*
+ * Event trace, radio resource management
+ */
+#define EM_EV_RR_SRCH_LIM_STARTED     1
+#define EM_EV_RR_SRCH_LIM_PASSED      2
+#define EM_EV_RR_SRCH_LIM_FAILED      3
+#define EM_EV_RR_SRCH_FULL_START_MM   4
+#define EM_EV_RR_SRCH_FULL_START_RR   5
+#define EM_EV_RR_SRCH_FULL_PASSED     6
+#define EM_EV_RR_SRCH_FULL_FAILED     7
+#define EM_EV_RR_SRCH_HPLMN_START_RR  8
+#define EM_EV_RR_SRCH_HPLMN_PASSED    9
+#define EM_EV_RR_SRCH_HPLMN_FAILED   10
+#define EM_EV_RR_SRCH_PLMN_START     11
+#define EM_EV_RR_SRCH_PLMN_FINISHED  12
+#define EM_EV_RR_IDLE_NO_SERVICE     13
+#define EM_EV_RR_IDLE_LIM_SERVICE    14
+#define EM_EV_RR_IDLE_FULL_SERVICE   15
+#define EM_EV_RR_CELL_RESEL_START    16
+#define EM_EV_RR_CELL_RESEL_END      17
+#define EM_EV_RR_PAGING_DETECTED     18
+#define EM_EV_RR_DOWNLINK_FAILURE    19
+#define EM_EV_RR_CHANNEL_REQUEST     20
+#define EM_EV_RR_IMM_ASS             21
+#define EM_EV_RR_IMM_ASS_EXT         22
+#define EM_EV_RR_IMM_ASS_REJ         23
+#define EM_EV_RR_L2_CON_EST          24
+#define EM_EV_RR_EARLY_CLASS_SEND    25
+#define EM_EV_RR_CLASS_INTERROGATION 26
+#define EM_EV_RR_ASS                 27
+#define EM_EV_RR_ASS_FAIL_REJ        28
+#define EM_EV_RR_ASS_FAIL_REC        29
+#define EM_EV_RR_ASS_FAIL_LOSS       30
+#define EM_EV_RR_ASS_COMPLETE        31
+#define EM_EV_RR_HO_ASYNC            32
+#define EM_EV_RR_HO_SYNC             33
+#define EM_EV_RR_HO_PRE_SYNC         34
+#define EM_EV_RR_HO_PSEUDO_SYNC      35
+#define EM_EV_RR_HO_FAIL_REJ         36
+#define EM_EV_RR_HO_FAIL_REC         37
+#define EM_EV_RR_HO_FAIL_LOSS        38
+#define EM_EV_RR_HO_COMPLETE         39
+#define EM_EV_RR_FREQ_REDEF          40
+#define EM_EV_RR_CIPH_SET            41
+#define EM_EV_RR_CHAN_MOD_START      42
+#define EM_EV_RR_CHAN_MOD_END        43
+#define EM_EV_RR_CHAN_RELEASE        44
+#define EM_EV_RR_RADIO_LINK_FAIL     45
+#define EM_EV_RR_LAYER_2_LOSS        46
+#define EM_EV_RR_STATUS_RECEIVED     47
+#define EM_EV_RR_STATUS_SEND         48
+#define EM_EV_RR_TCH_LOOP            49
+#define EM_EV_RR_TEST_INTERFACE      50
+#define EM_EV_RR_DEACTIVATION        51
+
+/*
+ * Event trace, mobility management
+ */
+#define EM_EV_MM_SIM_INSERT           1
+#define EM_EV_MM_SIM_REMOVE           2
+#define EM_EV_MM_SET_PLMN_MODE        3
+#define EM_EV_MM_START_REG_LIM        4
+#define EM_EV_MM_START_REG_FULL       5
+#define EM_EV_MM_START_PLMN_AVAIL     6
+#define EM_EV_MM_CS_NO_SERVICE        7
+#define EM_EV_MM_CS_LIM_SERVICE       8
+#define EM_EV_MM_CS_FULL_SERVICE      9
+#define EM_EV_MM_CR_NO_SERVICE       10
+#define EM_EV_MM_CR_LIM_SERVICE      11
+#define EM_EV_MM_CR_FULL_SERVICE     12
+#define EM_EV_MM_RESULT_PLMN_LIST    13
+#define EM_EV_MM_IMSI_ATT_STARTED    14
+#define EM_EV_MM_RR_CON_ESTABLISHED  15
+#define EM_EV_MM_RR_CON_FAILED       16
+#define EM_EV_MM_LOC_UPD_ACCEPT      17
+#define EM_EV_MM_NORM_LUP_STARTED    18
+#define EM_EV_MM_PERI_LUP_STARTED    19
+#define EM_EV_MM_TMSI_REALLOC_START  20
+#define EM_EV_MM_TMSI_REALLOC_CMP    21
+#define EM_EV_MM_LOC_UPD_REJECT      22
+#define EM_EV_MM_IMSI_DETACH         23
+#define EM_EV_MM_ID_REQUEST          24
+#define EM_EV_MM_ID_RESPONSE         25
+#define EM_EV_MM_AUTH_REQUEST        26
+#define EM_EV_MM_AUTH_RESPONSE       27
+#define EM_EV_MM_AUTH_REJECT         28
+#define EM_EV_MM_CM_SERV_REQ_CC      29
+#define EM_EV_MM_CM_SERV_REQ_SS_SMS  30
+#define EM_EV_MM_CM_SERV_ACC_CIPH    31
+#define EM_EV_MM_CM_SERV_ACC_CMD     32
+#define EM_EV_MM_CM_SERV_REJECT      33
+
+/*
+ * Infrastructure Data - Serving Cell Information
+ */
+#define EM_IN_SC_BCCH_ARFCN           1
+#define EM_IN_SC_C1                   2
+#define EM_IN_SC_RX                   3
+#define EM_IN_SC_BSIC                 4
+#define EM_IN_SC_DLT                  5
+#define EM_IN_SC_TX_POWER             6
+#define EM_IN_SC_TS                   7
+#define EM_IN_SC_DEDI_ARFCN           8
+#define EM_IN_SC_DEDI_RX_FULL         9
+#define EM_IN_SC_DEDI_RX_SUB         10
+#define EM_IN_SC_DEDI_RLT            11
+#define EM_IN_SC_DEDI_TA             12
+#define EM_IN_SC_DEDI_QUAL_FULL      13
+#define EM_IN_SC_DEDI_QUAL_SUB       14
+#define EM_IN_SC_NMR_RAW             15
+#define EM_IN_SC_BCCH_LIST_RAW       16
+#define EM_IN_SC_C2                  17
+#define EM_IN_SC_LAC                 18
+#define EM_IN_SC_BA                  19
+#define EM_IN_SC_BQ                  20
+#define EM_IN_SC_TIL_STATE           21
+
+/*
+ * Infrastructure Data - Neighbour Cell Information
+ */
+#define EM_IN_NC_NO_OF_NCELLS         1
+#define EM_IN_NC_BCCH_1               2
+#define EM_IN_NC_BCCH_2               3
+#define EM_IN_NC_BCCH_3               4
+#define EM_IN_NC_BCCH_4               5
+#define EM_IN_NC_BCCH_5               6
+#define EM_IN_NC_BCCH_6               7
+#define EM_IN_NC_RX_1                 8
+#define EM_IN_NC_RX_2                 9
+#define EM_IN_NC_RX_3                10
+#define EM_IN_NC_RX_4                11
+#define EM_IN_NC_RX_5                12
+#define EM_IN_NC_RX_6                13
+#define EM_IN_NC_C1_1                14
+#define EM_IN_NC_C1_2                15
+#define EM_IN_NC_C1_3                16
+#define EM_IN_NC_C1_4                17
+#define EM_IN_NC_C1_5                18
+#define EM_IN_NC_C1_6                19
+#define EM_IN_NC_BSIC_1              20
+#define EM_IN_NC_BSIC_2              21
+#define EM_IN_NC_BSIC_3              22
+#define EM_IN_NC_BSIC_4              23
+#define EM_IN_NC_BSIC_5              24
+#define EM_IN_NC_BSIC_6              25
+#define EM_IN_NC_CID_1               26
+#define EM_IN_NC_CID_2               27
+#define EM_IN_NC_CID_3               28
+#define EM_IN_NC_CID_4               29
+#define EM_IN_NC_CID_5               30
+#define EM_IN_NC_CID_6               31
+#define EM_IN_NC_FN_OFFSET_1         32
+#define EM_IN_NC_FN_OFFSET_2         33
+#define EM_IN_NC_FN_OFFSET_3         34
+#define EM_IN_NC_FN_OFFSET_4         35
+#define EM_IN_NC_FN_OFFSET_5         36
+#define EM_IN_NC_FN_OFFSET_6         37
+#define EM_IN_NC_TA_OFFSET_1         38
+#define EM_IN_NC_TA_OFFSET_2         39
+#define EM_IN_NC_TA_OFFSET_3         40
+#define EM_IN_NC_TA_OFFSET_4         41
+#define EM_IN_NC_TA_OFFSET_5         42
+#define EM_IN_NC_TA_OFFSET_6         43
+#define EM_IN_NC_C2_1                44
+#define EM_IN_NC_C2_2                45
+#define EM_IN_NC_C2_3                46
+#define EM_IN_NC_C2_4                47
+#define EM_IN_NC_C2_5                48
+#define EM_IN_NC_C2_6                49
+#define EM_IN_NC_LAC_1               50
+#define EM_IN_NC_LAC_2               51
+#define EM_IN_NC_LAC_3               52
+#define EM_IN_NC_LAC_4               53
+#define EM_IN_NC_LAC_5               54
+#define EM_IN_NC_LAC_6               55
+#define EM_IN_NC_BA_1                56
+#define EM_IN_NC_BA_2                57
+#define EM_IN_NC_BA_3                58
+#define EM_IN_NC_BA_4                59
+#define EM_IN_NC_BA_5                60
+#define EM_IN_NC_BA_6                61
+#define EM_IN_NC_BQ_1                62
+#define EM_IN_NC_BQ_2                63
+#define EM_IN_NC_BQ_3                64
+#define EM_IN_NC_BQ_4                65
+#define EM_IN_NC_BQ_5                66
+#define EM_IN_NC_BQ_6                67
+#define EM_IN_NC_TIL_STATE_1         68
+#define EM_IN_NC_TIL_STATE_2         69
+#define EM_IN_NC_TIL_STATE_3         70
+#define EM_IN_NC_TIL_STATE_4         71
+#define EM_IN_NC_TIL_STATE_5         72
+#define EM_IN_NC_TIL_STATE_6         73
+#define EM_IN_NC_TIL_SYNC_CNT        74
+#define EM_IN_NC_TIL_BCCH_CNT        75
+
+/*
+ * Infrastructure Data - Location and Paging Parameter
+ */
+#define EM_IN_LP_BS_PA_MFRMS          1
+#define EM_IN_LP_T3212                2
+#define EM_IN_LP_MCC                  3
+#define EM_IN_LP_MNC                  4
+#define EM_IN_LP_LAC                  5
+#define EM_IN_LP_TMSI                 6
+#define EM_IN_LP_LAC_RAW              7
+#define EM_IN_LP_CI_RAW               8
+
+#if defined (NEW_FRAME)
+/*
+ * to achieve backward compatibility with older definitions
+ */
+#define drv_SignalCB_Type           T_DRV_CB_FUNC
+#define drv_SignalID_Type           T_DRV_SIGNAL
+#define T_VSI_THANDLE               USHORT
+#endif
+
+/*
+ * Prototypes
+ */
+#ifndef FF_EM_MODE 
+EXTERN UBYTE em_Init                (void);
+EXTERN void  em_Exit                (void);
+#endif /* FF_EM_MODE */
+EXTERN UBYTE em_Read_Parameter      (UBYTE               em_class, 
+                                     UBYTE               em_subclass,
+                                     UBYTE               em_type,
+                                     em_data_type *      out_em_data);
+EXTERN UBYTE em_Enable_Post_Mortem  (void);
+EXTERN UBYTE em_Disable_Post_Mortem (void);
+EXTERN UBYTE em_Read_Post_Mortem    (em_data_type *      out_em_data);
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/ffs_coat.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,218 @@
+/*
++-----------------------------------------------------------------------------
+|  Modul   :  ffs_coat
++-----------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas
+|                 Instruments Berlin, AG
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++-----------------------------------------------------------------------------
+|  Purpose :  Encapsulate the FFS API.
++-----------------------------------------------------------------------------
+*/
+
+#ifndef FFS_COAT_H
+#define FFS_COAT_H
+
+#if defined(_TMS470)
+#define FFS_COAT_ENABLED
+#endif  /* _TMS470 */
+
+#undef FFS_COAT_ENABLED
+
+#if defined(FFS_COAT_ENABLED)
+#ifdef TI_PS_HCOMM_CHANGE
+#define FFS_open(path,flags)                  _FFS_open(path,flags,_hCommMMI,__FILE__,__LINE__)
+#define FFS_write(fd,p,size)                  _FFS_write(fd,p,size,_hCommMMI,__FILE__,__LINE__)
+#define FFS_read(fd,p,size)                   _FFS_read(fd,p,size,_hCommMMI,__FILE__,__LINE__)
+#define FFS_seek(fd,off,whence)               _FFS_seek(fd,off,whence,_hCommMMI,__FILE__,__LINE__)
+#define FFS_opendir(path,dir)                 _FFS_opendir(path,dir,_hCommMMI,__FILE__,__LINE__)
+#define FFS_readdir(dir,p,size)               _FFS_readdir(dir,p,size,_hCommMMI,__FILE__,__LINE__)
+#define FFS_readlink(path,p,size)             _FFS_readlink(path,p,size,_hCommMMI,__FILE__,__LINE__)
+#define FFS_file_read(path,p,size)            _FFS_file_read(path,p,size,_hCommMMI,__FILE__,__LINE__)
+#define FFS_fread(path,p,size)                _FFS_fread(path,p,size,_hCommMMI,__FILE__,__LINE__)
+
+/* FFS functions which return a value EFFS_OK if OK */
+#define FFS_preformat(magic)                  _FFS_preformat(magic,_hCommMMI,__FILE__,__LINE__)
+#define FFS_format(name,magic)                _FFS_format(name,magic,_hCommMMI,__FILE__,__LINE__)
+#define FFS_close(fd)                         _FFS_close(fd,_hCommMMI,__FILE__,__LINE__)
+#define FFS_truncate(path,length)             _FFS_truncate(path,length,_hCommMMI,__FILE__,__LINE__)
+#define FFS_ftruncate(fd,length)              _FFS_ftruncate(fd,length,_hCommMMI,__FILE__,__LINE__)
+#define FFS_fdatasync(fd)                     _FFS_fdatasync(fd,_hCommMMI,__FILE__,__LINE__)
+#define FFS_stat(name,stat)                   _FFS_stat(name,stat,_hCommMMI,__FILE__,__LINE__)
+#define FFS_fstat(fd,stat)                    _FFS_fstat(fd,stat,_hCommMMI,__FILE__,__LINE__)
+#define FFS_lstat(name,stat)                  _FFS_lstat(name,stat,_hCommMMI,__FILE__,__LINE__)
+#define FFS_linkstat(name,stat)               _FFS_linkstat(name,stat,_hCommMMI,__FILE__,__LINE__)
+#define FFS_xlstat(name,stat)                 _FFS_xlstat(name,stat,_hCommMMI,__FILE__,__LINE__)
+#define FFS_remove(name)                      _FFS_remove(name,_hCommMMI,__FILE__,__LINE__)
+#define FFS_mkdir(path)                       _FFS_mkdir(path,_hCommMMI,__FILE__,__LINE__)
+#define FFS_symlink(name,path)                _FFS_symlink(name,path,_hCommMMI,__FILE__,__LINE__)
+#define FFS_rename(oldname,newname)           _FFS_rename(oldname,newname,_hCommMMI,__FILE__,__LINE__)
+#define FFS_file_write(name,addr,size,flags)  _FFS_file_write(name,addr,size,flags,_hCommMMI,__FILE__,__LINE__)
+#define FFS_fcreate(path,p,size)              _FFS_fcreate(path,p,size,_hCommMMI,__FILE__,__LINE__)
+#define FFS_fupdate(name,addr,size)           _FFS_fupdate(name,addr,size,_hCommMMI,__FILE__,__LINE__)
+#define FFS_fwrite(path,p,size)               _FFS_fwrite(path,p,size,_hCommMMI,__FILE__,__LINE__)
+#define FFS_fcontrol(path,type,param)         _FFS_fcontrol(path,type,param,_hCommMMI,__FILE__,__LINE__)
+#define FFS_query(query,p)                    _FFS_query(query,p,_hCommMMI,__FILE__,__LINE__)
+/* FFS functions whose positive return value has a meaning */
+#else
+#define FFS_open(path,flags)                  _FFS_open(path,flags,hCommMMI,__FILE__,__LINE__)
+#define FFS_write(fd,p,size)                  _FFS_write(fd,p,size,hCommMMI,__FILE__,__LINE__)
+#define FFS_read(fd,p,size)                   _FFS_read(fd,p,size,hCommMMI,__FILE__,__LINE__)
+#define FFS_seek(fd,off,whence)               _FFS_seek(fd,off,whence,hCommMMI,__FILE__,__LINE__)
+#define FFS_opendir(path,dir)                 _FFS_opendir(path,dir,hCommMMI,__FILE__,__LINE__)
+#define FFS_readdir(dir,p,size)               _FFS_readdir(dir,p,size,hCommMMI,__FILE__,__LINE__)
+#define FFS_readlink(path,p,size)             _FFS_readlink(path,p,size,hCommMMI,__FILE__,__LINE__)
+#define FFS_file_read(path,p,size)            _FFS_file_read(path,p,size,hCommMMI,__FILE__,__LINE__)
+#define FFS_fread(path,p,size)                _FFS_fread(path,p,size,hCommMMI,__FILE__,__LINE__)
+
+/* FFS functions which return a value EFFS_OK if OK */
+#define FFS_preformat(magic)                  _FFS_preformat(magic,hCommMMI,__FILE__,__LINE__)
+#define FFS_format(name,magic)                _FFS_format(name,magic,hCommMMI,__FILE__,__LINE__)
+#define FFS_close(fd)                         _FFS_close(fd,hCommMMI,__FILE__,__LINE__)
+#define FFS_truncate(path,length)             _FFS_truncate(path,length,hCommMMI,__FILE__,__LINE__)
+#define FFS_ftruncate(fd,length)              _FFS_ftruncate(fd,length,hCommMMI,__FILE__,__LINE__)
+#define FFS_fdatasync(fd)                     _FFS_fdatasync(fd,hCommMMI,__FILE__,__LINE__)
+#define FFS_stat(name,stat)                   _FFS_stat(name,stat,hCommMMI,__FILE__,__LINE__)
+#define FFS_fstat(fd,stat)                    _FFS_fstat(fd,stat,hCommMMI,__FILE__,__LINE__)
+#define FFS_lstat(name,stat)                  _FFS_lstat(name,stat,hCommMMI,__FILE__,__LINE__)
+#define FFS_linkstat(name,stat)               _FFS_linkstat(name,stat,hCommMMI,__FILE__,__LINE__)
+#define FFS_xlstat(name,stat)                 _FFS_xlstat(name,stat,hCommMMI,__FILE__,__LINE__)
+#define FFS_remove(name)                      _FFS_remove(name,hCommMMI,__FILE__,__LINE__)
+#define FFS_mkdir(path)                       _FFS_mkdir(path,hCommMMI,__FILE__,__LINE__)
+#define FFS_symlink(name,path)                _FFS_symlink(name,path,hCommMMI,__FILE__,__LINE__)
+#define FFS_rename(oldname,newname)           _FFS_rename(oldname,newname,hCommMMI,__FILE__,__LINE__)
+#define FFS_file_write(name,addr,size,flags)  _FFS_file_write(name,addr,size,flags,hCommMMI,__FILE__,__LINE__)
+#define FFS_fcreate(path,p,size)              _FFS_fcreate(path,p,size,hCommMMI,__FILE__,__LINE__)
+#define FFS_fupdate(name,addr,size)           _FFS_fupdate(name,addr,size,hCommMMI,__FILE__,__LINE__)
+#define FFS_fwrite(path,p,size)               _FFS_fwrite(path,p,size,hCommMMI,__FILE__,__LINE__)
+#define FFS_fcontrol(path,type,param)         _FFS_fcontrol(path,type,param,hCommMMI,__FILE__,__LINE__)
+#define FFS_query(query,p)                    _FFS_query(query,p,hCommMMI,__FILE__,__LINE__)
+#endif
+/* prototypes */
+T_FFS_FD  _FFS_open(const char *name, T_FFS_OPEN_FLAGS option,
+                   T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_SIZE _FFS_write(T_FFS_FD fdi, void *src, T_FFS_SIZE amount,
+                    T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_SIZE _FFS_read(T_FFS_FD fdi, void *src, T_FFS_SIZE size,
+                    T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_SIZE _FFS_seek(T_FFS_FD fdi, T_FFS_SIZE offset, T_FFS_WHENCE whence,
+                    T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_SIZE _FFS_opendir(const char *name, T_FFS_DIR *dir,
+                      T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_SIZE _FFS_readdir (T_FFS_DIR *dir, char *name, T_FFS_SIZE size,
+                      T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_SIZE _FFS_readlink(const char *name, char *addr, T_FFS_SIZE size,
+                      T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_SIZE _FFS_file_read(const char *name, void *addr, T_FFS_SIZE size,
+                       T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_SIZE _FFS_fread(const char *name, void *addr, T_FFS_SIZE size,
+                    T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_preformat(UINT16 magic,
+                      T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_format(const char *name, UINT16 magic,
+                    T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_close(T_FFS_FD fdi,
+                   T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_truncate(const char *path, T_FFS_OFFSET length,
+                     T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_ftruncate(T_FFS_FD fdi, T_FFS_OFFSET length,
+                      T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_fdatasync(T_FFS_FD fdi,
+                       T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_stat(const char *name, T_FFS_STAT *stat,
+                  T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_fstat(T_FFS_FD fdi, T_FFS_STAT *stat,
+                   T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_lstat(const char *name, T_FFS_STAT *stat,
+                   T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_xlstat(const char *name, T_FFS_XSTAT *stat,
+                    T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_linkstat(const char *name, T_FFS_STAT *stat,
+                     T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_remove(const char *name,
+                     T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_mkdir(const char *name,
+                    T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_symlink(const char *name, const char *actualpath,
+                     T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_rename(const char *oldname, const char *newname,
+                     T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_file_write(const char *name, void *addr, T_FFS_SIZE size,
+                      T_FFS_OPEN_FLAGS flags,
+                      T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_fcreate(const char *name, void *addr, T_FFS_SIZE size,
+                     T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_fupdate(const char *name, void *addr, T_FFS_SIZE size,
+                     T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_fwrite(const char *name, void *addr, T_FFS_SIZE size,
+                    T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_fcontrol(const char *pathname, INT8 action, int param,
+                     T_HANDLE hMMI, const char * const  file, int line);
+T_FFS_RET _FFS_query(INT8 query, void *p,
+                   T_HANDLE hMMI, const char * const  file, int line);
+#else  /* FFS_COAT_ENABLED */
+/* FFS functions whose positive return value has a meaning */
+#define FFS_open(path,flags)                  ffs_open(path,flags)
+#define FFS_write(fd,p,size)                  ffs_write(fd,p,size)
+#define FFS_read(fd,p,size)                   ffs_read(fd,p,size)
+#define FFS_seek(fd,off,whence)               ffs_seek(fd,off,whence)
+#define FFS_opendir(path,dir)                 ffs_opendir(path,dir)
+#define FFS_readdir(dir,p,size)               ffs_readdir(dir,p,size)
+#define FFS_readlink(path,p,size)             ffs_readlink(path,p,size)
+#define FFS_file_read(path,p,size)            ffs_file_read(path,p,size)
+#define FFS_fread(path,p,size)                ffs_fread(path,p,size)
+
+/* FFS functions which return a value EFFS_OK if OK */
+#define FFS_preformat(magic)                  ffs_preformat(magic)
+#define FFS_format(name,magic)                ffs_format(name,magic)
+#define FFS_close(fd)                         ffs_close(fd)
+#define FFS_truncate(path,length)             ffs_truncate(path,length)
+#define FFS_ftruncate(fd,length)              ffs_ftruncate(fd,length)
+#define FFS_fdatasync(fd)                     ffs_fdatasync(fd)
+#define FFS_stat(name,stat)                   ffs_stat(name,stat)
+#define FFS_fstat(fd,stat)                    ffs_fstat(fd,stat)
+#define FFS_lstat(name,stat)                  ffs_lstat(name,stat)
+#define FFS_linkstat(name,stat)               ffs_linkstat(name,stat)
+#define FFS_xlstat(name,stat)                 ffs_xlstat(name,stat)
+#define FFS_remove(name)                      ffs_remove(name)
+#define FFS_mkdir(path)                       ffs_mkdir(path)
+#define FFS_symlink(name,path)                ffs_symlink(name,path)
+#define FFS_rename(oldname,newname)           ffs_rename(oldname,newname)
+#define FFS_file_write(name,addr,size,flags)  ffs_file_write(name,addr,size,flags)
+#define FFS_fcreate(path,p,size)              ffs_fcreate(path,p,size)
+#define FFS_fupdate(name,addr,size)           ffs_fupdate(name,addr,size)
+#define FFS_fwrite(path,p,size)               ffs_fwrite(path,p,size)
+#define FFS_fcontrol(path,type,param)         ffs_fcontrol(path,type,param)
+#define FFS_query(query,p)                    ffs_query(query,p)
+#endif  /* FFS_COAT_ENABLED */
+
+#define FFS_Check(fct)           _FFS_StateCheck(fct,hMMI,__FILE__,__LINE__)
+
+GLOBAL  T_FFS_RET _FFS_StateCheck (const char * const fct,
+                                T_HANDLE hMMI, const char * const file, int line);
+
+#if !defined(SYST_TRACE)
+#if defined(NEW_FRAME)
+#define SYST_TRACE(a) vsi_o_ttrace(0, 0xFFFF,a)
+#define SYST           0, 0xffff
+#define SYST_TRACE_P(a) vsi_o_ttrace a
+#else
+#define SYST_TRACE(a) vsi_o_trace("", 0xFFFF,a)
+#define SYST           "", 0xffff
+#define SYST_TRACE_P(a) vsi_o_trace a
+#endif
+/*
+ * use it as showed next line...
+ * SYST_TRACE_P((SYST, "e.g. two parameter: %d %d", p1, p2));
+ */
+#endif  /* !SYST_TRACE */
+
+#endif  /* !FFS_COAT_H */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/font_bitmaps.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,62 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  
+|  Modul   :  display
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  
++----------------------------------------------------------------------------- 
+*/ 
+#ifndef FONT_BITMAPS_H
+#define FONT_BITMAPS_H
+
+
+typedef struct{
+
+USHORT code;
+UBYTE  format;
+UBYTE  height;
+UBYTE width;
+UBYTE bitmapSize;
+char* bitmap;
+}t_font_bitmap;
+
+enum {
+	/*---------------------------USE VALUES BETWEEN -1 TO 254------------------------------*/
+	NO_FONT=-1,
+//Currently we only support this font for smaller displays
+#ifndef LSCREEN
+	DEFAULT_8x6=0,
+#endif
+//We need only support this font on larger displays
+#ifdef LSCREEN
+	CHANTICLE_PROP15 = 1,
+#if 0 //Using Arial-type may be problematic - disable
+	ARIAL_PROP15 = 2,
+#endif
+
+#endif
+	LAST_FONT
+	/*---------------------------USE VALUES BETWEEN -1 TO 254-------------------------------*/
+};
+
+
+t_font_bitmap* get_bitmap(USHORT selected_code);
+USHORT font_setFont(USHORT font);
+USHORT font_getFont(void);
+USHORT font_getCharWidth(USHORT selected_code);
+void font_initFont( int defaultFont );
+/* SPR#1983 - SH - Get list of all ascii font widths in array */
+void font_getAllAsciiWidths(UBYTE *width);
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/gsm.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,598 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  GSM-PS (6147)
+|  Modul   :  GSM
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Definition of global constants, types, and macros
+|             for the GSM Protocol Stack
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef GSM_H
+#define GSM_H
+
+#ifndef CCONST_CDG
+#include "mconst.cdg"   /* MAX_BITSTREAM_LEN */
+#endif /* CCONST_CDG */
+#ifndef PCONST_CDG
+#include "pconst.cdg"   /* MAX_PSTRUCT_LEN   */
+#endif /* PCONST_CDG */
+
+/*==== CONSTANTS ==================================================*/
+
+#define MAX_2_PRM      1
+#define MAX_4_PRM      3
+#define MAX_8_PRM      7
+#define MAX_16_PRM    15
+#define MAX_32_PRM    31
+
+#define PRM_MASK       0x00FF             /* protocol primitive mask*/
+#define OPC_MASK       0xFF00             /* entity mask            */
+#define SYS_MASK       0x8000             /* system primitive mask  */
+
+#define SYS_CONFIG_REQ 0xF000
+
+#define L3_CODING_OFFSET   32             /* coding offset in bits */
+
+/*
+ * Not Present Value
+ */
+
+#define NOT_PRESENT_8BIT        0xFF
+#define NOT_PRESENT_CHAR        (CHAR)0xFF
+#define NOT_PRESENT_16BIT       0xFFFF
+#define NOT_PRESENT_32BIT       0xFFFFFFFFL
+#define INVALID_ADDRESS         0xFFFFFFFFL
+#define SET_NOT_PRESENT(A)      ((A) = ((sizeof ((A)) EQ 1)\
+                                        ? NOT_PRESENT_8BIT\
+                                        : (sizeof ((A)) EQ 2)\
+                                            ? NOT_PRESENT_16BIT\
+                                            : NOT_PRESENT_32BIT))
+
+#define IS_PRESENT(A)           ((A) NEQ ((sizeof ((A)) EQ 1)\
+                                        ? NOT_PRESENT_8BIT\
+                                        : (sizeof ((A)) EQ 2)\
+                                            ? NOT_PRESENT_16BIT\
+                                            : NOT_PRESENT_32BIT)) /* VK 09-12-96 */
+
+#ifndef NEW_FRAME
+/*
+ * Static Configurations
+ */
+
+#ifndef TC_FUNC
+#define TC_FUNC 1
+#endif
+
+#ifdef TRACE_FKT
+#define TRACE_FUNCTION(a)  vsi_o_trace(VSI_CALLER TC_FUNC,a);
+#else
+// China change HM 6.07.00, one of this commented out
+#define TRACE_FUNCTION(a)
+//#define TRACE_FUNCTION(a)  vsi_o_mtrace(a);
+#endif
+
+#ifndef TC_EVE
+#define TC_EVE   2
+#endif
+
+#ifdef TRACE_EVE
+#define TRACE_EVENT(a)     vsi_o_trace(VSI_CALLER TC_EVENT,a);
+#else
+#define TRACE_EVENT(a)
+#endif
+
+#ifndef TC_ERROR
+#define TC_ERROR 4
+#endif
+#ifdef TRACE_ERR
+#define TRACE_ERROR(a)     vsi_o_trace(VSI_CALLER TC_ERROR,a);
+#else
+#define TRACE_ERROR(a)
+#endif
+
+#ifndef TC_PRIM
+#define TC_PRIM 8
+#endif
+
+#ifdef TRACE_PRIM
+#define TRACE_PRIMITIVE(a)  vsi_o_trace(VSI_CALLER TC_PRIM,a);
+#else
+#define TRACE_PRIMITIVE(a)
+#endif
+
+#ifndef TC_SYSTEM
+#define TC_SYSTEM 16
+#endif
+
+ /*
+ * Assert wrapper
+ */
+
+#if defined NDEBUG
+    #define TRACE_ASSERT(e) ((void)0)
+#else
+  #ifdef SHARED_VSI
+    #define TRACE_ASSERT(e) if ( !(e) ) vsi_o_assert("",#e,__FILE__,__LINE__)
+  #else
+    #define TRACE_ASSERT(e) if ( !(e) ) vsi_o_assert(#e,__FILE__,__LINE__)
+  #endif
+#endif
+
+#ifdef    assert
+  #undef  assert
+#endif
+  #define assert TRACE_ASSERT
+
+#endif /* NEW_FRAME */
+
+/*
+ * Memory Management(I)
+ */
+
+#ifdef OPTION_REF
+#define FREE_BUFFER(p)     vsi_c_free(VSI_CALLER (void **)&p)
+/*lint -e773 Expression-like macro not parenthesized*/
+#define NEW_BUFFER(p,s)    T_PRIM *p = vsi_c_new(VSI_CALLER (T_VSI_CSIZE)((s)+sizeof(T_PRIM_HEADER)))
+/*lint +e773*/
+#else
+#define FREE_BUFFER(p)
+#define NEW_BUFFER(p,s)    UBYTE buf_##p [(s)+sizeof(T_PRIM_HEADER)]; T_PRIM *p=(T_PRIM*)p1
+#endif
+
+#if !defined (_TMS470)
+#define Sprintf sprintf
+#else
+int sprintf( char *buffer, const char *format, ... );
+#endif
+
+#ifndef NEW_FRAME
+
+#ifdef _TMS470
+  #define SET_PRIM_OPCODE(P,O) P->custom.opc = O; P->custom.opc2 = 0
+#else
+  #define SET_PRIM_OPCODE(P,O) P->custom.opc = O
+#endif
+
+#ifdef OPTION_LENGTH
+  #define SEND_PRIM(E,P,O,T)       SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER) + sizeof (T))
+  #define SEND_PRIM_0(E,P,O)       SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER))
+  #define SEND_PRIM_SDU(E,P,O,T,L) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, (T_VSI_CSIZE) (sizeof(T_PRIM_HEADER) + sizeof (T) + (L) - SDU_TRAIL))
+#else
+  #define SEND_PRIM(E,P,O,T)       SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER) + sizeof (T))
+  #define SEND_PRIM_0(E,P,O)       SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, sizeof(T_PRIM_HEADER))
+  #define SEND_PRIM_SDU(E,P,O,T,L) SET_PRIM_OPCODE (P,O); vsi_c_send (VSI_CALLER hComm##E, P, (T_VSI_CSIZE) (sizeof(T_PRIM_HEADER) + sizeof (T) + (L) - SDU_TRAIL))
+#endif
+
+#endif /* NEW_FRAME */
+/*
+ * declares a pointer variable (D) of the type T
+ * and initialize it with the startaddress of the data part
+ * of the primitive P
+ */
+#ifndef ALLOC_CHECK
+  #if defined (_TMS470) AND defined (NWARN)
+    #define PRIM_ACCESS(P,S) &P->data
+  #else
+    #define PRIM_ACCESS(P,S) P->data
+  #endif
+#else
+ #define PRIM_ACCESS(P,S) vsi_c_access(VSI_CALLER P,S)
+#endif
+/*lint -e773 Expression-like macro not parenthesized*/
+#define PRIM_CAST(P,D,T) T *D = (T *) PRIM_ACCESS (P, sizeof (T))
+/*lint +e773*/
+/*
+ * declares a pointer variable (D) of the type T and
+ * initialize it with the start address of the global declared
+ * buffer _decodedMsg[] wich contains the decoded message
+ * structure before encoding or after decoding the message
+ * with CCD.
+ */
+/*lint -e773 Expression-like macro not parenthesized*/
+#define MSG_CAST(D,T)    T *D = (T *) _decodedMsg
+/*lint +e773*/
+/*
+ * Memory Management(II)
+ */
+
+#ifndef NEW_FRAME
+
+#if defined (_TMS470) AND defined (NWARN)
+#define  P2D(P)                    (&(P)->data)
+#else
+#define  P2D(P)                    ((P)->data)
+#endif
+#define  D2P(D)                    ((T_PRIM*)((T_PRIM_HEADER*)(D)-1))
+
+#ifdef   ALLOC_CHECK
+#define  P2D_AC(P,T)               PRIM_ACCESS(P,sizeof(T))
+#else
+#define  P2D_AC(P,T)               P2D(P)
+#endif
+
+#define  PRIM_TO_DATA              P2D
+#define  DATA_TO_PRIM              D2P
+
+#define  P_OPC(P)                  (P)->custom.opc
+#define  P_OPC2(P)                 (P)->custom.opc2
+#define  P_LEN(P)                  (P)->custom.len
+#define  P_TID(P)                  (P)->custom.tid
+#define  P_SDU(P)                  (P)->custom.sdu
+
+#define  D_OPC(D)                  P_OPC(D2P(D))
+#define  D_OPC2(D)                 P_OPC2(D2P(D))
+#define  D_LEN(D)                  P_LEN(D2P(D))
+#define  D_TID(D)                  P_TID(D2P(D))
+#define  D_SDU(D)                  P_SDU(D2P(D))
+
+#define  D_SDU_LEN(D)              D_SDU(D)->l_buf
+#define  D_SDU_OFF(D)              D_SDU(D)->o_buf
+
+#define  BITS_PER_BYTE             8
+#define  BYTELEN(BITLEN)           ((BITLEN)<=0?0:((((BITLEN)-1)/BITS_PER_BYTE)+1))
+
+#define  PRIM_SIZE(D)              (sizeof(T_PRIM_HEADER)+sizeof(*(D)))
+#define  PRIM_SIZE_SDU(D)          (PRIM_SIZE(D)+BYTELEN((D)->sdu.o_buf+(D)->sdu.l_buf))
+
+#define  PSIZE(D)                  (D_LEN(D)+((D_SDU(D)==0)?0:(BYTELEN(D_SDU_LEN(D)+D_SDU_OFF(D))-SDU_TRAIL)))
+
+#define  SIZ(T)                    (sizeof(T_PRIM_HEADER)+sizeof(T))
+
+#define  SIZ_SDU(T,M)              (SIZ(T)+BYTELEN((M)+ENCODE_OFFSET)-SDU_TRAIL)
+
+#define  P_ALL(T)                  (T_PRIM *) vsi_c_new(VSI_CALLER (T_VSI_CSIZE)SIZ(T) )
+#define  P_ALL_SDU(T,M)            (T_PRIM *) vsi_c_new(VSI_CALLER (T_VSI_CSIZE)SIZ_SDU(T,M))
+
+#endif /* NEW_FRAME */
+
+#define  OFFSETOF(P,C)             ((char*)&(P->C) - (char*)P)
+
+#ifdef NTRACE
+  #define  xxxNotify(A,B,C,D,E)
+#else
+  #define  xxxNotify(A,B,C,D,E)      /* not used yet */
+#endif
+
+
+#define  ACT_PALLOC                0x01
+#define  ACT_PALLOC_SDU            0x02
+#define  ACT_PALLOC_MSG            0x03
+#define  ACT_PREUSE                0x04
+#define  ACT_PREUSE_SDU            0x05
+#define  ACT_PREUSE_MSG            0x06
+#define  ACT_PFREE                 0x07
+#define  ACT_PSEND                 0x08
+#define  ACT_PSTORE                0x09
+#define  ACT_PRETRIEVE             0x0A
+#define  ACT_PACCESS               0x0B
+#define  ACT_PPASS                 0x0C
+#define  ACT_PCAST                 0x0D
+
+/*** memory alloction  ***/
+
+
+#ifndef NEW_FRAME
+
+#define PSENDX PSEND
+
+#define  PALLOC(D,T)               T_##T  *D    = (T_##T*)P2D(P_ALL(T_##T));\
+                                   D_OPC(D)     = (T);\
+                                   D_OPC2(D)    = 0;\
+                                   D_LEN(D)     = SIZ(T_##T);\
+                                   D_SDU(D)     = 0;\
+                                   xxxNotify(ACT_PALLOC,VSI_CALLER,__FILE__,__LINE__,D2P(D))
+
+#define  PALLOC_MSG(D,T,M)         T_##T  *D    = (T_##T*)P2D(P_ALL_SDU(T_##T,BSIZE_##M));\
+                                   D_OPC(D)     = (T);\
+                                   D_OPC2(D)    = 0;\
+                                   D_LEN(D)     = SIZ(T_##T);\
+                                   D_SDU(D)     = &((D)->sdu);\
+                                   D_SDU_LEN(D) = (BSIZE_##M);\
+                                   D_SDU_OFF(D) = ENCODE_OFFSET;\
+                                   xxxNotify(ACT_PALLOC_MSG,VSI_CALLER,__FILE__,__LINE__,D2P(D))
+
+#define  PALLOC_SDU(D,T,N)         T_##T  *D    = (T_##T*)P2D(P_ALL_SDU(T_##T,N));\
+                                   D_OPC(D)     = (T);\
+                                   D_OPC2(D)    = 0;\
+                                   D_LEN(D)     = SIZ(T_##T);\
+                                   D_SDU(D)     = &((D)->sdu);\
+                                   D_SDU_LEN(D) = (N);\
+                                   D_SDU_OFF(D) = ENCODE_OFFSET;\
+                                   xxxNotify(ACT_PALLOC_SDU,VSI_CALLER,__FILE__,__LINE__,D2P(D))
+
+#define  PREUSE(D0,D,T)            T_##T  *D    = (T_##T*)P2D_AC(D2P(D0),T);\
+                                   D_OPC(D)     = (T);\
+                                   D_OPC2(D)    = 0;\
+                                   D_LEN(D)     = SIZ(T_##T);\
+                                   D_SDU(D)     = 0;\
+                                   xxxNotify(ACT_REUSE,VSI_CALLER,__FILE__,__LINE__,D2P(D))
+
+#define  PREUSE_MSG(D,T,M)         T_##T  *D    = (T_##T*)P2D_AC(D2P(D0),T);\
+                                   D_OPC(D)     = (T);\
+                                   D_OPC2(D)    = 0;\
+                                   D_LEN(D)     = SIZ(T_##T);\
+                                   D_SDU(D)     = &((D)->sdu);\
+                                   D_SDU_LEN(D) = (BSIZE_##M);\
+                                   D_SDU_OFF(D) = ENCODE_OFFSET;\
+                                   xxxNotify(ACT_PREUSE_MSG,VSI_CALLER,__FILE__,__LINE__,D2P(D))
+
+#define  PREUSE_SDU(D,T,N)         T_##T  *D    = (T_##T*)P2D_AC(D2P(D0),T);\
+                                   USHORT BSIZE_##N;\
+                                   D_OPC(D)     = (T);\
+                                   D_OPC2(D)    = 0;\
+                                   D_LEN(D)     = SIZ(T_##T);\
+                                   D_SDU(D)     = &((D)->sdu);\
+                                   D_SDU_LEN(D) = (N);\
+                                   D_SDU_OFF(D) = ENCODE_OFFSET;\
+                                   xxxNotify(ACT_PREUSE_SDU,VSI_CALLER,__FILE__,__LINE__,D2P(D))
+
+#define  PFREE(D)                  { void *z=(void*)D2P(D);\
+                                   vsi_c_free(VSI_CALLER (void **)&z);\
+                                   xxxNotify(ACT_PFREE,VSI_CALLER,__FILE__,__LINE__,D2P(D)); }
+
+#define  PSEND(E,D)                PTRACE_OUT(D_OPC(D));\
+                                   vsi_c_send (VSI_CALLER hComm##E, D2P(D), (T_VSI_CSIZE) PSIZE(D));\
+                                   xxxNotify(ACT_PSEND,VSI_CALLER,__FILE__,__LINE__,D2P(D))
+
+#define  PPASS(D0,D,T)             T_##T  *D    = (T_##T*)P2D_AC(D2P(D0),T);\
+                                   D_OPC(D)     = (T);\
+                                   xxxNotify(ACT_PPASS,VSI_CALLER,__FILE__,__LINE__,D2P(D))
+
+#define  PACCESS(D)                xxxNotify(ACT_PACCESS,VSI_CALLER,__FILE__,__LINE__,D2P(D))
+
+
+#endif /* NEW_FRAME */
+
+/*
+ * to achieve backward compatibility
+ */
+
+#if defined (NEW_FRAME)
+#ifdef TI_PS_HCOMM_CHANGE
+#define PSENDX(A,B) PSEND(_hComm##A,B)
+#define _hCommACI hCommACI
+#else
+#define PSENDX(A,B) PSEND(hComm##A,B)
+#endif
+#else
+#define PSENDX PSEND
+#endif
+
+
+
+#define  PRETRIEVE                 /* NOT DEFINED YET */
+
+
+#define  MCAST(D,T)                MSG_CAST(D,T_##T)
+#define  PCAST(P,D,T)              T_##T  *D    = (T_##T*)P2D_AC(P,T);\
+                                   P_OPC(P)=T;\
+                                   xxxNotify(ACT_PCAST,VSI_CALLER,__FILE__,__LINE__,D2P(D))
+
+#define  PCOPY(DEST,SOURCE)        memcpy(DEST,SOURCE,PSIZE(SOURCE)-sizeof(T_PRIM_HEADER))
+
+/*** trace primitive, trace state ***/
+
+#ifndef NEW_FRAME
+
+#ifdef NTRACE
+
+  #define SET_STATE(PROCESS,STATE)    ENTITY_DATA->state[PROCESS] = STATE
+  #define GET_STATE(PROCESS)          ENTITY_DATA->state[PROCESS]
+
+  #define PTRACE_IN(OPC)
+  #define PTRACE_OUT(OPC)
+
+#else
+
+  #define SET_STATE(PROCESS,STATE)\
+                ENTITY_DATA->state[PROCESS] =\
+                vsi_o_strace (VSI_CALLER\
+                              PROCESS_NAME[PROCESS],\
+                              PROCESS##_NAME [ ENTITY_DATA->state[PROCESS] ],\
+                              PROCESS##_NAME [              STATE          ],\
+                                                            STATE              )
+
+  #define GET_STATE(PROCESS)\
+                vsi_o_strace (VSI_CALLER\
+                              PROCESS_NAME[PROCESS],\
+                              PROCESS##_NAME [ ENTITY_DATA->state[PROCESS] ],\
+                                                            NULL            ,\
+                                               ENTITY_DATA->state[PROCESS]     )
+
+  #define PTRACE_IN(OPC)              vsi_o_ptrace (VSI_CALLER OPC, 0)
+  #define PTRACE_OUT(OPC)             vsi_o_ptrace (VSI_CALLER OPC, 1)
+
+#endif
+
+#endif /* NEW_FRAME */
+/*
+ * Timer, Jump Table, Configuration
+ */
+
+#ifdef OPTION_TIMER
+#define TSTART(i,h,v) tim_start_timer(i,h,v)
+#else
+#define TSTART(i,h,v) TIMER_START(VSI_CALLER h,v)
+#endif
+
+#ifdef OPTION_RELATIVE
+#define JUMP(a)  (a+offset)
+#else
+#define JUMP(a) (a)
+#endif
+
+#ifdef OPTION_SET_CONFIG_ONLY
+#define GET_CONFIG(s,i)
+#else
+#define GET_CONFIG(s,i) pei_get_config(s,i)
+#endif
+
+/* Cause Concept (begin) */
+/* 
+ * For a definition of the cause concept please refer to document number
+ * 8443.711, named in February 2002 "cause_concept.doc"
+ */
+
+/* definitions for calling the macros */
+/* DefinedBy bit */
+#define DEFBY_STD    0
+#define DEFBY_CONDAT 1
+/* OriginatingSide bit */
+#define ORIGSIDE_NET 0
+#define ORIGSIDE_MS  1
+/* 
+ * note that OriginatingEntity definitions are in the SAP GSMCOM, which is a 
+ * central (pseudo) SAP and the definitions are referenced in the using 
+ * "real" SAPs, like e.g. MNSS SAP for the originating entity SS
+ */
+
+/* need to decide whether to mask ORIGIN_ENTITY (max. 6 bits) in the following macro */
+#define CAUSE_MAKE(DEFINED_BY, ORIGIN_SIDE, ORIGIN_ENTITY, CAUSE_VALUE) \
+          (USHORT)(((CAUSE_VALUE) & 0x00FF) |\
+          ((DEFINED_BY)    << 15) |\
+          ((ORIGIN_SIDE)   << 14) |\
+          ((ORIGIN_ENTITY) <<  8))
+
+/* Get the cause value without the originating entity */
+#define GET_CAUSE_VALUE(cause)          (UBYTE)((cause) & 0xFF)
+
+/* Get the entity originating the cause */
+#define GET_CAUSE_ORIGIN_ENTITY(cause)  (UBYTE)(((cause) >> 8) & 0x3F)
+
+/* Get the DefinedBy bit */
+#define GET_CAUSE_DEFBY(cause)  (UBYTE)((cause) >> 15)
+
+/* Get the OriginatingSide bit */
+#define GET_CAUSE_ORIGSIDE(cause)  (UBYTE)(((cause) >> 14) & 0x01)
+
+/* Determine if a cause is invalid */
+#define IS_CAUSE_INVALID(cause)   (((cause) & 0x80FF) EQ 0x80FF)
+
+/* Cause Concept (end) */
+
+
+/*==== TYPES ======================================================*/
+#if defined (_TMS470) && defined (NWARN)
+typedef struct
+{
+  UBYTE           x [MAX_PSTRUCT_LEN
+                     + (
+                         L3_CODING_OFFSET
+                         + MAX_BITSTREAM_LEN
+                        ) / 8 + 1
+                    ];
+} T_PARAMETER;
+
+typedef struct
+{
+  T_PRIM_HEADER   custom;
+  T_PARAMETER     data;
+} T_PRIM;
+#else
+typedef struct
+{
+  T_PRIM_HEADER   custom;
+  UBYTE           data [MAX_PSTRUCT_LEN
+                     + (
+                         L3_CODING_OFFSET
+                         + MAX_BITSTREAM_LEN
+                        ) / 8 + 1
+                    ];
+} T_PRIM;
+#endif
+
+/*==== EXPORT =====================================================*/
+
+
+
+/*
+ * Multithreading
+ */
+
+
+
+#ifdef OPTION_MULTITHREAD
+  #if defined (ENTITY_CST)
+    #define _ENTITY_PREFIXED(N) cst_##N
+  #elif defined (ENTITY_ACI)
+    #define _ENTITY_PREFIXED(N) aci_##N
+  #elif defined (ENTITY_MFW)
+    #define _ENTITY_PREFIXED(N) aci_##N
+  #elif defined (ENTITY_MMI)
+    #define _ENTITY_PREFIXED(N) aci_##N
+  #elif defined (ENTITY_SMI)
+    #define _ENTITY_PREFIXED(N) aci_##N
+  #elif defined (ENTITY_SIM)
+    #define _ENTITY_PREFIXED(N) sim_##N
+  #elif defined (ENTITY_PL)
+    #define _ENTITY_PREFIXED(N) pl_##N
+  #elif defined (ENTITY_L1)
+    #define _ENTITY_PREFIXED(N) l1_##N
+  #elif defined (ENTITY_CC)
+    #define _ENTITY_PREFIXED(N) cc_##N
+  #elif defined (ENTITY_SS)
+    #define _ENTITY_PREFIXED(N) ss_##N
+  #elif defined (ENTITY_ESIM)
+    #define _ENTITY_PREFIXED(N) esim_##N
+  #elif defined (ENTITY_SMS)
+    #define _ENTITY_PREFIXED(N) sms_##N
+  #elif defined (ENTITY_MM)
+    #define _ENTITY_PREFIXED(N) mm_##N
+  #elif defined (ENTITY_RR)
+    #define _ENTITY_PREFIXED(N) rr_##N
+  #elif defined (ENTITY_DL)
+    #define _ENTITY_PREFIXED(N) dl_##N
+  #elif defined (ENTITY_L2R)
+    #define _ENTITY_PREFIXED(N) l2r_##N
+  #elif defined (ENTITY_TRA)
+    #define _ENTITY_PREFIXED(N) tra_##N
+  #elif defined (ENTITY_RLP)
+    #define _ENTITY_PREFIXED(N) rlp_##N
+  #elif defined (ENTITY_T30)
+    #define _ENTITY_PREFIXED(N) t30_##N
+  #elif defined (ENTITY_FAD)
+    #define _ENTITY_PREFIXED(N) fad_##N
+  #elif defined (ENTITY_RA)
+    #define _ENTITY_PREFIXED(N) ra_##N
+  #elif defined (ENTITY_WAP)
+    #define _ENTITY_PREFIXED(N) wap_##N
+  #elif defined (ENTITY_UDP)
+    #define _ENTITY_PREFIXED(N) udp_##N
+  #elif defined (ENTITY_IP)
+    #define _ENTITY_PREFIXED(N) ip_##N
+  #elif defined (ENTITY_RRLP)
+    #define _ENTITY_PREFIXED(N) rrlp_##N
+  #elif defined (ENTITY_PPP)
+    #define _ENTITY_PREFIXED(N) ppp_##N
+  #elif defined (ENTITY_BTI)
+    #define _ENTITY_PREFIXED(N) bti_##N
+  #elif defined (ENTITY_L1)
+    #ifdef NEW_FRAME
+      #include "ofe.h"
+    #endif
+  #elif defined (ENTITY_TAP)
+    #define _ENTITY_PREFIXED(N) tap_##N
+  #elif defined (ENTITY_PCO)
+    #define _ENTITY_PREFIXED(N) pco_##N
+  #elif defined (ENTITY_PAN)
+    #define _ENTITY_PREFIXED(N) pan_##N
+  #elif defined (ENTITY_TST)
+    #define _ENTITY_PREFIXED(N) tst_##N
+  #elif defined (ENTITY_APP)
+    #define _ENTITY_PREFIXED(N) app_##N
+  #endif
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/kbd.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,100 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  GSM (6301)
+|  Modul   :  
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Types definitions for the keybord driver
+|             .
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef KBD_H
+#define KBD_H
+
+/*
+ * typematic rates (character per second)
+ */
+#define KBD_TYPERATE_NONE     0
+#define KBD_TYPERATE_6        1
+#define KBD_TYPERATE_8        2
+#define KBD_TYPERATE_10       3
+#define KBD_TYPERATE_12       4
+#define KBD_TYPERATE_15       5
+#define KBD_TYPERATE_20       6
+#define KBD_TYPERATE_24       7
+#define KBD_TYPERATE_30       8
+
+/*
+ * type delay (in milliseconds)
+ */
+#define KBD_TYPEDELAY_250     1
+#define KBD_TYPEDELAY_500     2
+#define KBD_TYPEDELAY_750     3
+#define KBD_TYPEDELAY_1000    4
+
+/*
+ * Keyboard operations
+ */
+#define KBD_KEYDOWN           1
+#define KBD_KEYUP             2
+#define KBD_KEYREPEAT         3
+
+/*
+ * Keyboard signals
+ */
+#define KBD_SIGTYPE_STATUSCHG 1
+
+/*
+ * Driver Control Block
+ */
+typedef struct kbd_DCB_Type
+{
+  USHORT TypematicRate;
+  USHORT TypematicDelay;
+} kbd_DCB_Type;
+
+#if defined (NEW_FRAME)
+/*
+ * to achieve backward compatibility with older definitions
+ */
+#define drv_SignalCB_Type           T_DRV_CB_FUNC
+#define drv_SignalID_Type           T_DRV_SIGNAL
+#define T_VSI_THANDLE               USHORT
+#endif
+
+/* Marcus: Issue 811: 05:09/2002: Start */
+/*
+ * Number of elements in the keypad arrays
+ */
+#define NUM_KPD_KEYS 32
+/*
+ * External data
+ */
+extern const UBYTE kbd_map [NUM_KPD_KEYS];
+extern const UBYTE simkbd_map [NUM_KPD_KEYS];
+extern char * const config_map [NUM_KPD_KEYS];
+/* Marcus: Issue 811: 05:09/2002: End */
+
+/*
+ * Prototypes
+ */
+EXTERN UBYTE kbd_Init        (drv_SignalCB_Type   in_SignalCBPtr);
+EXTERN void  kbd_Exit        (void);
+EXTERN UBYTE kbd_SetConfig   (kbd_DCB_Type      * in_DCBPtr);
+EXTERN UBYTE kbd_GetConfig   (kbd_DCB_Type      * out_DCBPtr);
+EXTERN UBYTE kbd_SetSignal   (drv_SignalID_Type * in_SignalIDPtr);
+EXTERN UBYTE kbd_ResetSignal (drv_SignalID_Type * in_SignalIDPtr);
+EXTERN ULONG kbd_GetStatus   (void);
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/light.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,64 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  GSM (6301)
+|  Modul   :  
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Types definitions for the light emitting driver
+|             .
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef LIGHT_H
+#define LIGHT_H
+
+/*
+ * devices
+ */
+#define LIGHT_DEVICE_BACKLIGHT     0
+#define LIGHT_DEVICE_INSERVICELED  1
+
+/*
+ * device status
+ */
+#define LIGHT_STATUS_OFF           0
+#define LIGHT_STATUS_ON            1
+#define LIGHT_STATUS_DIMMED        2
+#define LIGHT_STATUS_INTERMEDIATE  3
+#define LIGHT_STATUS_BRIGHT        4
+
+#define LIGHT_STATUS_GREEN         5
+#define LIGHT_STATUS_ORANGE        6
+#define LIGHT_STATUS_RED           7
+
+#if defined (NEW_FRAME)
+/*
+ * to achieve backward compatibility with older definitions
+ */
+#define drv_SignalCB_Type           T_DRV_CB_FUNC
+#define drv_SignalID_Type           T_DRV_SIGNAL
+#define T_VSI_THANDLE               USHORT
+#endif
+/*
+ * Prototypes
+ */
+EXTERN UBYTE light_Init      (void);
+EXTERN void  light_Exit      (void);
+EXTERN UBYTE light_SetStatus (UBYTE in_DeviceID, UBYTE in_NewStatus);
+EXTERN UBYTE light_GetStatus (UBYTE in_DeviceID, UBYTE * in_StatusPtr);
+
+void light_setBacklightOn( void );
+void light_setBacklightIdle( void );
+void light_setBacklightOff( void );
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/message.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,128 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  GSM-PS (6147)
+|  Modul   :  MESSAGE
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Message Definitions, depending on entity
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef MESSAGE_H
+#define MESSAGE_H
+
+/*
+ *  Definitions for Message Types
+ */
+#include "mconst.cdg"
+
+/*
+ *  Define the messages depending on the entity
+ */
+
+#ifdef ENTITY_RR
+
+#define ADD_BSIZE 8 /* additional 8 bits (Skip Indicator/PD) */
+#include "m_rr.h"
+#if defined (REL99) && defined (TI_PS_FF_EMR)
+#include "m_rr_short_pd.h"
+#endif
+
+#endif
+
+#ifdef ENTITY_RRLP
+
+#include "m_rrlp_asn1_msg.h"
+
+#endif
+
+#ifdef ENTITY_MM
+
+#include "m_mm.h"
+
+#endif
+
+#ifdef ENTITY_CC
+
+#include "m_cc.h"
+
+#endif
+
+#ifdef ENTITY_SS
+
+#include "m_ss.h"
+
+#endif
+
+#ifdef ENTITY_SMS
+
+#include "m_sms.h"
+
+#endif
+
+#ifdef ENTITY_T30
+
+#include "m_t30.h"
+
+#endif
+
+#if defined (ENTITY_SMI) || defined (ENTITY_MFW) || defined (ENTITY_ACI) || defined (ENTITY_CST)
+
+#include "m_fac.h"
+#include "m_sat.h"
+#include "m_cc.val"
+#include "m_sms.h"
+
+#endif
+
+
+
+#ifdef ENTITY_SIM
+
+#include "m_sat.h"
+
+#endif /* ENTITY_SIM */
+
+
+#ifdef ENTITY_GRR
+
+#include "m_grr.h"
+#include "m_rr.h"
+
+#endif
+
+
+#ifdef ENTITY_GRLC
+
+#include "m_grlc.h"
+#include "m_rr.h"
+
+#endif
+
+#ifdef ENTITY_GMM
+
+#include "m_gmm.h"
+#include "m_tst.h"
+
+#endif
+
+#ifdef ENTITY_SM
+
+#include "m_sm.h"
+
+#endif
+
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/pcm.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,1627 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  GSM-MFW
+|  Modul   :  
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Types definitions for the permanent memory configuration.
++----------------------------------------------------------------------------- 
+*/ 
+/********************************************************************************
+ $History: pcm.h
+
+	Jun 14, 2005 REF: MMI-FIX-30439 x0018858
+   	Description: The homezone/cityzone tags were not being displayed properly.
+   	Solution: Modified to save the tags properly in caches and also made the 
+	appropriate modifications to update the same properly during mobility.
+
+********************************************************************************/
+
+#ifndef PCM_H
+#define PCM_H
+
+/********************************************************************
+ *
+ * Parameters written in flash memory
+ *
+ ********************************************************************/
+
+#define PCM_SERIAL_CONFIG (0)
+
+/********************************************************************
+ *
+ * Access functions to bit fields
+ *
+ ********************************************************************/
+
+#ifndef __BF_FUNCCALL__
+#define FldGet(f,n) ((((ULONG)f)&((ULONG)n##m))>>n##s)
+#define FldSet(f,n,v) ((((ULONG)f)&(~((ULONG)n##m)))|(((ULONG)v)<<n##s))
+#else
+ULONG FldGet (ULONG f, ULONG m, int s)
+{ return ((f&m)>>s); }
+ULONG FldSet (ULONG f, ULONG m, int s, ULONG v)
+{ return ((f&(~m))|((v<<s)&m)); }
+#endif 
+
+/********************************************************************
+ *
+ * Field Identitifer
+ *
+ ********************************************************************/
+
+#define EF_MSCAP_ID     "MSCAP"         /* Mobile Capabilities      */
+#define EF_IMEI_ID      "IMEI"          /* Int. Mobile Equipment Id */
+#define EF_IMSI_ID      "IMSI"          /* Int. Mobile Subscriber Id */
+#define EF_SMS_ID       "SMS"           /* Short Messages           */
+#define EF_CLASS2_ID    "CLASS2"        /* MS Classmark 2           */
+#define EF_CLASS3_ID    "CLASS3"        /* MS Classmark 3 (old def.)*/
+#define EF_RFCAP_ID     "RFCAP"         /* RF Capabilities          */
+#define EF_MSSUP_ID     "MSSUP"         /* Mobile Setup             */
+#define EF_MSSET_ID     "MSSET"         /* Mobile Setting           */
+//	Jun 14, 2005 REF: MMI-FIX-30439 x0018858
+#define EF_HZCACHE_ID   "HZCACHE"     /* Homezone cache             */
+#define EF_LDN_ID       "LDN"           /* Last Dialed Numbers      */
+#define EF_LRN_ID       "LRN"           /* Last Received Numbers    */
+#define EF_LMN_ID       "LMN"           /* Last Missed Numbers      */
+#define EF_UPN_ID       "UPN"           /* User Personal Numbers    */
+#define EF_MBN_ID       "MBN"           /* Mailbox Numbers          */
+#define EF_VMN_ID       "VMN"           /* Voice Mail Number        */
+#define EF_CLNG_ID      "CLNG"          /* Current LAnguage         */
+#define EF_CTIM_ID      "CTIM"          /* Call Timer               */
+#define EF_CCNT_ID      "CCNT"          /* Call Counter             */
+#define EF_ECC_ID       "ECC"           /* Emergency Call Codes     */
+#define EF_ORG_ID       "ORG"           /* Organizer and Alarm      */
+#define EF_CCP_ID       "CCP"           /* Caps and Config Params   */
+#define EF_EXT1_ID      "EXT1"          /* Extension 1              */
+#define EF_SIMLCK_ID    "SIMLCK"        /* SIM Lock                 */
+#define EF_SIMLCKEXT_ID "SIMLCKEXT"     /* SIM Lock Extended        */
+#define EF_MAIN_ID      "MAIN"          /* Maintenance              */
+#define EF_SFK_ID       "SFK"           /* Special Function Key     */
+#define EF_FAULT_ID     "FAULT"         /* Fault Conditions         */
+#define EF_DEBUG_ID     "DEBUG"         /* Debug Information        */
+#define EF_POWER_ID     "POWER"         /* Power Management         */
+#define EF_KEYB_ID      "KEYB"          /* Keyboard Mapping         */
+#define EF_RADIO_ID     "RADIO"         /* Radio Parameter          */
+#define EF_CGMI_ID      "CGMI"          /* Manufacturer             */
+#define EF_INF0_ID      "INF0"          /* Manufacturer 1           */
+#define EF_CGMM_ID      "CGMM"          /* Model                    */
+#define EF_CGMR_ID      "CGMR"          /* Revision                 */
+#define EF_CGSN_ID      "CGSN"          /* Product Serial Number    */
+#define EF_SMSPRFL_ID   "SMSPRFL"       /* SMS Profile              */
+#define EF_PLMN_ID      "PLMN"          /* PLMN Identifier          */
+#define EF_BCCHINFO_ID  "BCCHINF"       /* BCCH Information         */
+#define EF_ALS_ID       "ALS"           /* alternate line service   */
+#define EF_LOCGPRS_ID   "LOCGPRS"       /* Location Inf. (GPRS)     */
+#define EF_KCGPRS_ID    "KCGPRS"        /* Ciphering Key (GPRS)     */
+#define EF_IMSIGPRS_ID  "IMSIGPRS"      /* IMSI check for GPRS      */
+
+/********************************************************************
+ *
+ * Return Values
+ *
+ ********************************************************************/
+
+#define drv_Return_Type      UBYTE
+
+#define PCM_OK               0
+#define PCM_INITIALIZED      1
+#define PCM_INVALID_FILE     2
+#define PCM_INVALID_SIZE     3
+#define PCM_INVALID_CKSM     4
+#define PCM_INVALID_RECORD   5
+#define PCM_NVRAM_ACCS_FAIL  6
+#define PCM_ERASE_ERROR	     7
+#define PCM_WRITE_ERROR	     8
+/*
+ * Field Info Structure
+ */
+typedef struct pcm_FileInfo_Type
+{
+  UBYTE  * FileLocation;
+  USHORT   FileSize;
+  UBYTE    Version;
+} pcm_FileInfo_Type;
+
+
+/********************************************************************
+ *
+ * Field MOBILE CAPABILITIES
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFmscap_Type         /* Mobile Capabilities      */
+{
+  UBYTE chnMode;                        /* channel modes            */
+  UBYTE datCap1;                        /* data capabilities        */
+  UBYTE datCap2;                        /* data capabilities        */
+  UBYTE featLst1;                       /* feature list             */
+  UBYTE featLst2;                       /* feature list             */
+  UBYTE featLst3;                       /* feature list             */
+} EF_MSCAP;
+
+#define SIZE_EF_MSCAP 6
+#define NR_EF_MSCAP   1
+
+/*
+ * chnMode bits
+ *  
+ *  Octet 8     7     6     5     4     3     2     1
+ *       L1    Tm   afs   ahs  spV3  efrV2   hr  spV1
+ */
+#define spchSupV1   0x00000001,0        /* speech support (vers. 1) */
+#define spchSupV1m  0x00000001
+#define spchSupV1s  0
+#define hrSup       0x00000002,1        /* HR support               */
+#define hrSupm      0x00000002
+#define hrSups      1
+#define HR_EFRSup   0x00000006,1        /* HR and EFR support       */
+#define HR_EFRSupm  0x00000006
+#define HR_EFRSups  1
+#define EFRSupV2    0x00000004,2        /* enhanced FR support (v2) */
+#define EFRSupV2m   0x00000004
+#define EFRSupV2s   2
+#define EFRSupV3    0x00000008,3        /* speech support (vers 3)  */
+#define EFRSupV3m   0x00000008
+#define EFRSupV3s   3
+#define VocSup      0x0000000F,0        /* vocoder support          */
+#define VocSupm     0x0000000F
+#define VocSups     0
+#define AHS         0x00000010,4        /* adaptive multirate half rate speech */
+#define AHSm        0x00000010
+#define AHSs        4
+#define AFS         0x00000020,5        /* adaptive multirate full rate speech */
+#define AFSm        0x00000020
+#define AFSs        5
+#define TestMobile  0x00000040,6        /* Test Mobile              */
+#define TestMobilem 0x00000040
+#define TestMobiles 6
+#define L1Ver       0x00000080,7        /* Layer 1 Version          */
+#define L1Verm      0x00000080
+#define L1Vers      7
+ 
+/* 
+ * datCap bits
+ */
+#define datSup      0x00000001,0        /* Data support             */
+#define datSupm     0x00000001
+#define datSups     0
+#define RLPSup      0x00000002,1        /* RLP data (NT Async)      */
+#define RLPSupm     0x00000002
+#define RLPSups     1
+#define AsySup      0x00000004,2        /* T Async data support     */
+#define AsySupm     0x00000004
+#define AsySups     2
+#define NTSynSup    0x00000008,3        /* NT Sync data support     */
+#define NTSynSupm   0x00000008
+#define NTSynSups   3
+#define TSynSup     0x00000010,4        /* NT Sync data support     */
+#define TSynSupm    0x00000010
+#define TSynSups    4
+#define NTFaxSup    0x00000020,5        /* NT Fax support           */
+#define NTFaxSupm   0x00000020
+#define NTFaxSups   5
+#define TFaxSup     0x00000040,6        /* T Fax support            */
+#define TFaxSupm    0x00000040
+#define TFaxSups    6
+#define Dr14_4Sup   0x00000080,7        /* Data rate 14.4 support   */
+#define Dr14_4Supm  0x00000080
+#define Dr14_4Sups  7
+
+/*
+ * datCap2 bits
+ */
+#define NTPackSup   0x00000001,0        /* NT Packet Service        */
+#define NTPackSupm  0x00000001
+#define NTPackSups  0
+#define TPackSup    0x00000002,1        /* T Packet Service         */
+#define TPackSupm   0x00000002
+#define TPackSups   1
+#define NTPadSup    0x00000004,2        /* NT PAD Access Service    */
+#define NTPadSupm   0x00000004
+#define NTPadSups   2
+#define TPadSup     0x00000008,3        /* T PAD Access Service     */
+#define TPadSupm    0x00000008
+#define TPadSups    3
+#define NAltSrvSup  0x00000010,4        /* No Alternate Services    */
+#define NAltSrvSupm 0x00000010
+#define NAltSrvSups 4
+#define DHRSup      0x00000080,7        /* Data Halfrate support    */
+#define DHRSupm     0x00000080
+#define DHRSups     7
+
+/********************************************************************
+ *
+ * Field IMEI
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFimei_Type          /* International ME Id      */
+{
+  UBYTE tac1;
+  UBYTE tac2;
+  UBYTE tac3;
+  UBYTE fac;
+  UBYTE snr1;
+  UBYTE snr2;
+  UBYTE snr3;
+  UBYTE svn;
+} EF_IMEI;
+
+#define SIZE_EF_IMEI 8
+#define NR_EF_IMEI 1
+
+/********************************************************************
+ *
+ * Field IMSI
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFimsi_Type       /* International Subscriber Id */
+{
+  UBYTE len;
+  UBYTE IMSI[8];
+} EF_IMSI;
+
+#define SIZE_EF_IMSI 9
+#define NR_EF_IMSI   1
+
+/********************************************************************
+ *
+ * Field SHORT MESSAGE SERVICES
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFsms_Type           /* Short Messages           */
+{
+  UBYTE stat;
+  UBYTE rmd[175];
+} EF_SMS;  
+
+#define SIZE_EF_SMS 176
+#ifdef _SIMULATION_
+#define NR_EF_SMS     3
+#else
+#define NR_EF_SMS     1
+#endif
+
+/********************************************************************
+ *
+ * Field MOBILE STATION CLASSMARK 2
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFclass2_Type      /* Mobile Station Classmark 2 */
+{
+  UBYTE  byte1;
+  UBYTE  byte2;
+  UBYTE  byte3;
+} EF_CLASS2; 
+
+#define SIZE_EF_CLASS2  3
+#define NR_EF_CLASS2    1
+
+/* 
+ * byte1
+ */
+#define rfPwrCap    0x00000007,0        /* rf power capability          */
+#define rfPwrCapm   0x00000007
+#define rfPwrCaps   0
+#define a51         0x00000008,3        /* rf power capability          */
+#define a51m        0x00000008
+#define a51s        3
+#define esInd       0x00000010,4        /* ES indicator                 */
+#define esIndm      0x00000010
+#define esInds      4
+#define revLev      0x00000060,5        /* revision level               */
+#define revLevm     0x00000060
+#define revLevs     5
+
+/* 
+ * byte2
+ */
+#define freqCap     0x00000001,0        /* frequency capability         */
+#define freqCapm    0x00000001
+#define freqCaps    0
+#define vgcsCap     0x00000002,1        /* VGCS notification reception  */
+#define vgcsCapm    0x00000002
+#define vgcsCaps    1
+#define vbsCap      0x00000004,2        /* VBS  notification reception  */
+#define vbsCapm     0x00000004
+#define vbsCaps     2
+#define smCap       0x00000008,3        /* SM capability                */
+#define smCapm      0x00000008
+#define smCaps      3
+#define ssScrInd    0x00000030,4        /* SS Screen Indicator          */
+#define ssScrIndm   0x00000030
+#define ssScrInds   4
+#define psCap       0x00000040,6        /* PS capability                */
+#define psCapm      0x00000040
+#define psCaps      6
+
+/*
+ * byte3
+ */
+#define a52         0x00000001,0        /* encryption algorithm A5/2    */
+#define a52m        0x00000001
+#define a52s        0
+#define a53         0x00000002,1        /* encryption algorithm A5/3    */
+#define a53m        0x00000002
+#define a53s        1
+#define cmspCap     0x00000004,2        /* CM service prompt            */
+#define cmspCapm    0x00000004
+#define cmspCaps    2
+#define solsaCap    0x00000008,3        /* SoLSA                        */
+#define solsaCapm   0x00000008
+#define solsaCaps   3
+#define ucs2Cap     0x00000010,4        /* UCS2 treatment               */
+#define ucs2Capm    0x00000010
+#define ucs2Caps    4
+#define lcsvaCap    0x00000020,5        /* LCS VA capability            */
+#define lcsvaCapm   0x00000020
+#define lcsvaCaps   5
+#define cm3bit      0x00000080,7        /* Classmark 3 available        */
+#define cm3bitm     0x00000080
+#define cm3bits     7
+
+
+/********************************************************************
+ *
+ * Field MOBILE STATION CLASSMARK 3
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFclass3_Type    /* Mobile Station Classmark 3   */
+{
+    UBYTE byte1;
+    UBYTE byte2;
+    UBYTE byte3;
+}EF_CLASS3;
+
+#define SIZE_EF_CLASS3  3
+#define NR_EF_CLASS3    1
+
+/* 
+ * byte1
+ */
+#define a54         0x00000001,0        /* encryption algorithm A5/4    */
+#define a54m        0x00000001
+#define a54s        0
+#define a55         0x00000002,1        /* encryption algorithm A5/5    */
+#define a55m        0x00000002
+#define a55s        1
+#define a56         0x00000004,2        /* encryption algorithm A5/6    */
+#define a56m        0x00000004
+#define a56s        2
+#define a57         0x00000008,3        /* encryption algorithm A5/7    */
+#define a57m        0x00000008
+#define a57s        3
+#define bnd1        0x00000010,4        /* Band 1                       */
+#define bnd1m       0x00000010
+#define bnd1s       4
+#define bnd2        0x00000020,5        /* Band 2                       */
+#define bnd2m       0x00000020
+#define bnd2s       5
+#define bnd3        0x00000040,6        /* Band 3                       */
+#define bnd3m       0x00000040
+#define bnd3s       6
+
+/* 
+ * byte2 
+ */
+#define rfCap1      0x0000000f,0        /* associated RF capability 1   */
+#define rfCap1m     0x0000000f
+#define rfCap1s     0
+#define rfCap2      0x000000f0,4        /* associated RF capability 2   */
+#define rfCap2m     0x000000f0
+#define rfCap2s     4
+
+/* 
+ * byte2 
+ */
+#define ExtMeas     0x00000010,4        /* associated RF capability 1   */
+#define ExtMeasm    0x00000010
+#define ExtMeass    4
+
+/********************************************************************
+ *
+ * Field RF Capabilities
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFrfcap_Type 
+{
+  UBYTE  setbands;        /* set frequency bands */
+  UBYTE  bands;           /* supported frequency bands */
+  UBYTE  power1;          /* power classes of GSM900 and DCS1800 */
+  UBYTE  power2;          /* power classes of PCS1900 and GSM850 */
+  UBYTE  power3;          /* power classes of GSM400 and EGDE */
+  UBYTE  msGSM;           /* GSM multi slot capability and classes */
+  UBYTE  msEDGE;          /* EDGE multi slot capability and classes */
+  UBYTE  msHSCSD;         /* HSCSD multi slot capability and classes */
+  UBYTE  msGPRS;          /* GPRS multi slot capability and classes */
+  UBYTE  msECSD;          /* ECSD multi slot capability and classes */
+  UBYTE  msEGPRS;         /* EGPRS multi slot capability and classes */
+  UBYTE  capability1;      /* divers capabilities and options */
+  UBYTE  capability2;      /* divers capabilities and options */
+  UBYTE  switchmeasure;   /* switching time */
+  UBYTE  encryption;      /* A5/n encryption algorithm availability */
+  UBYTE  positioning;     /* supported positioning methods */
+} EF_RFCAP;
+
+#define SIZE_EF_RFCAP  16
+#define NR_EF_RFCAP     1
+
+/* 
+ * setbands, bands
+ */
+#define rf_900        0x00000001,0  /* support of GSM 900   */
+#define rf_900m       0x00000001
+#define rf_900s       0
+#define rf_1800       0x00000002,1  /* support of DCS 1800   */
+#define rf_1800m      0x00000002
+#define rf_1800s      1
+#define rf_1900       0x00000004,2  /* support of PCS 1900   */
+#define rf_1900m      0x00000004
+#define rf_1900s      2
+#define rf_EGSM       0x00000008,3  /* support of E-GSM     */
+#define rf_EGSMm      0x00000008
+#define rf_EGSMs      3
+#define rf_850        0x00000010,4  /* support of GSM 850   */
+#define rf_850m       0x00000010
+#define rf_850s       4
+#define rf_450        0x00000020,5  /* support of GSM 450   */
+#define rf_450m       0x00000020
+#define rf_450s       5
+#define rf_480        0x00000040,6  /* support of GSM 480   */
+#define rf_480m       0x00000040
+#define rf_480s       6
+#define rf_RGSM       0x00000080,7  /* support of R-GSM     */
+#define rf_RGSMm      0x00000080
+#define rf_RGSs       7
+
+/* 
+ * power1
+ */
+#define rfCap_1800    0x0000000f,0  /* associated RF capability of DCS 1800  */
+#define rfCap_1800m   0x0000000f
+#define rfCap_1800s   0
+#define rfCap_900     0x000000f0,4  /* associated RF capability of GSM 900   */
+#define rfCap_900m    0x000000f0
+#define rfCap_900s    4
+/* 
+ * power2
+ */
+#define rfCap_850     0x0000000f,0  /* associated RF capability of GSM 850   */
+#define rfCap_850m    0x0000000f
+#define rfCap_850s    0
+#define rfCap_1900    0x000000f0,4  /* associated RF capability of PCS 1900  */
+#define rfCap_1900m   0x000000f0
+#define rfCap_1900s   4
+/* 
+ * power3
+ */
+#define rfCap_EDGE2   0x00000003,0  /* associated RF capability 2 of EDGE    */
+#define rfCap_EDGE2m  0x00000003
+#define rfCap_EDGE2s  0
+#define rfCap_EDGE1   0x0000000c,2  /* associated RF capability 1 of EDGE    */
+#define rfCap_EDGE1m  0x0000000c
+#define rfCap_EDGE1s  2
+#define rfCap_400     0x000000f0,4  /* associated RF capability of GSM 450,480*/
+#define rfCap_400m    0x000000f0
+#define rfCap_400s    4
+/* 
+ * msGSM, msEDGE, msHSCSD, msGPRS, msECSD, msEGPRS
+ */
+#define rfCap_DTMSC     0x00000003,0  /* Multi Slot Sub-Class (only msGPRS+msEGPRS) */
+#define rfCap_DTMSCm    0x00000003
+#define rfCap_DTMSCs    0
+#define rfCap_DTM       0x00000004,2  /* Support of DTM (only msGPRS+msEGPRS) */
+#define rfCap_DTMm      0x00000004
+#define rfCap_DTMs      2
+#define rfCap_MSC       0x000000f8,3  /* Multi Slot Class */
+#define rfCap_MSCm      0x000000f8
+#define rfCap_MSCs      3
+/* 
+ * capability1
+ */
+#define rfCap_mac     0x00000001,0  /* Dynamic and fixed allocation */
+#define rfCap_macm    0x00000001
+#define rfCap_macs    0
+#define rfCap_mod     0x00000002,1  /* EDGE modulation capability */
+#define rfCap_modm    0x00000002
+#define rfCap_mods    1
+#define rfCap_cmsp    0x00000004,2  /* CM service prompt */
+#define rfCap_cmspm   0x00000004
+#define rfCap_cmsps   2
+#define rfCap_solsa   0x00000008,3  /* SoLSA capability */
+#define rfCap_solsam  0x00000008
+#define rfCap_solsas  3
+#define rfCap_lcsva   0x00000010,4  /* LCS value added location request noti. */
+#define rfCap_lcsvam  0x00000010
+#define rfCap_lcsvas  4
+#define rfCap_ppsms   0x00000020,5  /* MT point to point SMS */
+#define rfCap_ppsmsm  0x00000020
+#define rfCap_ppsmss  5
+#define rfCap_ps      0x00000040,6  /* pseudo synchronization capability */
+#define rfCap_psm     0x00000040
+#define rfCap_pss     6
+#define rfCap_esind   0x00000080,7  /* controlled early class sending */
+#define rfCap_esindm  0x00000080
+#define rfCap_esinds  7
+/* 
+ * capability2
+ */
+#define rfCap_ssc     0x00000003,0  /* SS screening indicator */
+#define rfCap_sscm    0x00000003
+#define rfCap_sscs    0
+#define rfCap_usc2    0x00000004,2  /* UCS2 encoded */
+#define rfCap_usc2m   0x00000004
+#define rfCap_usc2s   2
+#define rfCap_vgcs    0x00000008,3  /* VGCS capability */
+#define rfCap_vgcsm   0x00000008
+#define rfCap_vgcss   3
+#define rfCap_vbs     0x00000010,4  /* VBS capability */
+#define rfCap_vbsm    0x00000010
+#define rfCap_vbss    4
+#define rfCap_compact   0x00000020,5  /* COMPACT interference measurement */
+#define rfCap_compactm  0x00000020
+#define rfCap_compacts  5
+#define rfCap_extmeas   0x00000040,6  /* extendend measurement */
+#define rfCap_extmeasm  0x00000040
+#define rfCap_extmeass  6
+#define rfCap_meas    0x00000080,7  /* values about measurement capability */
+#define rfCap_measm   0x00000080
+#define rfCap_meass   7
+/* 
+ * switchmeasure
+ */
+#define rfCap_smt     0x0000000f,0  /* time switch-power measurement */
+#define rfCap_smtm    0x0000000f
+#define rfCap_smts    0
+#define rfCap_smst    0x000000f0,4  /* time switch-power measurement-switch */
+#define rfCap_smstm   0x000000f0
+#define rfCap_smsts   4
+/* 
+ * encryption
+ */
+#define rfCap_A5_7   0x00000002,1  /* encryption algorithm A5/7 */
+#define rfCap_A5_7m  0x00000002
+#define rfCap_A5_7s  1
+#define rfCap_A5_6   0x00000004,2  /* encryption algorithm A5/6 */
+#define rfCap_A5_6m  0x00000004
+#define rfCap_A5_6s  2
+#define rfCap_A5_5   0x00000008,3  /* encryption algorithm A5/5 */
+#define rfCap_A5_5m  0x00000008
+#define rfCap_A5_5s  3
+#define rfCap_A5_4   0x00000010,4  /* encryption algorithm A5/4 */
+#define rfCap_A5_4m  0x00000010
+#define rfCap_A5_4s  4
+#define rfCap_A5_3   0x00000020,5  /* encryption algorithm A5/3 */
+#define rfCap_A5_3m  0x00000020
+#define rfCap_A5_3s  5
+#define rfCap_A5_2   0x00000040,6  /* encryption algorithm A5/2 */
+#define rfCap_A5_2m  0x00000040
+#define rfCap_A5_2s  6
+#define rfCap_A5_1   0x00000080,7  /* encryption algorithm A5/1 */
+#define rfCap_A5_1m  0x00000080
+#define rfCap_A5_1s  7
+/* 
+ * positioning
+ */
+#define rfCap_eeda    0x00000002,1 /* EGPRS Extended Dynamic Allocation Capability */
+#define rfCap_eedam   0x00000002
+#define rfCap_eedas   1
+#define rfCap_geda    0x00000004,2  /* GPRS Extended Dynamic Allocation Capability */
+#define rfCap_gedam   0x00000004
+#define rfCap_gedas   2
+#define rfCap_cgps    0x00000008,3  /* conventional GPS */
+#define rfCap_cgpsm   0x00000008
+#define rfCap_cgpss   3
+#define rfCap_bgps    0x00000010,4  /* based GPS */
+#define rfCap_bgpsm   0x00000010
+#define rfCap_bgpss   4
+#define rfCap_agps    0x00000020,5  /* assisted GPS */
+#define rfCap_agpsm   0x00000020
+#define rfCap_agpss   5
+#define rfCap_beotd   0x00000040,6  /* based E-OTD */
+#define rfCap_beotdm  0x00000040
+#define rfCap_beotds  6
+#define rfCap_aeotd   0x00000080,7  /* assisted E-OTD */
+#define rfCap_aeotdm  0x00000080
+#define rfCap_aeotds  7
+
+
+#ifdef TI_PS_CUSTOM_RFCAP_DEFAULT
+EXTERN U8 custom_rfcap_default[SIZE_EF_RFCAP];
+#endif /*  TI_PS_CUSTOM_RFCAP_DEFAULT */
+
+/********************************************************************
+ *
+ * Field MOBILE SETUP
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFmssup_Type     /* Mobile Setup                 */
+{
+    UBYTE lng1;
+    UBYTE lng2;
+    UBYTE lng3;
+    UBYTE feat1;
+    UBYTE feat2;
+}EF_MSSUP;
+
+#define SIZE_EF_MSSUP 5
+#define NR_EF_MSSUP   1
+
+/* 
+ * lng1
+ */
+#define eng         0x00000001,0        /* English                      */
+#define engm        0x00000001
+#define engs        0
+#define fre         0x00000002,1        /* French                       */
+#define frem        0x00000002
+#define fres        1
+#define ger         0x00000004,2        /* German                       */
+#define germ        0x00000004
+#define gers        2
+#define dut         0x00000008,3        /* Dutch                        */
+#define dutm        0x00000008
+#define duts        3
+#define ita         0x00000010,4        /* Italian                      */
+#define itam        0x00000010
+#define itas        4
+#define spa         0x00000020,5        /* Spanish                      */
+#define spam        0x00000020
+#define spas        5
+#define swe         0x00000040,6        /* Swedish                      */
+#define swem        0x00000040
+#define swes        6
+#define por         0x00000080,7        /* Portuguese                   */
+#define porm        0x00000080
+#define pors        7
+
+/* 
+ * lng2
+ */
+#define fin         0x00000001,0        /* Finnish                      */
+#define finm        0x00000001
+#define fins        0
+#define nor         0x00000002,1        /* Norwegian                    */
+#define norm        0x00000002
+#define nors        1
+#define gre         0x00000004,2        /* Greek                        */
+#define grem        0x00000004
+#define gres        2
+#define tur         0x00000008,3        /* Turkish                      */
+#define turm        0x00000008
+#define turs        3
+#define hun         0x00000010,4        /* Hungarian                    */
+#define hunm        0x00000010
+#define huns        4
+#define slo         0x00000020,5        /* Slovenian                    */
+#define slom        0x00000020
+#define slos        5
+#define pol         0x00000040,6        /* Polish                       */
+#define polm        0x00000040
+#define pols        6
+#define rus         0x00000080,7        /* Russian                      */
+#define rusm        0x00000080
+#define russ        7
+
+/* 
+ * lng3
+ */
+#define ind         0x00000001,0        /* Indonesian                   */
+#define indm        0x00000001
+#define inds        0
+#define cze         0x00000002,1        /* Czech                        */
+#define czem        0x00000002
+#define czes        1
+#define chi         0x00000004,2        /* Chinese                      */
+#define chim        0x00000004
+#define chis        2
+#define can         0x00000008,3        /* Cantonese                    */
+#define canm        0x00000008
+#define cans        3
+#define man         0x00000010,4        /* Mandarin                     */
+#define manm        0x00000010
+#define mans        4
+#define tai         0x00000020,5        /* Taiwanese                    */
+#define taim        0x00000020
+#define tais        5
+#define ara         0x00000040,6        /* Arabic                       */
+#define aram        0x00000040
+#define aras        6
+
+/* 
+ * feat
+ */
+#define AoC         0x00000001,0        /* Advice of Charge             */
+#define AoCm        0x00000001
+#define AoCs        0
+#define DTMF        0x00000002,1        /* DTMF                         */
+#define DTMFm       0x00000002
+#define DTMFs       1
+#define CF          0x00000004,2        /* Call Forwarding              */
+#define CFm         0x00000004
+#define CFs         2
+#define CB          0x00000008,3        /* Call Barring                 */       
+#define CBm         0x00000008
+#define CBs         3
+#define USSD        0x00000010,4        /* USSD                         */
+#define USSDm       0x00000010
+#define USSDs       4
+#define ETC         0x00000020,5        /* ETC                          */
+#define ETCm        0x00000020
+#define ETCs        5
+#define IRDA        0x00000040,6        /* IRDA                         */
+#define IRDAm       0x00000040
+#define IRDAs       6
+
+/********************************************************************
+ *
+ *          Field Current language (CLNG)
+ *
+ ********************************************************************/
+
+#define SIZE_EF_CLNG_DATA 2
+
+typedef struct pcm_EFclng_Type
+{
+  UBYTE data[SIZE_EF_CLNG_DATA]; /* current language in ME */
+} EF_CLNG;
+
+#define SIZE_EF_CLNG SIZE_EF_CLNG_DATA
+#define NR_EF_CLNG   1
+ 
+/********************************************************************
+ *
+ * Field MOBILE STATION SETTTINGS
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFmsset_Type     /* Mobile Setting               */
+{
+    UBYTE buzzer1;
+    UBYTE buzzer2;
+    UBYTE buzzer3;
+    UBYTE audio;
+    UBYTE misc;
+    UBYTE display;
+    UBYTE language;
+    UBYTE recent_ldn_ref;
+    UBYTE recent_lrn_ref;
+    UBYTE recent_upn_ref;
+} EF_MSSET;
+   
+#define SIZE_EF_MSSET 10
+#define NR_EF_MSSET    1
+
+/* 
+ * buzzer 1 
+ */
+#define calltype  0x00000007,0        /* ringer type incoming calls   */
+#define calltypem 0x00000007
+#define calltypes 0
+#define callvol   0x00000038,3        /* ringer volume incoming calls */
+#define callvolm  0x00000038
+#define callvols  3
+#define vib       0x000000c0,6        /* vibrator                     */
+#define vibm      0x000000c0
+#define vibs      6
+
+/*
+ * buzzer 2
+ */
+#define msgtype   0x00000007,0        /* ringer type messages         */
+#define msgtypem  0x00000007
+#define msgtypes  0
+#define msgvol    0x00000038,3        /* ringer volume messages       */
+#define msgvolm   0x00000038
+#define msgvols   3
+
+/*
+ * buzzer 3
+ */
+#define keytone   0x00000003,0        /* key tone mode                */
+#define keytonem  0x00000003
+#define keytones  0
+#define batw      0x00000004,2        /* low battery warning          */
+#define batwm     0x00000004
+#define batws     2
+
+/*
+ * audio
+ */
+#define lnamp     0x00000007,0        /* microphone amplification     */
+#define lnampm    0x00000007
+#define lnamps    0
+#define outvol    0x00000038,3        /* output volume                */
+#define outvolm   0x00000038
+#define outvols   3
+#define ext       0x00000040,6        /* external audio               */
+#define extm      0x00000040
+#define exts      6
+#define voicerec  0x00000080,7        /* voice recording              */
+#define voicerecm 0x00000080
+#define voicerecs 7
+
+/*
+ * miscellenous
+ */
+#define pmod      0x00000001,0        /* PLMN selection mode          */
+#define pmodm     0x00000001
+#define pmods     0
+#define clir      0x00000002,1        /* CLIR                         */
+#define clirm     0x00000002
+#define clirs     1
+#define clip      0x00000004,2        /* CLIP                         */
+#define clipm     0x00000004
+#define clips     2
+#define calinf    0x00000008,3        /* call information display     */
+#define calinfm   0x00000008
+#define calinfs   3
+#define redial    0x00000030,4        /* redial mode                  */
+#define redialm   0x00000030
+#define redials   4
+
+/*
+ * display
+ */
+#define ctrt      0x00000007,0        /* contrast                     */
+#define ctrtm     0x00000007
+#define ctrts     0
+#define brgt      0x00000018,3        /* brightness                   */
+#define brgtm     0x00000018
+#define brgts     3
+#define bckdr     0x000000E0,5        /* duration for back light      */
+#define bckdrm    0x000000E0
+#define bckdrs    5
+
+//	Jun 14, 2005 REF: MMI-FIX-30439 x0018858
+//Begin 30439
+/********************************************************************
+ *
+ * Field Homezone cache
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFhzcache_Type
+{
+    UBYTE 			cid[2];				
+	UBYTE			zone;
+} EF_HZCACHE;
+
+#define SIZE_EF_HZCACHE 3
+#define NR_EF_HZCACHE   5
+
+/********************************************************************
+ *
+ * Field LAST MOC NUMBERS - LDN
+ *
+ ********************************************************************/
+//end 30439
+
+typedef struct pcm_EFldn_Type       /* Last Dialed Numbers          */
+{
+  UBYTE calDrMsb;
+  UBYTE calDrLsb;
+  UBYTE year;
+  UBYTE month;
+  UBYTE day;
+  UBYTE hour;
+  UBYTE minute;
+  UBYTE second;
+  UBYTE len;                        /* length of BCD number         */
+  UBYTE numTp;
+  UBYTE dldNum[10];                 /* dialed number                */
+  UBYTE ccp;                        /* capability/configuration id  */
+  UBYTE ext1;                       /* extension1 record identifier */
+} EF_LDN;
+
+#define SIZE_EF_LDN 22
+#define NR_EF_LDN    1
+
+/*
+ * numTp
+ */
+#define numTp_npi   0x0000000F,0    /* numbering plan identification */
+#define numTp_npim  0x0000000F
+#define numTp_npis  0
+#define numTp_ton   0x00000070,4    /* Type of number                */
+#define numTp_tonm  0x00000070
+#define numTp_tons  4
+
+/********************************************************************
+ *
+ * Field LAST RECEIVED NUMBERS
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFlrn_Type       /* Last Received Numbers        */
+{
+  UBYTE calDrMsb;
+  UBYTE calDrLsb;
+  UBYTE year;
+  UBYTE month;
+  UBYTE day;
+  UBYTE hour;
+  UBYTE minute;
+  UBYTE second;
+  UBYTE id;
+  UBYTE len;                            /* length of BCD number         */
+  UBYTE numTp;
+  UBYTE dldNum[10];                     /* dialed number                */
+  UBYTE ccp;                            /* capability/configuration id  */
+  UBYTE ext1;                           /* extension1 record identifier */
+} EF_LRN;
+
+#define SIZE_EF_LRN 23
+#define NR_EF_LRN    1
+
+/********************************************************************
+ *
+ * Field LAST MISSED NUMBERS
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFlmn_Type         /* Last Missed Numbers        */
+{
+  UBYTE year;
+  UBYTE month;
+  UBYTE day;
+  UBYTE hour;
+  UBYTE minute;
+  UBYTE second;
+  UBYTE id;
+  UBYTE len;                            /* length of BCD number         */
+  UBYTE numTp;
+  UBYTE dldNum[10];                     /* dialed number                */
+  UBYTE ccp;                            /* capability/configuration id  */
+  UBYTE ext1;                           /* extension1 record identifier */
+} EF_LMN;
+
+#define SIZE_EF_LMN 21
+#define NR_EF_LMN    1
+
+/********************************************************************
+ *
+ * Field USER PERSONAL NUMBERS
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFupn_Type       /* User Personal Numbers        */
+{
+  UBYTE alphId[10];
+  UBYTE len;
+  UBYTE numTp;                      /* bitmap same as EF_LDN        */
+  UBYTE usrNum[10];
+  UBYTE ccp;
+  UBYTE ext1;
+} EF_UPN;
+
+#define SIZE_EF_UPN 24
+#define NR_EF_UPN    1
+
+/********************************************************************
+ *
+ * Field MAILBOX NUMBERS
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFmbn_Type           /* Mailbox Numbers        */
+{
+  UBYTE alphId[10];
+  UBYTE len;
+  UBYTE numTp;                          /* bitmap same as EF_LDN        */
+  UBYTE mbNum[10];
+} EF_MBN;
+
+#define SIZE_EF_MBN 22
+#define NR_EF_MBN    4
+
+
+/********************************************************************
+ *
+ * Field Voice Mail Number                                               
+ *
+ ********************************************************************/
+
+/* 
+ * note that with new 04.08 the called party bcd number of the CC
+ * protocol can have up to 43 octets, 3 are used for other things 
+ * than the BCD coded digits
+ */
+#define MAX_CALLED_PARTY_BCD_NO_OCTETS 40
+typedef struct pcm_EFvmn_Type         /* Voice mail Number         */
+{
+  UBYTE vmNum[MAX_CALLED_PARTY_BCD_NO_OCTETS + 1];
+  /* implementation uses delimiter of 0xFF */
+  UBYTE numTp;
+
+} EF_VMN;
+
+#define SIZE_EF_VMN (MAX_CALLED_PARTY_BCD_NO_OCTETS + 1 + 1)
+#define NR_EF_VMN    1
+
+
+/********************************************************************
+ *
+ * Field CALL TIMER
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFctim_Type      /* Call Timer                   */
+{
+  UBYTE moVcDrHm[4];
+  UBYTE mtVcDrHm[4];
+  UBYTE moDtDrHm[4];
+  UBYTE mtDtDrHm[4];
+  UBYTE moFxDrHm[4];
+  UBYTE mtFxDrHm[4];
+  UBYTE moVcDrRm[4];
+  UBYTE mtVcDrRm[4];
+  UBYTE moDtDrRm[4];
+  UBYTE mtDtDrRm[4];
+  UBYTE moFxDrRm[4];
+  UBYTE mtFxDrRm[4];
+} EF_CTIM;
+
+#define SIZE_EF_CTIM 48
+#define NR_EF_CTIM    1
+
+/********************************************************************
+ *
+ * Field CALL COUNTER
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFccnt_Type     /* Call Counter                  */
+{
+  UBYTE total[4];
+  UBYTE moVcDrHm[4];
+  UBYTE mtVcDrHm[4];
+  UBYTE moDtDrHm[4];
+  UBYTE mtDtDrHm[4];
+  UBYTE moFxDrHm[4];
+  UBYTE mtFxDrHm[4];
+  UBYTE moVcDrRm[4];
+  UBYTE mtVcDrRm[4];
+  UBYTE moDtDrRm[4];
+  UBYTE mtDtDrRm[4];
+  UBYTE moFxDrRm[4];
+  UBYTE mtFxDrRm[4];
+} EF_CCNT;
+
+#define SIZE_EF_CCNT 52
+#define NR_EF_CCNT    1
+
+/********************************************************************
+ *
+ * Field EMERGENCY CALL CODES
+ *
+ ********************************************************************/
+
+
+typedef struct pcm_EFecc_Type           /* Emergency Call Codes         */
+{
+  UBYTE ecc1[3];                        /* emergency call code          */
+  UBYTE ecc2[3];
+  UBYTE ecc3[3];
+  UBYTE ecc4[3];
+  UBYTE ecc5[3];
+} EF_ECC;
+
+#define SIZE_EF_ECC 15
+#define NR_EF_ECC    1
+
+/********************************************************************
+ *
+ * Field ORGANIZER AND ALARM
+ *
+ ********************************************************************/
+
+
+typedef struct pcm_EForg_Type           /* Organizer and Alarm          */
+{
+  UBYTE date[6];                        /* bitmap same as EF_LDN        */
+  UBYTE alrm;
+  UBYTE alphMem[16];                    /* alpha memo                   */
+} EF_ORG;
+                  
+#define SIZE_EF_ORG 23
+#define NR_EF_ORG    1
+
+/*
+ *  alrm
+ */
+#define alrm_stat        0x00000001,0
+#define alrm_statm       0x00000001
+#define alrm_stats       0
+#define alrm_type        0x0000000E,1
+#define alrm_typem       0x0000000E
+#define alrm_types       1
+
+/********************************************************************
+ *
+ * Field CAPABILITY AND CONFIGURATION PARAMETERS
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFccp_Type    /* Capability and Configuration Parameters */
+{
+  UBYTE usrRate;                        /* user rate                    */
+  UBYTE bearServ;                       /* bearer service               */
+  UBYTE conElem;                        /* connection element           */
+  UBYTE stopBits;                       /* stop bits                    */
+  UBYTE dataBits;                       /* data bits                    */
+  UBYTE parity;                         /* parity                       */
+  UBYTE flowCntrl;                      /* flow control                 */
+} EF_CCP;
+
+#define SIZE_EF_CCP 7
+#define NR_EF_CCP   1
+
+/********************************************************************
+ *
+ * Field EXTENSION 1
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFext1_Type        /* Extension 1                  */
+{
+  UBYTE recTp;                          /* record type                  */
+  UBYTE extDat[11];                     /* extension data               */
+  UBYTE id;                             /* identifier                   */
+} EF_EXT1;
+
+#define SIZE_EF_EXT1 13
+#define NR_EF_EXT1    1
+
+/********************************************************************
+ *
+ * Field SIM LOCK and Extended SIM LOCK (use alternativly)
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFsimlck_Type       /* SIM Lock                     */
+{
+  UBYTE locks1;                         /* lock status                  */
+  UBYTE locks2;
+  UBYTE cnt;                            /* lock counter                 */
+  UBYTE maxcnt;                         /* lock counter                 */
+  UBYTE PKey[8];                        /* SIM control key              */
+  UBYTE SPKey[8];                       /* SP control key               */
+  UBYTE NSKey[8];                       /* NS control key               */
+  UBYTE CKey[8];                        /* corporate control key        */
+  UBYTE NKey[8];                        /* network control key          */
+  UBYTE len_imsi;                       /* bytes of IMSI               */
+  UBYTE imsi[15];                       /* IMSI                         */
+  UBYTE gidl1;                          /* Group Identifier Level 1     */
+  UBYTE gidl2;                          /* Group Identifier Level 1     */
+} EF_SIMLCK;
+
+#define SIZE_EF_SIMLCK 62
+#define NR_EF_SIMLCK    1
+
+typedef struct pcm_EFsimlckext_Type     /* Extended SIM Lock            */
+{
+  UBYTE locks1;                         /* lock status                  */
+  UBYTE locks2;
+  UBYTE cnt;                            /* lock counter                 */
+  UBYTE maxcnt;                         /* lock counter                 */
+  UBYTE PKey[8];                        /* SIM control key              */
+  UBYTE SPKey[8];                       /* SP control key               */
+  UBYTE NSKey[8];                       /* NS control key               */
+  UBYTE CKey[8];                        /* corporate control key        */
+  UBYTE NKey[8];                        /* network control key          */
+  UBYTE len_p_imsi;                     /* bytes of IMSI P-Lock         */
+  UBYTE p_imsi[15];                     /* IMSI P-Lock                  */
+  UBYTE len_sp_imsi;                    /* bytes of IMSI SP-Lock        */
+  UBYTE sp_imsi[15];                    /* IMSI SP-Lock                 */
+  UBYTE len_ns_imsi;                    /* bytes of IMSI NS-Lock        */
+  UBYTE ns_imsi[15];                    /* IMSI NS-Lock                 */
+  UBYTE len_c_imsi;                     /* bytes of IMSI C-Lock         */
+  UBYTE c_imsi[15];                     /* IMSI C-Lock                  */
+  UBYTE len_n_imsi;                     /* bytes of IMSI N-Lock         */
+  UBYTE n_imsi[15];                     /* IMSI N-Lock                  */
+  UBYTE len_u_imsi;                     /* bytes of IMSI U-Lock         */
+  UBYTE u_imsi[15];                     /* IMSI U-Lock                  */
+  UBYTE gidl1;                          /* Group Identifier Level 1     */
+  UBYTE gidl2;                          /* Group Identifier Level 1     */
+} EF_SIMLCKEXT;
+
+#define SIZE_EF_SIMLCKEXT 142
+#define NR_EF_SIMLCKEXT     1
+
+/*
+ *  locks1
+ */
+#define plock            0x00000003,0
+#define plockm           0x00000003
+#define plocks           0
+#define nlock            0x0000000C,2
+#define nlockm           0x0000000C
+#define nlocks           2
+#define nslock           0x00000030,4
+#define nslockm          0x00000030
+#define nslocks          4
+#define spslock          0x000000C0,6
+#define splockm          0x000000C0
+#define splocks          6
+
+/*
+ *  locks2
+ */
+#define clock            0x00000003,0
+#define clockm           0x00000003
+#define clocks           0
+#define flock            0x0000000C,2
+#define flockm           0x0000000C
+#define flocks           2
+/*
+#define reserved1        0x00000030,4
+#define reserved1m       0x00000030
+#define reserved1s       4
+#define reserved2        0x000000C0,6
+#define reserved2m       0x000000C0
+#define reserved2s       6
+*/
+
+/********************************************************************
+ *
+ * Field MAINTENANCE INFORMATION
+ *
+ ********************************************************************/
+
+/*
+ *  T.B.D.
+ */
+#define SIZE_EF_MAIN  8
+#define NR_EF_MAIN    1
+
+/********************************************************************
+ *
+ * Field SPECIAL FUNCTION KEY
+ *
+ ********************************************************************/
+
+/*
+ *  T.B.D.
+ */
+#define SIZE_EF_SFK   8
+#define NR_EF_SFK     1
+
+/********************************************************************
+ *
+ * Field FAULT CONDITIONS
+ *
+ ********************************************************************/
+
+/*
+ *  T.B.D.
+ */
+#define SIZE_EF_FAULT 8
+#define NR_EF_FAULT   1
+
+/********************************************************************
+ *
+ * Field DEBUG INFORMATION
+ *
+ ********************************************************************/
+
+/*
+ *  T.B.D.
+ */
+#define SIZE_EF_DEBUG 8
+#define NR_EF_DEBUG   1
+
+/********************************************************************
+ *
+ * Field POWER MANAGEMENT
+ *
+ ********************************************************************/
+
+/*
+ *  T.B.D.
+ */
+#define SIZE_EF_POWER 8
+#define NR_EF_POWER   1
+
+ /********************************************************************
+ *
+ * Field KEYBOARD MAPPING
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFkbd_Type       /* Keyboard Mapping             */
+{
+  UBYTE logical_key [32];           /* logical key                  */
+  UBYTE raw_key [32];               /* raw key                      */
+} EF_KBD;
+
+#define SIZE_EF_KEYB 64
+#define NR_EF_KEYB    1
+
+/********************************************************************
+ *
+ * Field RADIO PARAMETERS
+ *
+ ********************************************************************/
+
+/*
+ *  T.B.D.
+ */
+#define SIZE_EF_RADIO 8
+#define NR_EF_RADIO   1
+
+/********************************************************************
+ *
+ * Manufacturer
+ *
+ ********************************************************************/
+
+#define SIZE_EF_CGMI_DATA 20
+
+typedef struct pcm_EFcgmi_Type   /* Manufacturer                 */
+{
+  UBYTE data[SIZE_EF_CGMI_DATA]; /* Name of Manufacturer         */
+} EF_CGMI;
+
+#define SIZE_EF_CGMI SIZE_EF_CGMI_DATA
+#define NR_EF_CGMI   1
+
+/********************************************************************
+ *
+ *  Identification Information 
+ *
+ ********************************************************************/
+
+#define SIZE_EF_INF0_DATA 20
+
+typedef struct pcm_EFinf0_Type
+{
+  UBYTE data[SIZE_EF_INF0_DATA]; /*Identification Information*/
+} EF_INF0;
+
+#define SIZE_EF_INF0 SIZE_EF_INF0_DATA
+#define NR_EF_INF0   2
+
+/********************************************************************
+ *
+ * Model
+ *
+ ********************************************************************/
+
+#define SIZE_EF_CGMM_DATA 20
+
+typedef struct pcm_EFcgmm_Type   /* Model                        */
+{
+  UBYTE data[SIZE_EF_CGMM_DATA]; /* Name of Product              */
+} EF_CGMM;
+
+#define SIZE_EF_CGMM SIZE_EF_CGMM_DATA
+#define NR_EF_CGMM   1
+
+/********************************************************************
+ *
+ * Revision
+ *
+ ********************************************************************/
+
+#define SIZE_EF_CGMR_DATA 20
+
+typedef struct pcm_EFcgmr_Type   /* Revision                     */
+{
+  UBYTE data[SIZE_EF_CGMR_DATA]; /* Version of Product           */
+} EF_CGMR;
+
+#define SIZE_EF_CGMR SIZE_EF_CGMR_DATA
+#define NR_EF_CGMR   1
+
+/********************************************************************
+ *
+ * Product Serial Number
+ *
+ ********************************************************************/
+
+#define SIZE_EF_CGSN_DATA 20
+
+typedef struct pcm_EFcgsn_Type   /* Product Serial Number        */
+{
+  UBYTE data[SIZE_EF_CGSN_DATA]; /* Serial Number of Product     */
+} EF_CGSN;
+
+#define SIZE_EF_CGSN SIZE_EF_CGSN_DATA
+#define NR_EF_CGSN   1
+
+/********************************************************************
+ *
+ * SMS Profile
+ *
+ ********************************************************************/
+
+#define SIZE_EF_SMSPRFL_SCA   20
+#define SIZE_EF_SMSPRFL_MIDS  40
+#define SIZE_EF_SMSPRFL_DCSS  20
+#define SIZE_EF_SMSPRFL_VPABS 14
+
+#define EF_SMSPRFL_VLD        0x00
+#define EF_SMSPRFL_INVLD      0xFF
+
+typedef struct pcm_EFsmsprfl_Type         /* SMS Profile                      */
+{
+  UBYTE vldFlag;                          /* Valid Flag                       */
+  UBYTE CSCAsca[SIZE_EF_SMSPRFL_SCA];     /* Service Center Address           */  
+  UBYTE CSCAlenSca;                       /* Length of Service Center Address */
+  UBYTE CSCAton;                          /* Type of Number                   */
+  UBYTE CSCAnpi;                          /* Numbering Plan Identification    */
+  UBYTE CSCBmode;                         /* Mode                             */
+  UBYTE CSCBmids[SIZE_EF_SMSPRFL_MIDS];   /* Message Identifier               */
+  UBYTE CSCBdcss[SIZE_EF_SMSPRFL_DCSS];   /* Data Coding Schemes              */
+  UBYTE CSMPfo;                           /* First Octet                      */
+  UBYTE CSMPvprel;                        /* Validity Period Relative         */
+  UBYTE CSMPvpabs[SIZE_EF_SMSPRFL_VPABS]; /* Validity Period Absolute         */
+  UBYTE CSMPpid;                          /* Protocol Identifier              */
+  UBYTE CSMPdcs;                          /* Data Coding Scheme               */
+} EF_SMSPRFL;
+
+#define SIZE_EF_SMSPRFL ( SIZE_EF_SMSPRFL_SCA   +   \
+                          SIZE_EF_SMSPRFL_MIDS  +   \
+                          SIZE_EF_SMSPRFL_DCSS  +   \
+                          SIZE_EF_SMSPRFL_VPABS + 9   )
+#define NR_EF_SMSPRFL   2
+
+/********************************************************************
+ *
+ * PLMN Identifier
+ *
+ ********************************************************************/
+
+#define SIZE_EF_PLMN_LONG 20
+#define SIZE_EF_PLMN_SHRT 10
+#define SIZE_EF_PLMN_MCC   2
+#define SIZE_EF_PLMN_MNC   2
+
+typedef struct pcm_EFplmn_Type      /* PLMN Identifier              */
+{
+  UBYTE mcc[SIZE_EF_PLMN_MCC];      /* Mobile country code          */
+  UBYTE mnc[SIZE_EF_PLMN_MNC];      /* Mobile network code          */
+  UBYTE lngNam[SIZE_EF_PLMN_LONG];  /* Long operator name           */
+  UBYTE shrtNam[SIZE_EF_PLMN_SHRT]; /* Short operator name          */
+} EF_PLMN;
+
+#define SIZE_EF_PLMN ( SIZE_EF_PLMN_MCC  + SIZE_EF_PLMN_MCC +   \
+                       SIZE_EF_PLMN_LONG + SIZE_EF_PLMN_SHRT )
+#define NR_EF_PLMN   2
+
+/********************************************************************
+ *
+ * Field BCCH Information
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFbcchinfo_Type  /* BCCH information             */
+{
+  UBYTE bcch_info[54];              /* content                      */
+} EF_BCCHINFO;
+
+#define SIZE_EF_BCCHINFO 54
+#define NR_EF_BCCHINFO    1
+
+/********************************************************************
+ *
+ * Field alternate line service
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFals_Type  /* alternate line service            */
+{
+  UBYTE selLine;
+  UBYTE statLine;
+} EF_ALS;
+
+#define SIZE_EF_ALS 2
+#define NR_EF_ALS   1
+
+/********************************************************************
+ *
+ * Field Location Information (GPRS)
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFlocgprs_Type   /* GPRS Location information    */
+{
+  UBYTE ptmsi[4];
+  UBYTE ptmsi_signature[3];
+  UBYTE rai[6];
+  UBYTE ra_status;
+} EF_LOCGPRS;
+
+#define SIZE_EF_LOCGPRS sizeof (EF_LOCGPRS)
+#define NR_EF_LOCGPRS   1
+
+/********************************************************************
+ *
+ * Field Ciphering Key (GPRS)
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFkcgprs_Type         /* GPRS Ciphering key      */
+{
+  UBYTE kc[8];
+  UBYTE cksn;
+} EF_KCGPRS;
+
+#define SIZE_EF_KCGPRS sizeof (EF_KCGPRS)
+#define NR_EF_KCGPRS   1
+
+/********************************************************************
+ *
+ * Field IMSI (GPRS, only for validation of GPRS related fields)
+ *
+ ********************************************************************/
+
+typedef struct pcm_EFimsigprs_Type    /* International Subscriber Id */
+{
+  UBYTE len;
+  UBYTE IMSI[8];
+} EF_IMSIGPRS;
+
+#define SIZE_EF_IMSIGPRS sizeof (EF_IMSIGPRS)
+#define NR_EF_IMSIGPRS   1
+
+/********************************************************************
+ *
+ * Prototypes
+ *
+ ********************************************************************/
+
+#if defined (NEW_FRAME)
+/*
+ * to achieve backward compatibility with older definitions
+ */
+#define drv_SignalCB_Type           T_DRV_CB_FUNC
+#define drv_SignalID_Type           T_DRV_SIGNAL
+#define T_VSI_THANDLE               USHORT
+#endif
+
+EXTERN drv_Return_Type pcm_Init         (void);
+EXTERN void pcm_Exit                    (void);
+EXTERN drv_Return_Type pcm_ReadFile     (UBYTE  * in_FileName,
+                                         USHORT   in_BufferSize,
+                                         UBYTE  * out_BufferPtr,
+                                         UBYTE  * out_VersionPtr);
+EXTERN drv_Return_Type pcm_GetFileInfo  (UBYTE  * in_FileName,
+                                         pcm_FileInfo_Type * out_FileInfoPtr);
+EXTERN drv_Return_Type pcm_ReadRecord   (UBYTE  * in_FileName,
+                                         USHORT   in_Record,
+                                         USHORT   in_BufferSize,
+                                         UBYTE  * out_BufferPtr,
+                                         UBYTE  * out_VersionPtr,
+                                         USHORT * out_MaxRecordsPtr);
+EXTERN drv_Return_Type pcm_WriteFile    (UBYTE  * in_FileName,
+                                         USHORT   in_BufferSize,
+                                         UBYTE  * in_BufferPtr);
+EXTERN drv_Return_Type pcm_WriteRecord  (UBYTE  * in_FileName,
+                                         USHORT   in_Record,
+                                         USHORT   in_BufferSize,
+                                         UBYTE  * in_BufferPtr);
+EXTERN drv_Return_Type pcm_Flush        (void);
+
+
+#endif
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/prim.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,1773 @@
+/*
++-----------------------------------------------------------------------------
+|  Project :  GSM-PS (6147)
+|  Modul   :  PRIM
++-----------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas
+|                 Instruments Berlin, AG
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++-----------------------------------------------------------------------------
+|  Purpose :  Primitive Definitions, depending on entity
++-----------------------------------------------------------------------------
+*/
+
+#ifndef PRIM_H
+#define PRIM_H
+
+/*
+ *  Definitions for Primitive Opcodes
+ */
+
+#ifndef PCONST_CDG
+#include "pconst.cdg"
+#endif /* PCONST_CDG */
+
+/*
+ *  Define the service access points depending on the entity
+ */
+
+#ifdef ENTITY_PL
+
+#define SAP_PH
+#define SAP_DL
+#define SAP_MPH
+#ifdef ALR
+  #define SAP_MPHC
+#elif defined(FF_GTI)
+  /* GTI */
+  /* do nothing */
+#else
+  #define SAP_MPH5
+#endif  /* ALR, FF_GTI */
+#if defined(GPRS) && defined(ALR)
+  #define SAP_TB
+#endif  /* GPRS */
+#define SAP_MMI
+#define SAP_MON
+#ifdef FF_EM_MODE
+#define SAP_EM
+#endif  /* FF_EM_MODE */
+
+
+/* added by ppuel on 06/10 */
+#define SAP_CST
+
+#endif  /* ENTITY_PL */
+
+#ifdef ENTITY_L1
+#ifdef ALR
+  #define SAP_MPHC
+#elif defined(FF_GTI)
+  /* GTI */
+  /* do nothing */
+#else
+  #define SAP_MPH5
+#endif  /* ALR, FF_GTI */
+#endif  /* ENTITY_L1 */
+
+#ifdef ENTITY_DL
+
+#define SAP_MPHC	/* for PH_DATA_IND */
+#define SAP_PH
+#define SAP_DL
+#define SAP_MDL
+
+#ifdef FF_EM_MODE
+#define SAP_EM
+#endif  /* FF_EM_MODE */
+
+#endif  /*  ENTITY_DL*/
+
+#ifdef ENTITY_RR
+
+#ifdef GPRS
+#define SAP_INCLUDES /*Needed for CL*/
+#endif
+
+#define SAP_DL
+#define SAP_RR
+#define SAP_MPH
+#define SAP_MON
+#define SAP_RRRRLP
+#define SAP_RRLC
+#ifdef GPRS
+#define SAP_CL_INLINE
+#ifdef _SIMULATION_
+#define SAP_CL
+#endif /* _SIMULATION_ */
+#endif
+
+#ifdef GPRS
+  #define SAP_RRGRR
+#endif  /* GPRS */
+
+#ifdef FF_EM_MODE
+#define SAP_EM
+#endif  /* FF_EM_MODE */
+
+#endif  /* ENTITIY_RR  */
+
+#ifdef ENTITY_LC
+
+#define SAP_RRLC
+#define SAP_RRLP
+#define SAP_CSRLC
+#define SAP_MNLC
+
+#endif /* ENTITY_LC */
+
+#ifdef ENTITY_RRLP
+
+#define SAP_RRRRLP
+#define SAP_RRLP
+
+#endif /* ENTITY_RRLP */
+
+#ifdef ENTITY_CSR
+
+#define SAP_CSRLC
+
+#endif /* ENTITY_CSR */
+
+#ifdef ENTITY_MM
+
+#ifdef  GPRS
+#define SAP_MMGMM
+#else
+#define SAP_MMREG
+#endif /* GPRS */
+#define SAP_MMCM
+#define SAP_MMSS
+#define SAP_MMSMS
+#define SAP_MDL
+#define SAP_RR
+#define SAP_SIM
+
+#ifdef FF_EM_MODE
+#define SAP_EM
+#endif /* FF_EM_MODE */
+
+#endif /* ENTITY_MM */
+
+#ifdef ENTITY_CC
+
+#define SAP_MMCM
+#define SAP_MNCC
+
+#ifdef FF_EM_MODE
+#define SAP_EM
+#endif  /* FF_EM_MODE */
+
+#endif  /*  ENTITY_CC*/
+
+#ifdef ENTITY_ESIM
+#define SAP_AAA
+#define SAP_MMI
+#endif /* ENTITY_ESIM */
+
+#ifdef ENTITY_SS
+
+#define SAP_MMSS
+#define SAP_MNSS
+
+#ifdef FF_EM_MODE
+#define SAP_EM
+#endif  /* FF_EM_MODE */
+
+#endif   /* ENTITY_SS  */
+
+#ifdef ENTITY_SMS
+
+#define SAP_MMSMS
+#define SAP_MNSMS
+#define SAP_SIM
+
+#ifdef GPRS
+  #define SAP_LL
+  #define SAP_GMMSMS
+#endif  /* GPRS */
+
+#ifdef FF_EM_MODE
+#define SAP_EM
+#endif  /* FF_EM_MODE */
+
+#endif /* ENTITY_SMS */
+
+
+#ifdef ENTITY_CST
+
+/* added by ppuel on 06/10 */
+#define SAP_CST
+#ifdef ALR
+  #define SAP_MPHC
+#elif defined(FF_GTI)
+  /* GTI */
+  /* do nothing */
+#else
+  #define SAP_MPH5
+#endif  /* ALR, FF_GTI */
+#define SAP_MNSMS
+#define SAP_MMREG
+#ifdef GPRS
+ #define SAP_GMMREG
+#endif /*GPRS*/
+#endif   /* ENTITY_CST  */
+
+#ifdef ENTITY_MMI
+
+#define SAP_MNSS
+#define SAP_MNSMS
+#define SAP_MNCC
+#define SAP_MMREG
+#define SAP_MMI
+#define SAP_SIM
+#ifdef FF_ESIM
+#define SAP_AAA /* needed for esim */
+#endif
+#ifdef FF_WAP
+#define SAP_WAP
+#endif /* FF_WAP */
+
+#endif /* ENTITY_MMI */
+
+#ifdef ENTITY_SMI
+
+#define SAP_ACI
+#define SAP_MNSS
+#define SAP_MNSMS
+#define SAP_MNCC
+#define SAP_MMI
+#define SAP_SIM
+#define SAP_CST
+
+#ifdef UART
+#define SAP_DTI2
+#define SAP_UART
+#endif /* UART */
+
+#ifdef FF_PSI
+#define SAP_PSI
+#endif /* FF_PSI */
+
+#ifdef FF_BAT
+#define SAP_APP
+#endif /* FF_BAT */
+
+#if defined FF_EOTD
+#define SAP_MNLC
+#endif  /* FF_EOTD */
+
+#ifdef BT_ADAPTER
+#define SAP_BTP
+#endif /* BT_ADAPTER */
+
+#ifdef FAX_AND_DATA
+#define SAP_L2R
+#define SAP_TRA
+#define SAP_RA
+
+#ifdef FF_FAX
+#define SAP_T30
+#endif
+
+#endif  /* FAX_AND_DATA */
+
+#ifdef GPRS
+  #define SAP_INCLUDES /*For new include SAPs from TI DK*/
+  #define SAP_GMMREG
+  #define SAP_SN
+  #define SAP_SMREG
+  #define SAP_PPP
+  #define SAP_DTI
+  #define SAP_UART
+  #define SAP_PKT
+  #define SAP_UPM
+
+#endif /* GPRS */
+
+#ifdef FF_EM_MODE
+#define SAP_EM
+#endif  /* FF_EM_MODE */
+
+#define SAP_MMREG
+
+#if defined (FF_WAP) || defined (FF_SAT_E)
+#define SAP_PPP
+#endif
+
+#ifdef CO_UDP_IP
+#define SAP_IPA
+#define SAP_UDPA
+#endif /* CO_UDP_IP */
+
+#ifdef FF_WAP 
+#define SAP_WAP
+#endif  /* FF_WAP */
+
+#ifdef FF_TCP_IP
+#define SAP_PPP
+#define SAP_AAA
+#endif  /* FF_TCP_IP */
+
+#ifdef FF_GPF_TCPIP
+#define SAP_TCPIP
+#define SAP_DCM
+#endif
+
+#ifdef FF_WAP
+#define SAP_WAP
+#endif
+
+#endif /* ENTITY_SMI */
+
+#ifdef ENTITY_MFW
+
+#define SAP_ACI
+#define SAP_MNSS
+#define SAP_MNSMS
+#define SAP_MNCC
+#define SAP_MMI
+#define SAP_SIM
+#define SAP_CST
+
+#ifdef UART
+#define SAP_DTI2
+#define SAP_UART
+#endif /* UART */
+
+#ifdef FF_PSI
+#define SAP_PSI
+#endif  /* FF_PSI */
+
+#ifdef FF_BAT
+#define SAP_APP
+#endif /* FF_BAT */
+
+#ifdef FAX_AND_DATA
+#define SAP_L2R
+
+#ifdef FF_FAX
+#define SAP_T30
+#endif
+
+#define SAP_RA
+#define SAP_TRA
+#endif  /* FAX_AND_DATA */
+
+#ifdef GPRS
+  #define SAP_INCLUDES /*For new include SAPs from TI DK*/
+  #define SAP_GMMREG
+  #define SAP_SN
+  #define SAP_SMREG
+  #define SAP_PPP
+  #define SAP_DTI
+  #define SAP_UART
+  #define SAP_PKT
+  #define SAP_UPM
+#endif /* GPRS */
+
+#define SAP_MMREG
+
+#if defined (FF_WAP) || defined (FF_SAT_E)
+#define SAP_PPP
+#endif
+
+#ifdef CO_UDP_IP
+#define SAP_IPA
+#define SAP_UDPA
+#endif /* CO_UDP_IP */
+
+#ifdef FF_WAP 
+#define SAP_WAP
+#endif /* FF_WAP */
+
+#ifdef FF_EM_MODE
+#define SAP_EM
+#endif  /* FF_EM_MODE */
+
+#ifdef FF_TCP_IP
+#define SAP_PPP
+#define SAP_AAA
+#endif  /* FF_TCP_IP */
+
+#ifdef FF_GPF_TCPIP
+#define SAP_TCPIP
+#define SAP_DCM
+#endif
+
+#ifdef FF_WAP
+#define SAP_WAP
+#endif
+
+#if defined FF_EOTD
+#define SAP_MNLC
+#endif  /* FF_EOTD */
+
+#ifdef BT_ADAPTER
+#define SAP_BTP
+#endif /* BT_ADAPTER */
+
+#endif /* ENTITY_MFW */
+
+
+#ifdef ENTITY_SIM
+
+#define SAP_SIM
+#ifdef CO_UDP_IP 
+#define SAP_UDP
+#endif  /* FF_WAP || FF_SAT_E */
+
+#ifdef UART
+#define SAP_DTI2
+#endif  /*  UART*/
+#ifdef FF_EM_MODE
+#define SAP_EM
+#endif  /* FF_EM_MODE */
+
+#endif   /* ENTITY_SIM  */
+
+#ifdef ENTITY_ACI
+
+#define SAP_ACI
+#define SAP_MNSS
+#define SAP_MNSMS
+#define SAP_SIM
+#define SAP_MNCC
+#define SAP_MMI
+#define SAP_CST
+#ifdef FF_ESIM
+#define SAP_AAA /* needed for esim */
+#endif
+#ifdef UART
+#define SAP_DTI2
+#define SAP_UART
+#endif /* UART */
+
+#ifdef FF_PSI
+#define SAP_PSI
+#endif  /* FF_PSI */
+
+#ifdef FF_BAT
+#define SAP_APP
+#endif /* FF_BAT */
+
+#ifdef FF_EOTD
+#define SAP_MNLC
+#endif  /*  FF_EOTD*/
+
+#ifdef FAX_AND_DATA
+#define SAP_L2R
+#define SAP_RA
+
+#ifdef FF_FAX
+#define SAP_T30
+#endif
+
+#define SAP_TRA
+#endif  /* FAX_AND_DATA */
+
+#ifdef GPRS
+  #define SAP_INCLUDES /*For new include SAPs from TI DK*/
+  #define SAP_GMMREG
+  #define SAP_SN
+  #define SAP_SMREG
+  #define SAP_PPP
+  #define SAP_DTI
+  #define SAP_UART
+  #define SAP_PKT
+  #define SAP_UPM
+#endif  /* GPRS */
+
+#define SAP_MMREG
+
+#if defined (FF_WAP) || defined (FF_SAT_E)
+#define SAP_PPP
+#endif
+
+#ifdef CO_UDP_IP
+#define SAP_IPA
+#define SAP_UDPA
+#endif  /* CO_UDP_IP */
+
+#ifdef FF_EM_MODE
+#define SAP_EM
+#endif  /* FF_EM_MODE */
+
+#ifdef FF_TCP_IP
+#define SAP_PPP
+#define SAP_AAA
+#endif  /* FF_TCP_IP */
+
+#ifdef FF_GPF_TCPIP
+#define SAP_TCPIP
+#define SAP_DCM
+#endif
+
+#ifdef FF_WAP
+#define SAP_WAP
+#endif
+
+#endif  /* ENTITY_ACI */
+
+#ifdef ENTITY_L2R
+
+#define SAP_L2R
+#define SAP_RLP
+#define SAP_DTI2
+#define SAP_TRA
+#define SAP_RA
+
+#endif   /* ENTITY_L2R  */
+
+#ifdef ENTITY_RLP
+
+#define SAP_RLP
+#define SAP_RA
+
+#endif   /* ENTITY_RLP  */
+
+#ifdef ENTITY_T30
+
+#define SAP_T30
+#define SAP_DTI2
+#define SAP_FAD
+
+#endif  /* ENTITY_T30  */
+
+#ifdef ENTITY_FAD
+
+#define SAP_FAD
+#define SAP_RA
+
+#endif  /* ENTITY_FAD  */
+
+#ifdef ENTITY_RA
+
+#define SAP_RA
+
+#endif  /* ENTITY_RA  */
+
+#ifdef ENTITY_WAP
+
+#define SAP_WAP
+
+#ifdef FF_GPF_TCPIP
+#define SAP_TCPIP
+#define SAP_DCM
+#endif
+
+#ifdef CO_UDP_IP 
+#define SAP_UDP
+#define SAP_UDPA
+#endif  /* CO_UDP_IP */
+
+#define SAP_DTI2
+
+#endif  /* ENTITY_WAP  */
+
+#ifdef ENTITY_UDP
+
+#define SAP_UDP
+#define SAP_UDPA
+#define SAP_IP
+#define SAP_DTI2
+
+#endif  /* ENTITY_UDP  */
+
+#ifdef ENTITY_IP
+
+#define SAP_IP
+#define SAP_IPA
+#define SAP_DTI2
+
+#endif  /* ENTITY_IP  */
+
+#ifdef ENTITY_BTI
+
+/* removed check if compiling for dialup as it is part of the minimum choice
+ * kk 010525
+ */
+#define SAP_ACI
+#define SAP_BTP
+#define SAP_DTI2
+
+#endif /* ENTITY_BTI */
+
+
+#ifdef ENTITY_GRR
+#define SAP_INCLUDES /*Needed for CL*/
+#define SAP_GMMRR
+#define SAP_RRGRR
+#define SAP_MPHP
+#define SAP_TB
+#define SAP_CGRLC
+#define SAP_CL_INLINE
+
+#ifdef _SIMULATION_
+#define SAP_CL
+#endif /* _SIMULATION_ */
+
+
+#ifdef FF_EM_MODE
+#define SAP_EM
+#endif  /* FF_EM_MODE */
+
+/*
+ * The following SAP are not used in GRR,
+ * but some of the structures defined
+ * in theses interfaces are used.
+ */
+#define SAP_MPH
+
+#endif  /* ENTITY_GRR  */
+
+
+#ifdef ENTITY_GRLC
+
+#define SAP_CGRLC
+#define SAP_GRLC
+#define SAP_MAC
+#define SAP_L1TEST
+
+#ifdef FF_EM_MODE
+ #define SAP_EM
+#endif  /* FF_EM_MODE */
+
+#endif  /* ENTITY_GRLC */
+
+#ifdef ENTITY_LLC
+
+#define SAP_LLGMM
+#define SAP_LL
+#define SAP_CCI
+#define SAP_GRLC
+#define SAP_DTI2
+#endif  /* ENTITY_LLC  */
+
+#ifdef ENTITY_SM
+
+#define SAP_INCLUDES /*For new include SAPs from TI DK*/
+#define SAP_SMREG
+/* #define SAP_SNSM
+   #define SAP_GMMSM
+   #define SAP_GMMAA
+   #define SAP_LL   */
+#define SAP_SM
+#define SAP_MMPM
+
+#define SAP_CL_INLINE
+
+#ifdef _SIMULATION_
+#define SAP_CL
+#endif /* _SIMULATION_ */
+
+#endif  /* ENTITY_SM  */
+
+/*Newly added entity from TI DK*/
+#ifdef ENTITY_UPM
+
+#define SAP_INCLUDES /*For new include SAPs from TI DK*/
+#define SAP_SM
+#define SAP_SN
+#define SAP_MMPM /*For MMPM_SEQUENCE_IND/RES*/
+#define SAP_UPM
+
+#define SAP_CL_INLINE
+
+#ifdef _SIMULATION_
+#define SAP_CL
+#endif /* _SIMULATION_ */
+
+#endif /* ENTITY_UPM */
+
+
+#ifdef ENTITY_SNDCP
+
+#define SAP_INCLUDES /*For new include SAPs from TI DK*/
+#define SAP_SN /*SNDCP<->UPM and SNDCP<->ACI*/
+#define SAP_LL
+#define SAP_CCI
+#define SAP_DTI2
+
+#endif  /* ENTITY_SNDCP  */
+
+#ifdef ENTITY_GMM
+
+#define SAP_INCLUDES /*For new include SAPs from TI DK*/
+#define SAP_GMMAA
+#define SAP_GMMREG
+#define SAP_GMMRR
+#define SAP_MMPM /*Replaced GMMSM with MMPM */
+#define SAP_GMMSMS
+#define SAP_SIM
+#define SAP_LL
+#define SAP_LLGMM
+#define SAP_MMGMM
+#define SAP_CGRLC
+
+#define SAP_CL_INLINE
+
+#ifdef _SIMULATION_
+#define SAP_CL
+#endif /* _SIMULATION_ */
+
+#ifdef FF_EM_MODE
+#define SAP_EM
+#endif  /* FF_EM_MODE */
+
+#endif  /* ENTITY_GMM  */
+
+#ifdef ENTITY_PPP
+
+#define SAP_PPP
+#define SAP_DTI
+#ifdef GPRS
+#define SAP_UART
+#endif
+#endif /* ENTITY_PPP */
+
+#ifdef ENTITY_UART
+
+#define SAP_UART
+#define SAP_DTI2
+
+#endif /* ENTITY_UART */
+
+#ifdef ENTITY_PKTIO
+
+#define SAP_PKT
+#define SAP_DTI2
+
+#endif /* ENTITY_PKTIO */
+
+#ifdef ENTITY_PSI
+
+#define SAP_PSI
+#define SAP_DTI2
+#define SAP_DIO
+
+#endif /* ENTITY_PSI */
+
+#ifdef ENTITY_AAA
+
+#define SAP_AAA
+
+#endif /* ENTITY_AAA */
+
+
+#ifdef ENTITY_TCPIP
+
+#define SAP_TCPIP
+#define SAP_DTI2
+
+#endif /* ENTITY_TCPIP */
+
+
+#ifdef ENTITY_APP
+
+#ifdef FF_BAT
+#define SAP_APP
+#endif /* FF_BAT */
+
+#ifdef FF_GPF_TCPIP
+#define SAP_TCPIP
+#define SAP_DCM
+#endif
+
+#endif /* ENTITY_APP */
+
+#ifdef _SIMULATION_
+
+#ifdef ENTITY_CLT
+
+#define SAP_INCLUDES /*For new include SAPs from TI DK*/
+#define SAP_CL
+#define SAP_CL_INLINE
+
+#endif /* ENTITY_CLT */
+
+#endif /* _SIMULATION_ */
+
+
+/*The following is needed for target build*/
+#ifdef ENTITY_CLT
+#define SAP_INCLUDES
+#endif /* ENTITY_CLT */
+
+/*
+ *  Define constants and primitive definitions depending on the
+ *  service access points
+ */
+#ifdef SAP_INCLUDES
+
+#include "p_8010_137_nas_include.h"
+#include "p_8010_153_cause_include.h"
+#include "p_8010_152_ps_include.h"
+
+#endif /* SAP_INCLUDES */
+
+
+#ifdef SAP_PH
+
+/*
+ * Mask for PH Opcodes
+ */
+
+#define PH_DL  0x4100
+#define PH_UL  0x0100
+
+#include "p_ph.h"
+
+#endif  /* SAP_PH */
+
+#ifdef SAP_MPH
+
+/*
+ * Mask for MPH Opcodes
+ * old values:
+#define MPH_DL  0x4200
+#define MPH_UL  0x0200
+ * changed to avoid double opcodes in TAP
+ */
+#define MPH_DL  0x5700
+#define MPH_UL  0x1700
+
+#include "p_mph.h"
+
+#endif  /* SAP_MPH */
+
+#ifdef SAP_MPH5
+
+#include "p_mph5.h"
+
+#endif  /* SAP_MPH5 */
+
+#ifdef SAP_MPHC
+
+/*
+ * Mask for DL Opcodes
+ */
+
+#define MPHC_DL  0x0000 /* same as MPHC_UL */
+#define MPHC_UL  0x0000 /* same as MPHC_DL */
+
+#include "p_mphc.h"
+
+#endif  /* SAP_MPHC */
+
+#ifdef SAP_DL
+
+/*
+ * Mask for DL Opcodes
+ */
+
+#define DL_DL  0x80004003
+#define DL_UL  0x80000003
+
+#include "p_dl.h"
+
+#endif  /* SAP_DL */
+
+#ifdef SAP_MDL
+
+/*
+ * Mask for MDL Opcodes
+ */
+
+#define MDL_DL  0x80004004
+#define MDL_UL  0x80000004
+
+#include "p_mdl.h"
+
+#endif  /* SAP_MDL */
+
+#ifdef SAP_SIM
+
+/*
+ * Mask for SIM Opcodes
+ */
+
+#define SIM_DL  0x80004005
+#define SIM_UL  0x80000005
+
+#include "p_sim.h"
+
+#ifdef TI_PS_UICC_CHIPSET_15
+#include "p_8010_136_simdrv_sap.h"
+#endif
+
+#endif  /* SAP_SIM */
+
+#ifdef SAP_RR
+
+/*
+ * Mask for RR Opcodes
+ */
+
+#define RR_DL  0x80004006
+#define RR_UL  0x80000006
+
+#include "p_rr.h"
+
+#endif  /* SAP_RR */
+
+#ifdef SAP_MMCM
+
+/*
+ * Mask for MMCM Opcodes
+ */
+
+#define MMCM_DL  0x80004007
+#define MMCM_UL  0x80000007
+
+#include "p_mmcm.h"
+
+#endif  /* SAP_MMCM */
+
+#ifdef SAP_MMSS
+
+/*
+ * Mask for MMSS Opcodes
+ */
+
+#define MMSS_DL  0x80004008
+#define MMSS_UL  0x80000008
+
+#include "p_mmss.h"
+
+#endif  /* SAP_MMSS */
+
+#ifdef SAP_MMSMS
+
+/*
+ * Mask for MMSMS Opcodes
+ */
+
+#define MMSMS_DL  0x80004009
+#define MMSMS_UL  0x80000009
+
+#include "p_mmsms.h"
+
+#endif  /* SAP_MMSMS */
+
+#ifdef SAP_MMREG
+
+/*
+ * Mask for MMREG Opcodes
+ */
+
+#define MMREG_DL  0x8000400A
+#define MMREG_UL  0x8000000A
+
+#include "p_mmreg.h"
+
+#endif  /* SAP_MMREG */
+
+#ifdef SAP_MNCC
+
+/*
+ * Mask for MNCC Opcodes
+ */
+
+#define MNCC_DL  0x8000400B
+#define MNCC_UL  0x8000000B
+
+#include "p_mncc.h"
+
+#endif  /* SAP_MNCC */
+
+#ifdef SAP_MNSS
+
+/*
+ * Mask for MNSS Opcodes
+ */
+
+#define MNSS_DL  0x8000400C
+#define MNSS_UL  0x8000000C
+
+#include "p_mnss.h"
+
+#endif  /* SAP_MNSS */
+
+#ifdef SAP_MNSMS
+
+/*
+ * Mask for MNSMS Opcodes
+ */
+
+#define MNSMS_DL  0x8000400D
+#define MNSMS_UL  0x8000000D
+
+#include "p_mnsms.h"
+
+#endif  /* SAP_MNSMS */
+
+#ifdef SAP_MMI
+
+/*
+ * Mask for MMI Opcodes
+ */
+
+#define MMI_DL  0x4E00
+#define MMI_UL  0x0E00
+
+#include "p_mmi.h"
+
+#endif  /* SAP_MMI */
+
+#ifdef SAP_MON
+
+#include "p_mon.h"
+
+#endif  /* SAP_MON */
+
+#ifdef SAP_ACI
+
+/*
+ * Mask for ACI Opcodes
+ */
+
+#define ACI_DL  0x5500
+#define ACI_UL  0x1500
+
+#include "p_aci.h"
+
+#endif  /* SAP_ACI */
+
+#ifdef SAP_L2R
+
+/*
+ * Mask for L2R Opcodes
+ */
+
+#define L2R_DL  0x80004012
+#define L2R_UL  0x80000012
+
+#include "p_l2r.h"
+
+#endif  /* SAP_L2R */
+
+
+#ifdef SAP_TRA
+
+/*
+ * Mask for TRA Opcodes
+ */
+
+#define TRA_DL  0x80004019
+#define TRA_UL  0x80000019
+
+#include "p_tra.h"
+
+#endif  /* SAP_TRA */
+
+
+#ifdef SAP_RLP
+
+/*
+ * Mask for RLP Opcodes
+ */
+
+#define RLP_DL  0x80004011
+#define RLP_UL  0x80000011
+
+#include "p_rlp.h"
+
+#endif  /* SAP_RLP */
+
+#ifdef SAP_T30
+
+/*
+ * Mask for T30 Opcodes
+ */
+
+#define T30_DL  0x80004014
+#define T30_UL  0x80000014
+
+#ifdef FF_FAX
+#include "p_t30.h"
+#endif
+
+#endif  /* SAP_T30 */
+
+#ifdef SAP_FAD
+
+/*
+ * Mask for FAD Opcodes
+ */
+
+#define FAD_DL  0x80004013
+#define FAD_UL  0x80000013
+
+#ifdef FF_FAX
+#include "p_fad.h"
+#endif
+
+#endif  /* SAP_FAD */
+
+#ifdef SAP_RA
+
+/*
+ * Mask for RA Opcodes
+ */
+
+#define RA_DL  0x80004010
+#define RA_UL  0x80000010
+
+#include "p_ra.h"
+
+#endif  /* SAP_RA */
+
+
+
+#ifdef SAP_DTI
+
+/*
+ * Mask for DTI Opcodes
+ */
+
+#define DTI_DL  0x7700
+#define DTI_UL  0x3700
+
+#include "p_dti.h"
+
+#endif  /* SAP_DTI */
+
+
+#ifdef SAP_WAP
+
+/*
+ * Mask for WAPcodes
+ */
+
+#define WAP_DL  0x7D00
+#define WAP_UL  0x3D00
+
+#include "p_wap.h"
+
+#endif  /* SAP_WAP */
+
+
+
+#ifdef SAP_UDP
+
+/*
+ * Mask for UDP Opcodes
+ */
+
+#define UDP_DL  0x80004046
+#define UDP_UL  0x80000046
+
+#include "p_udp.h"
+
+#endif  /* SAP_UDP */
+
+
+
+#ifdef SAP_TCPIP
+
+/*
+ * Mask for TCPIP Opcodes
+ */
+
+#define TCPIP_DL  0x80004048
+#define TCPIP_UL  0x80000048
+
+#include "p_tcpip.h"
+
+#endif
+
+
+
+#ifdef SAP_UDPA
+
+/*
+ * Mask for UDPA Opcodes
+ */
+
+#define UDPA_DL  0x8000403B
+#define UDPA_UL  0x8000003B
+
+#include "p_udpa.h"
+
+#endif  /* SAP_UDPA */
+
+
+
+#ifdef SAP_IP
+
+/*
+ * Mask for IP Opcodes
+ */
+
+#define IP_DL  0x7900
+#define IP_UL  0x3900
+
+#include "p_ip.h"
+
+#endif  /* SAP_IP */
+
+
+
+#ifdef SAP_IPA
+
+/*
+ * Mask for IPA Opcodes
+ */
+#define IPA_DL  0x8000403C
+#define IPA_UL  0x8000003C
+
+#include "p_ipa.h"
+
+#endif  /* SAP_IPA */
+
+
+
+#ifdef SAP_PPP
+
+/*
+ * Mask for PPP Opcodes
+ */
+
+#define PPP_DL  0x7500
+#define PPP_UL  0x3500
+
+#include "p_ppp.h"
+
+#endif  /* SAP_PPP */
+
+
+
+#ifdef SAP_CST
+
+/*
+ * Mask for CST Opcodes
+ */
+#define CST_DL  0x5600
+#define CST_UL  0x1600
+
+#include "p_cst.h"
+
+#endif  /* SAP_CST */
+
+#ifdef SAP_TB
+
+/*
+ * Mask for TB Opcodes
+ */
+
+#define TB_DL  0x5800
+#define TB_UL  0x1800
+
+#include "p_tb.h"
+
+#endif  /* SAP_TB */
+
+#ifdef SAP_MPHP
+
+/*
+ * Mask for MPHP Opcodes
+ */
+
+#define MPHP_DL 0x0200
+#define MPHP_UL 0x0200
+
+#include "p_mphp.h"
+
+#endif  /* SAP_MPHP */
+
+#ifdef SAP_CGRLC
+
+/*
+ * Mask for CGRLC Opcodes
+ */
+
+#define CGRLC_DL 0x80014098
+#define CGRLC_UL 0x80000098
+
+#include "p_cgrlc.h"
+
+#endif  /* SAP_CGRLC */
+
+#ifdef SAP_CL_INLINE
+#include "p_cl.val"
+#include "cl_inline.h"
+
+#endif /* SAP_CL_INLINE */
+
+
+#ifdef SAP_MAC
+
+/*
+ * Mask for MAC Opcodes
+ */
+
+#define MAC_DL 0x7200
+#define MAC_UL 0x3200
+
+#include "p_mac.h"
+
+#endif  /* SAP_MAC */
+
+#ifdef SAP_L1TEST
+
+/*
+ * Mask for L1TEST Opcodes
+ */
+
+#define L1TEST_DL 0x8000409B
+#define L1TEST_UL 0x8000009B
+
+#include "p_l1test.h"
+
+#endif  /* SAP_L1TEST */
+
+#ifdef SAP_RRGRR
+
+/*
+ * Mask for RRGRR Opcodes
+ */
+
+#define RRGRR_DL 0x6d00
+#define RRGRR_UL 0x2d00
+
+#include "p_rrgrr.h"
+
+#endif  /* SAP_RRGRR */
+
+#ifdef SAP_LLGMM
+
+/*
+ * Mask for LLGMM Opcodes
+ */
+
+#define LLGMM_DL 0x6100
+#define LLGMM_UL 0x2100
+
+#include "p_llgmm.h"
+
+#endif  /* SAP_LLGMM */
+
+#ifdef SAP_LL
+
+/*
+ * Mask for LL Opcodes
+ */
+
+#define LL_DL    0x6200
+#define LL_UL    0x2200
+
+#include "p_ll.h"
+
+#endif  /* SAP_LL */
+
+
+#ifdef SAP_SNSM
+/*
+ * Mask for SNSM Opcodes
+ */
+#define SNSM_DL  0x6700
+#define SNSM_UL  0x2700
+#include "p_snsm.h"
+
+#endif  /* SAP_SNSM */
+
+#ifdef SAP_SN
+/*
+ * Mask for SN Opcodes
+ */
+#define SN_DL  0x8000409E
+#define SN_UL  0x8000009E
+
+#include "p_8010_135_sn_sap.h"
+#endif /*#ifdef SAP_SN*/
+
+
+#ifdef SAP_SMREG
+
+/*
+ * Mask for SMREG Opcodes
+ */
+
+#define SMREG_DL  0x6600
+#define SMREG_UL  0x2600
+
+#include "p_8010_142_smreg_sap.h"
+
+#endif  /* SAP_SMREG */
+
+#ifdef SAP_SM
+/*
+ * Mask for SM Opcodes
+ */
+#define SM_DL  0x80004090
+#define SM_UL  0x80000090
+
+#include "p_8010_128_sm_sap.h"
+
+#endif /*#ifdef SAP_SN*/
+
+
+#ifdef SAP_UPM
+/*
+ * Mask for UPM Opcodes
+ */
+#define UPM_DL 0x8000409D
+#define UPM_UL 0x8000009D
+
+#include "p_8010_157_upm_sap.h"
+
+#endif /*#ifdef SAP_UPM*/
+
+
+
+#ifdef SAP_GRLC
+
+/*
+ * Mask for GRLC Opcodes
+ */
+
+#define GRLC_DL   0x80004097
+#define GRLC_UL   0x80000097
+
+#include "p_grlc.h"
+
+#endif  /* SAP_GRLC */
+
+#ifdef SAP_GMMAA
+
+/*
+ * Mask for GMMAA Opcodes
+ */
+
+#define GMMAA_DL   0x6500
+#define GMMAA_UL   0x2500
+
+#include "p_gmmaa.h"
+
+#endif  /* SAP_GMMAA */
+
+#ifdef SAP_GMMREG
+
+/*
+ * Mask for GMMREG Opcodes
+ */
+
+#define GMMREG_DL   0x7300
+#define GMMREG_UL   0x3300
+
+#include "p_gmmreg.h"
+
+#endif  /* SAP_GMMREG */
+
+#ifdef SAP_GMMRR
+
+/*
+ * Mask for GMMRR Opcodes
+ */
+
+#define GMMRR_DL   0x5f00
+#define GMMRR_UL   0x1f00
+
+#include "p_gmmrr.h"
+
+#endif  /* SAP_GMMRR */
+
+#ifdef SAP_GMMSM
+
+/*
+ * Mask for GMMSM Opcodes
+ */
+
+#define GMMSM_DL   0x6400
+#define GMMSM_UL   0x2400
+
+#include "p_gmmsm.h"
+
+#endif  /* SAP_GMMSM */
+
+#ifdef SAP_MMPM
+/*
+ * Mask for MMPM Opcodes
+ * GMMRABM, GMMSM, GMMSMS, PMMSMS SAPs replaced by MMPM SAP
+ */
+#define MMPM_DL  0x80004096
+#define MMPM_UL  0x80000096
+
+#include "p_8010_134_mmpm_sap.h"
+
+#endif /*#ifdef SAP_MMPM*/
+
+#ifdef SAP_GMMSMS
+
+/*
+ * Mask for GMMSMS Opcodes
+ */
+
+#define GMMSMS_DL   0x6300
+#define GMMSMS_UL   0x2300
+
+#include "p_gmmsms.h"
+
+#endif  /* SAP_GMMSMS */
+
+
+#ifdef SAP_GSIM
+
+/*
+ * Mask for GMMSIM Opcodes
+ */
+
+#define GSIM_DL   0x6900
+#define GSIM_UL   0x2900
+
+#include "p_gsim.h"
+
+#endif  /* SAP_GSIM */
+
+#ifdef SAP_MMGMM
+
+/*
+ * Mask for MMGMM Opcodes
+ */
+
+#define MMGMM_DL   0x6e00
+#define MMGMM_UL   0x2e00
+
+#include "p_mmgmm.h"
+
+#endif  /* SAP_MMGMM */
+
+#ifdef SAP_BTP
+
+/*
+ * Mask for BTP Opcodes
+ */
+
+#define BTP_G   0x7a00
+#define BTP_B   0x3a00
+
+#include "p_btp.h"
+
+#endif  /* SAP_BTP */
+
+#ifdef SAP_PPP
+
+/*
+ * Mask for PPP Opcodes
+ */
+
+#define PPP_DL   0x7500
+#define PPP_UL   0x3500
+
+#include "p_ppp.h"
+
+#endif /* SAP_PPP */
+
+#ifdef SAP_UART
+
+/*
+ * Mask for UART Opcodes
+ */
+
+#define UART_DL   0x7400
+#define UART_UL   0x3400
+
+#include "p_uart.h"
+
+#endif /* SAP_UART */
+
+#ifdef SAP_CCI
+
+/*
+ * Mask for CCI Opcodes
+ */
+
+#define CCI_DL    0x7600
+#define CCI_UL    0x3600
+
+#include "p_cci.h"
+
+#endif /* SAP_CCI */
+
+#ifdef SAP_DTI2
+
+/*
+ * Mask for DTI Opcodes
+ */
+
+#define DTI2_DL   0x7700
+#define DTI2_UL   0x3700
+
+#include "p_dti2.h"
+
+#endif /* SAP_DTI2 */
+
+#ifdef SAP_PKT
+
+/*
+ * Mask for PKT opcodes
+ */
+
+#define PKT_DL 0x80004045
+#define PKT_UL 0x80000045
+
+#include "p_pkt.h"
+
+#endif /* SAP_PKT */
+#ifdef SAP_EM
+
+/*
+ * Mask for EM Opcodes
+ */
+
+#define EM_Dl  0x7E00
+#define EM_Ul  0x3E00
+
+#include "p_em.h"
+
+#endif  /* SAP_EM */
+
+
+
+#ifdef SAP_RRLC
+
+/*
+ * Mask for RREOTD Opcodes
+ */
+
+#define RRLC_DL  0x80004040
+#define RRLC_UL  0x80000040
+
+#include "p_rrlc.h"
+
+#endif /* SAP_RRLC */
+
+#ifdef SAP_RRRRLP
+
+/*
+ * Mask for RRRRLP Opcodes
+ */
+
+#define RRRRLP_DL  0x80004041
+#define RRRRLP_UL  0x80000041
+
+#include "p_rrrrlp.h"
+
+#endif /* SAP_RRRRLP */
+
+#ifdef SAP_RRLP
+
+/*
+ * Mask for RRLP Opcodes
+ */
+
+#define RRLP_DL  0x80004042
+#define RRLP_UL  0x80000042
+
+#include "p_rrlp.h"
+
+#endif /* SAP_RRLP */
+
+#ifdef SAP_CSRLC
+
+/*
+ * Mask for CSRLC Opcodes
+ */
+
+#define CSRLC_DL  0x80004043
+#define CSRLC_UL  0x80000043
+
+//#include "p_csrlc.h"
+
+#endif /* SAP_CSRLC */
+
+#ifdef SAP_MNLC
+
+/*
+ * Mask for MNLC Opcodes
+ */
+
+#define MNLC_DL  0x80004044
+#define MNLC_UL  0x80000044
+
+#include "p_mnlc.h"
+
+#endif /* SAP_MNLC */
+
+
+#ifdef SAP_AAA
+
+/*
+ * Mask for AAA Opcodes
+ */
+#define AAA_DL  0x80004047
+#define AAA_UL  0x80000047
+
+#include "p_aaa.h"
+
+#endif /* SAP_AAA */
+
+/*
+* Mask for DCM Opcodes
+*/
+#ifdef SAP_DCM
+
+#define DCM_DL 0x8000401C
+#define DCM_UL 0x8000001C
+
+#include "p_dcm.h"
+
+#endif /* SAP_DCM */
+#ifdef SAP_PSI
+
+/*
+ * Mask for PSI Opcodes
+ */
+#define PSI_DL  0x8000401D
+#define PSI_UL  0x8000001D
+
+#include "p_psi.h"
+#include "DIO_inline.h"
+#endif /* SAP_PSI */
+
+#ifdef _SIMULATION_
+
+#ifdef SAP_CL
+
+/*
+ * Mask for CL Opcodes
+ */
+
+#define CL_DL   0x8000409C
+#define CL_UL   0x8000009C
+
+#include "p_cl.h"
+
+#endif /* SAP_CL */
+
+#endif /* _SIMULATION_ */
+
+#ifdef SAP_APP
+
+/*
+ * Mask for APP Opcodes
+ */
+#define APP_DL  0x8000401E
+#define APP_UL  0x8000001E
+
+#include "p_app.h"
+#endif /* SAP_APP */
+
+#ifdef FF_BAT
+#include "p_bat.h"
+#endif /* FF_BAT */
+
+#endif  /* PRIM_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/pwr.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,80 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  GSM (6301)
+|  Modul   :  
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Types definitions for the power driver
+|             .
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef PWR_H
+#define PWR_H
+
+
+/*
+ * Power signals
+ */
+#define PWR_SIGTYPE_EXTPOWER 1
+#define PWR_SIGTYPE_CHARGER  2
+#define PWR_SIGTYPE_BATLEVEL 3
+
+/*
+ * Power Status
+ */
+#define PWR_EXTPOWER_ON      1
+#define PWR_CHARGER_ON       2
+
+/*
+ * Status Type
+ */
+typedef struct pwr_Status_Type
+{
+  UBYTE Status;
+  UBYTE BatteryLevel;
+  UBYTE ChargeLevel;
+} pwr_Status_Type;
+
+/*
+ * Driver Control Block
+ */
+typedef struct pwr_DCB_Type
+{
+  UBYTE    RangeMin;
+  UBYTE    RangeMax;
+  UBYTE    Steps;
+} pwr_DCB_Type;
+
+#if defined (NEW_FRAME)
+/*
+ * to achieve backward compatibility with older definitions
+ */
+#define drv_SignalCB_Type           T_DRV_CB_FUNC
+#define drv_SignalID_Type           T_DRV_SIGNAL
+#define T_VSI_THANDLE               USHORT
+#endif
+/*
+ * Prototypes
+ */
+EXTERN UBYTE pwr_Init        (drv_SignalCB_Type   in_SignalCBPtr);
+EXTERN void  pwr_Exit        (void);
+EXTERN UBYTE pwr_SetSignal   (drv_SignalID_Type * in_SignalIDPtr);
+EXTERN UBYTE pwr_ResetSignal (drv_SignalID_Type * in_SignalIDPtr);
+EXTERN UBYTE pwr_SetConfig   (pwr_DCB_Type      * in_DCBPtr);
+EXTERN UBYTE pwr_GetConfig   (pwr_DCB_Type      * out_DCBPtr);
+EXTERN UBYTE pwr_GetStatus   (pwr_Status_Type   * out_StatusPtr);
+
+EXTERN UBYTE pwr_PowerOffMobile   (void);
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/ra_l1int.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,67 @@
+/*
++-----------------------------------------------------------------------------
+|  Project :  GSM-F&D (8411)
+|  Modul   :  RA_L1INT
++-----------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG
+|                 All rights reserved.
+|
+|                 This file is confidential and a trade secret of Texas
+|                 Instruments Berlin, AG
+|                 The receipt of or possession of this file does not convey
+|                 any rights to reproduce or disclose its contents or to
+|                 manufacture, use, or sell anything it may describe, in
+|                 whole, or in part, without the specific written consent of
+|                 Texas Instruments Berlin, AG.
++-----------------------------------------------------------------------------
+|  Purpose : This Modul defines the Layer 1 Functional Interface (L1INT) of the RA
++-----------------------------------------------------------------------------
+*/
+
+#ifndef RA_L1INT_H
+#define RA_L1INT_H
+
+#include "cl_ribu.h"
+
+EXTERN void l1i_ra_activate_req
+            (
+              T_RA_ACTIVATE_REQ *ra_activate_req
+            );
+
+EXTERN void l1i_ra_datatrans_req
+            (
+              T_RA_DATATRANS_REQ *ra_datatrans_req
+            );
+
+EXTERN void l1i_ra_deactivate_req
+            (
+              T_RA_DEACTIVATE_REQ *ra_deactivate_req
+            );
+
+EXTERN void l1i_ra_data_req
+            (
+              T_RA_DATA_REQ *ra_data_req,
+              T_FRAME_DESC  *frame_desc
+            );
+
+EXTERN void l1i_ra_data_req_new
+            (
+              T_FD *pFD
+            );
+
+EXTERN void l1i_ra_break_req
+            (
+              T_RA_BREAK_REQ *ra_break_req
+            );
+
+EXTERN void l1i_ra_detect_req
+            (
+              T_RA_DETECT_REQ *ra_detect_req
+            );
+
+EXTERN void l1i_ra_modify_req
+            (
+              T_RA_MODIFY_REQ *ra_modify_req
+            );
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/rtc.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,81 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  GSM (6301)
+|  Modul   :  
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Type definitions and function prototypes for the real time clock driver
+|             SPR 1725, re-wrote file for new RTC driver implementation.
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef DEF_RTC__H
+#define DEF_RTC__H
+/*==== INCLUDES ===================================================*/
+#include <string.h>
+#include "typedefs.h"
+#include "gdi.h"
+#include "kbd.h"
+/*==== EXPORT =====================================================*/
+/*
+ * type definitions
+ */
+
+
+ typedef enum 
+{
+	RTC_TIME_FORMAT_12HOUR,
+	RTC_TIME_FORMAT_24HOUR
+} T_RTC_TIME_FORMAT;
+
+typedef struct {
+	UBYTE	day;
+	UBYTE	month;
+	USHORT	year;
+} 	T_RTC_DATE;
+
+
+typedef struct
+{	UBYTE	minute;
+	UBYTE	hour;
+	UBYTE   second;
+	T_RTC_TIME_FORMAT	format;
+	BOOL	PM_flag;
+} T_RTC_TIME;
+
+typedef void (*RtcCallback) (void*);  /* RTC event handler        */
+
+/*
+ * Prototypes
+ */
+
+
+BOOL rtc_clock_cleared();// wrapper for RTC_RtcReset();
+
+UBYTE rtc_set_time_date(T_RTC_DATE* date, T_RTC_TIME* time); // wrapper for  RTC_setTimeDate();
+
+UBYTE rtc_get_time_date(T_RTC_DATE* date, T_RTC_TIME* time); // wrapper for RTC_getTimeDate();
+
+UBYTE rtc_set_alarm(T_RTC_DATE* date , T_RTC_TIME* time, RtcCallback callback_func );//wrapper for RTC_setAlarm();
+
+UBYTE rtc_get_alarm(T_RTC_DATE* date, T_RTC_TIME* time);//wrapper for RTC_getAlarm();
+
+UBYTE rtc_unset_alarm();//wrapper for RTC_UnsetAlarm();
+
+UBYTE rtc_set_time_format(T_RTC_TIME_FORMAT format);//wrapper for RTC_Set12HourMode();
+
+
+
+
+
+#endif /* #ifndef DEF_RTC_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/rtcdrv.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,43 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  GSM (6301)
+|  Modul   :  
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Types definitions for the real time clock driver
+|             .
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef DEF_RTC_H
+#define DEF_RTC_H
+
+/*
+ * type definitions
+ */
+typedef struct rtc_time_type
+{
+  UBYTE   year;
+  UBYTE   month;
+  UBYTE   day;
+  UBYTE   hour;
+  UBYTE   minute;
+  UBYTE   second;
+} rtc_time_type;
+
+/*
+ * Prototypes
+ */
+EXTERN UBYTE rtc_read_time ( rtc_time_type *rtc_time );
+
+#endif /* #ifndef DEF_RTC_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/rx.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,85 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  GSM (6301)
+|  Modul   :  
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Types definitions for the fieldstrength driver
+|             .
++----------------------------------------------------------------------------- 
+
+ $Hist       
+
+    Oct 05, 2006    ER: OMAPS00094496 x0061088(Prachi)
+    Description:Enhance RSSI to 3 parameters: Strength, quality, min-access-level
+    Solution:In order to provide a more accurate antenna icon on screen, in addition to "signal strength" the parameters
+    "signal quality" and "Min-aces-level" are required. 
+
+*/ 
+
+#ifndef RX_H
+#define RX_H
+
+/*
+ * Signal Values
+ */
+#define RX_QUAL_UNAVAILABLE   0xFF /* should be kept identically   */ 
+                                   /* with the value defined in RR */
+#ifdef FF_PS_RSSI
+#define RX_ACCE_UNAVAILABLE   0xFF
+#endif
+
+/*
+ * Signal Types
+ */
+#define RX_SIGTYPE_RXLEVEL    0
+
+/*
+ * Status Type
+ */
+typedef struct rx_Status_Type
+{
+  UBYTE actLevel;
+  UBYTE gsmLevel;
+  UBYTE rxQuality;
+#ifdef FF_PS_RSSI
+  UBYTE min_access_level;
+#endif
+} rx_Status_Type;
+
+/*
+ * Driver Control Block
+ */
+typedef struct rx_DCB_Type
+{
+  UBYTE    Steps;
+} rx_DCB_Type;
+
+#if defined (NEW_FRAME)
+/*
+ * to achieve backward compatibility with older definitions
+ */
+#define drv_SignalCB_Type           T_DRV_CB_FUNC
+#define drv_SignalID_Type           T_DRV_SIGNAL
+#define T_VSI_THANDLE               USHORT
+#endif
+/*
+ * Prototypes
+ */
+EXTERN UBYTE rx_Init        (drv_SignalCB_Type   in_SignalCBPtr);
+EXTERN void  rx_Exit        (void);
+EXTERN UBYTE rx_SetConfig   (rx_DCB_Type       * in_DCBPtr);
+EXTERN UBYTE rx_GetConfig   (rx_DCB_Type       * out_DCBPtr);
+EXTERN UBYTE rx_GetStatus   (rx_Status_Type    * out_StatusPtr);
+EXTERN void  rx_timeout     (T_VSI_THANDLE       rx_handle);
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/socket_api.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,854 @@
+/* 
++------------------------------------------------------------------------------
+|  File:       socket.h
++------------------------------------------------------------------------------
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  This file implements the socket specific definitions to be used by applications in order to
+|             set up a connection(GPRS or CSD) or create sockets for data receiption.
+|             For a description of the socket API read g23m\condat\doc\8462_601.doc
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef __SOCKET_H__
+#define __SOCKET_H__
+
+#include "typedefs.h"
+#include "vsi.h"
+#include "gsm.h"
+#include "prim.h" // to get the DCM defines
+
+
+/***************** Defines added for TCPIP testing with the application. ***********/
+
+/*
+ * Value constants for VAL_bearer_select
+ */
+#define DCM_SOCK_BEARER_ANY            (0x1)      /* DCM will decide which connection type to be used */
+#define DCM_SOCK_BEARER_GPRS           (0x2)      /* Use a GPRS context as bearer, DCM will decide which GPRS settings to be used */
+#define DCM_SOCK_BEARER_GSM            (0x3)      /* Use GSM data connection as bearer DCM will decide which GSM settings to be used */
+#define DCM_SOCK_BEARER_USE_PROFILE    (0x4)      /* Use a specific data account for this connection */
+#define DCM_SOCK_BEARER_AS_SPECIFIED   (0x5)      /* Use the data account information which is which is delivered within this signal */
+
+/*
+ * Value constants for VAL_authtype
+ */
+#define DCM_SOCK_AUTH_PAP              (0x1)      /* PAP authentification protocol  */
+#define DCM_SOCK_AUTH_CHAP             (0x2)      /* CHAP authentification protocol !!! NOT SUPPORTED */
+#define DCM_SOCK_AUTH_NO               (0x3)      /* No authentication              */
+
+/*
+ * user defined constants
+ */
+#define CDCM_APN_MAX_LEN               (0x64)     
+#define CDCM_PHONE_NR_LEN              (0x54) 
+#define CDCM_USER_MAX_LEN              (0x19)     
+#define CDCM_PASSWORD_MAX_LEN          (0x19)     
+
+/************************************************************************************/
+
+/*
+ * Maximum length of the full-qualified domain name of an Internet host
+ */
+#define SOCK_MAXHOSTNAMELEN 255
+
+/* Maximum length (in octets) of a GPRS Access Point Name (APN). */
+#define SOCK_MAX_APN_LEN CDCM_APN_MAX_LEN
+
+/* Maximum length (in octets) of a telephone number. */
+#define SOCK_MAX_PHONENUM_LEN CDCM_PHONE_NR_LEN
+
+/* Maximum length (in octets) of a user id. */
+#define SOCK_MAX_USERID_LEN CDCM_USER_MAX_LEN
+
+/* Maximum length (in octets) of a user password. */
+#define SOCK_MAX_PASSWORD_LEN CDCM_PASSWORD_MAX_LEN
+
+/*
+ * Type of an IP protocol
+ * The values of this type are used as the 'ipproto' argument when creating
+ * a socket to specify if a UDP socket or a TCP socket shall be created.
+ */
+typedef enum {
+  SOCK_IPPROTO_TCP =  6,
+  SOCK_IPPROTO_UDP = 17
+} T_SOCK_IPPROTO;
+
+
+/*
+ * Type of a socket descriptor
+ */
+typedef unsigned long       T_SOCK_SOCKET;
+
+/*
+ * Type of an API instance
+ */
+typedef unsigned long       T_SOCK_API_INSTANCE;
+
+/*
+ * Type of an IP version 4 addresses in network byte order
+ */
+typedef unsigned long       T_SOCK_IPADDR;
+
+#define SOCK_IPADDR_ANY    (T_SOCK_IPADDR)0  /*  Unspecified IP address */
+
+/*
+ * UDP or TCP port number in network byte order
+ */
+typedef unsigned short     T_SOCK_PORT;
+
+#define SOCK_PORT_ANY      (T_SOCK_PORT)0    /* Unspecified port number */
+
+/*
+ * Convert U32 value from host byte order to network byte order
+ */
+#define SOCK_HTONL( x )  \
+        ((U32)((((U32)( x )  & 0x000000ffU) << 24) | \
+               (((U32)( x )  & 0x0000ff00U) <<  8) | \
+               (((U32)( x )  & 0x00ff0000U) >>  8) | \
+               (((U32)( x )  & 0xff000000U) >> 24)))
+
+/*
+ * Convert U16 value from host byte order to network byte order
+ */
+#define SOCK_HTONS( x )  \
+        ((U16)((((U16)( x )  & 0x00ff) << 8) | \
+               (((U16)( x )  & 0xff00) >> 8)))
+
+/*
+ * Convert U32 value from network byte order to host byte order
+ */
+#define SOCK_NTOHL( x ) \
+        ((U32)((((U32)( x ) & 0x000000ffU) << 24) | \
+               (((U32)( x ) & 0x0000ff00U) <<  8) | \
+               (((U32)( x ) & 0x00ff0000U) >>  8) | \
+               (((U32)( x ) & 0xff000000U) >> 24)))
+
+/*
+ * Convert U16 value from network byte order to host byte order
+ */
+#define SOCK_NTOHS( x ) \
+        ((U16)((((U16)( x ) & 0x00ff) << 8) | \
+               (((U16)( x ) & 0xff00) >> 8)))
+
+/*
+ * Construct IP address in network byte order from single octets.
+ */
+#define SOCK_MK_IPADDR( a, b, c, d ) \
+        ((T_SOCK_IPADDR)((a << 24) | (b << 16) | (c << 8) | d))
+
+/*
+ * Type of a Socket API event
+ */
+typedef enum {
+  SOCK_CREATE_CNF      =  1, /* Result event of sock_create() */
+  SOCK_CLOSE_CNF       =  2, /* Result event of sock_close() */
+  SOCK_BIND_CNF        =  3, /* Result event of sock_bind() */
+  SOCK_LISTEN_CNF      =  4, /* Result event of sock_listen() */
+  SOCK_CONNECT_CNF     =  5, /* Result event of sock_connect() */
+  SOCK_SOCKNAME_CNF    =  6, /* Result event of sock_getsockname() */
+  SOCK_PEERNAME_CNF    =  7, /* Result event of sock_getpeername() */
+  SOCK_HOSTINFO_CNF    =  8, /* Result event of sock_gethostbyname() or sock_gethostbyaddr() */
+  SOCK_MTU_SIZE_CNF    =  9, /* Result event of sock_get_mtu_size() */
+  SOCK_RECV_IND        = 10, /* Network event: data has been received */
+  SOCK_CONNECT_IND     = 11, /* Network event: an incoming connection has been accepted. */
+  SOCK_CONN_CLOSED_IND = 12, /* Network event: connection has been closed by the remote peer */
+  SOCK_ERROR_IND       = 13, /* Network event: an asynchronous error has occurred */
+  SOCK_FLOW_READY_IND  = 14, /* Flow control: the API is ready to send data again */
+
+  SOCK_OPEN_BEARER_CNF,      // Result Event of sock_open_bearer()
+  SOCK_CLOSE_BEARER_CNF,     // Result event of sock_close_bearer()
+  SOCK_BEARER_INFO_CNF,      // Result event of sock_bearer_info()
+  SOCK_BAERER_CLOSED_IND     // The bearer connection has been closed
+} T_SOCK_EVENTTYPE;
+
+/*
+ * Result codes of the API functions to indicate success or an error condition.
+ * This type is used as the result code of the function and as the result value
+ * in the associated event. It is also used for the error codes of a
+ * 'SOCK_ERROR_IND' event
+ */
+typedef enum {
+  SOCK_RESULT_OK                =  0, /* No problem detected. a corresponding primitive has been sent to the TCP/IP entity */
+  SOCK_RESULT_INVALID_PARAMETER =  1, /* A parameter given to the function is invalid */
+  SOCK_RESULT_INTERNAL_ERROR    =  2, /* An internal error has happened */
+  SOCK_RESULT_ADDR_IN_USE       =  3, /* The address or port is already in use */
+  SOCK_RESULT_OUT_OF_MEMORY     =  4, /* There is not enough memory to fulfill the request */
+  SOCK_RESULT_NOT_SUPPORTED     =  5, /* The socket is not of a type that can support this operation */
+  SOCK_RESULT_UNREACHABLE       =  6, /* The specified host cannot be reached */
+  SOCK_RESULT_CONN_REFUSED      =  7, /* The connection to the specified address was refused by the remote host */
+  SOCK_RESULT_TIMEOUT           =  8, /* The connection attempt timed out without establishing a connection */
+  SOCK_RESULT_IS_CONNECTED      =  9, /* The request could not be fulfilled because the socket is already connected */
+  SOCK_RESULT_HOST_NOT_FOUND    = 10, /* The specified host could not be found in the DNS */
+  SOCK_RESULT_DNS_TEMP_ERROR    = 11, /* A temporary DNS error has occurred. Retrying the query may be successful */
+  SOCK_RESULT_DNS_PERM_ERROR    = 12, /* A permanent DNS error has occurred */
+  SOCK_RESULT_NO_IPADDR         = 13, /* The specified name has been found in the DNS, but no IP address is available */
+  SOCK_RESULT_NOT_CONNECTED     = 14, /* The socket has not been connected yet */
+  SOCK_RESULT_MSG_TOO_BIG       = 15, /* The size of the data buffer is too large for a UDP socket */
+  SOCK_RESULT_CONN_RESET        = 16, /* The connection has been reset by the remote peer */
+  SOCK_RESULT_CONN_ABORTED      = 17, /* The connection was aborted due to timeout or some other error condition */
+  SOCK_RESULT_NO_BUFSPACE       = 18, /* Sending failed temporarily because the space to buffer the message was exhausted. */
+  SOCK_RESULT_NETWORK_LOST, //	As a result code: The operation failed because TCP/IP's bearer connection has been disconnected.As an asynchronous event code: The bearer connection has been closed.
+  SOCK_RESULT_NOT_READY, //	The operation failed because the bearer connection has not been opened.
+  SOCK_RESULT_BEARER_NOT_READY, //	The bearer connection could not be opened because the mobile is not yet completely attached to the network. A retry at a later time may be successful.
+  SOCK_RESULT_IN_PROGRESS, //	The operation failed because a similar operation is already in progress.
+  SOCK_RESULT_BEARER_ACTIVE//	The operation failed because a bearer connection is already open.
+} T_SOCK_RESULT;
+
+
+/* Type of the bearer_select parameter of sock_open_bearer(), used to select the
+ * type of the bearer connection to be opened by the Data Connection Manager 
+ * (DCM), and of the bearer_type field of the T_SOCK_BEARER_INFO struct.
+ */
+typedef enum {
+  SOCK_BEARER_ANY = DCM_SOCK_BEARER_ANY,
+  SOCK_BEARER_GPRS = DCM_SOCK_BEARER_GPRS,
+  SOCK_BEARER_GSM = DCM_SOCK_BEARER_GSM,
+  SOCK_BEARER_USE_PROFILE = DCM_SOCK_BEARER_USE_PROFILE,
+  SOCK_BEARER_AS_SPECIFIED = DCM_SOCK_BEARER_AS_SPECIFIED
+} T_SOCK_BEARER_TYPE;
+
+// FST: ?????
+typedef enum {
+  SOCK_AUTH_PAP = DCM_SOCK_AUTH_PAP,
+  SOCK_AUTH_CHAP = DCM_SOCK_AUTH_CHAP,
+  SOCK_AUTH_NO= DCM_SOCK_AUTH_NO
+} T_SOCK_AUTHTYPE;
+
+/*
+ * Type of the generic event data structure passed
+ * to the callback function on an event.
+ * The actual event structure may be bigger(depending on its type),
+ * but it will contain these fields at the beginning
+ */
+typedef struct {
+  T_SOCK_EVENTTYPE   event_type;  /* Type of the event. */
+  T_SOCK_RESULT      result;      /* Result code of the operation */
+  T_SOCK_SOCKET      socket;      /* Socket for which the event occurred */
+} T_SOCK_EVENTSTRUCT;
+
+/*
+ * Pointer to the callback function specified by the application
+ */
+typedef void (*T_SOCK_CALLBACK)(T_SOCK_EVENTSTRUCT* event, void *context);
+
+/* System wide handle of a bearer connection.
+ * Variables of this type are used as handles to identify a bearer connection. 
+ * !! NOT NEEDED FOR CURRENT IMPLEMENTATION ONLY MENTIONED FOR FUTURE SUPPOSE.!!
+ */
+typedef U16 T_SOCK_BEARER_HANDLE;
+
+typedef struct {
+  T_SOCK_BEARER_HANDLE bearer_handle;
+  T_HANDLE             app_handle;
+  T_SOCK_BEARER_TYPE   bearer_type;
+  BOOL                 apn_valid;
+  char                 apn[SOCK_MAX_APN_LEN+1];
+  BOOL                 phone_nr_valid;
+  char                 phone_nr[SOCK_MAX_PHONENUM_LEN+1];
+  BOOL                 user_id_valid;
+  char                 user_id[SOCK_MAX_USERID_LEN+1];
+  BOOL                 password_valid;
+  char                 password[SOCK_MAX_PASSWORD_LEN+1];
+  int                  cid;
+  T_SOCK_IPADDR        ip_address;
+  T_SOCK_IPADDR        dns1;
+  T_SOCK_IPADDR        dns2;
+  T_SOCK_IPADDR        gateway;
+  T_SOCK_AUTHTYPE      authtype;
+  BOOL                 data_compr;
+  BOOL                 header_comp;
+  int                  precedence;
+  int                  delay;
+  int                  reliability;
+  int                  peak_throughput;
+  int                  mean_througput;
+  BOOL                 shareable;
+} T_SOCK_BEARER_INFO;
+
+/* ========================================================================== */
+/* ==============================  Result Events from TCPIP ================= */
+
+typedef struct {
+  T_SOCK_EVENTTYPE     event_type;  /* Type of the event. */
+  T_SOCK_RESULT        result;      /* Result code of the operation */
+  T_SOCK_SOCKET        socket;      /* Socket for which the event occurred */
+  T_SOCK_BEARER_HANDLE bearer_handle;
+} T_SOCK_OPEN_BEARER_CNF;
+
+typedef T_SOCK_EVENTSTRUCT T_SOCK_CLOSE_BEARER_CNF;
+
+typedef struct {
+  T_SOCK_EVENTTYPE   event_type;  /* Type of the event. */
+  T_SOCK_RESULT      result;      /* Result code of the operation */
+  T_SOCK_SOCKET      socket;      /* Socket for which the event occurred */
+  T_SOCK_BEARER_INFO bearer_params;
+} T_SOCK_BEARER_INFO_CNF;
+
+typedef struct {
+  T_SOCK_EVENTTYPE   event_type;  /* Type of the event. */
+  T_SOCK_RESULT      result;      /* Result code of the operation */
+  T_SOCK_SOCKET      socket;      /* Socket for which the event occurred */
+  U32                dcm_error;   /* The parameter contains errors received from
+                                   * PS (ETSI Spec 07.07) */
+} T_SOCK_BAERER_CLOSED_IND;
+
+typedef struct {
+  T_SOCK_EVENTTYPE   event_type;  /* Type of the event. */
+  T_SOCK_RESULT      result;      /* Result code of the operation */
+  T_SOCK_SOCKET      socket;      /* Socket for which the event occurred */
+} T_SOCK_CREATE_CNF;
+
+typedef T_SOCK_EVENTSTRUCT      T_SOCK_CLOSE_CNF;
+typedef T_SOCK_EVENTSTRUCT      T_SOCK_BIND_CNF;
+typedef T_SOCK_EVENTSTRUCT      T_SOCK_LISTEN_CNF;
+typedef T_SOCK_EVENTSTRUCT      T_SOCK_CONNECT_CNF;
+
+typedef struct {
+  T_SOCK_EVENTTYPE   event_type;  /* Type of the event. */
+  T_SOCK_RESULT      result;      /* Result code of the operation */
+  T_SOCK_SOCKET      socket;      /* Socket for which the event occurred */
+  T_SOCK_IPADDR      ipaddr;      /* The local IP address of the socket */
+  T_SOCK_PORT        port;        /* The local port number of the socket */
+} T_SOCK_SOCKNAME_CNF;
+
+typedef T_SOCK_SOCKNAME_CNF   T_SOCK_PEERNAME_CNF;
+
+typedef struct {
+  T_SOCK_EVENTTYPE   event_type;  /* Type of the event. */
+  T_SOCK_RESULT      result;      /* Result code of the operation */
+  T_SOCK_SOCKET      socket;      /* unused */
+  char               hostname[SOCK_MAXHOSTNAMELEN+1]; /* The name of the host as 
+                                                      a zero-terminated string */
+  T_SOCK_IPADDR      ipaddr;      /* The local IP address of the socket */
+} T_SOCK_HOSTINFO_CNF;
+
+typedef struct {
+  T_SOCK_EVENTTYPE   event_type;  /* Type of the event. */
+  T_SOCK_RESULT      result;      /* Result code of the operation */
+  T_SOCK_SOCKET      socket;      /* Socket for which the event occurred */
+  U16                mtu_size;    /* MTU size */
+} T_SOCK_MTU_SIZE_CNF;
+
+typedef struct {
+  T_SOCK_EVENTTYPE   event_type;  /* Type of the event. */
+  T_SOCK_RESULT      result;      /* Result code of the operation */
+  T_SOCK_SOCKET      socket;      /* Socket for which the event occurred */
+  U32                data_length; /* Length of the data portion received. */
+  char               *data_buffer; /*  Pointer to the data received. The application
+                                       shall free this data buffer after use. */
+} T_SOCK_RECV_IND;
+
+
+typedef struct {
+  T_SOCK_EVENTTYPE   event_type;  /* Type of the event. */
+  T_SOCK_RESULT      result;      /* Result code of the operation */
+  T_SOCK_SOCKET      socket;      /* Socket for which the event occurred */
+  T_SOCK_SOCKET      new_socket;  /* New socket allocated for the connection. */
+  T_SOCK_IPADDR      peer_ipaddr; /* IP address of the remote peer. */
+  T_SOCK_PORT        peer_port;   /* Port number on the remote side. */
+} T_SOCK_CONNECT_IND;
+
+typedef T_SOCK_EVENTSTRUCT      T_SOCK_CONN_CLOSED_IND;
+typedef T_SOCK_EVENTSTRUCT      T_SOCK_ERROR_IND;
+typedef T_SOCK_EVENTSTRUCT      T_SOCK_FLOW_READY_IND;
+
+
+
+/* ========================================================================== */
+/* ================== Prototypes of socket API ============================== */
+
+
+/* ******************* API administrative functions ************************* */
+
+/*------------------------------------------------------------------------------
+   Function     : sock_api_initialize
+   Parameter    : - T_SOCK_API_INSTANCE * :
+                    'The function returns an API instance value. The value is needed
+                     for several API functions.'
+                  - T_HANDLE :
+                    'Application task handle as passed to pei_init()'
+                  - char* :
+                    'Name of the application entity as used with vsi_c_open().'
+   Return       : The function returns TRUE if the initialization was successful.
+   Description  : Initializes the socket interface API.
+------------------------------------------------------------------------------*/
+BOOL sock_api_initialize(T_SOCK_API_INSTANCE *api_instance, 
+                         T_HANDLE app_handle,
+                         char* app_name);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_api_deinitialize
+   Parameter    : - T_SOCK_API_INSTANCE :
+                    'API instance value.'
+   Return       : None
+   Description  : Deinitializes the socket interface API. The function releases 
+                  all associated memory.
+------------------------------------------------------------------------------*/
+void sock_api_deinitialize(T_SOCK_API_INSTANCE api_instance);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_api_handles_primitive
+   Parameter    : - T_SOCK_API_INSTANCE: API instance value
+                  - T_PRIM:              Pointer to primitive received from 
+                                         the primitive queue'
+   Return       : The function returns TRUE if the primitive has been handled by 
+                  this function.In this case the application should not do 
+                  anything else with the primitive and should not call PFREE()
+                  to free the memory block used for the primitive.
+                  The function returns FALSE if the primitive has not been 
+                  handled by this function. In this case the application should 
+                  process the primitive as usual. 
+   Description  : Handles primitives for the socket API.
+                  To free the application from the handling of the event 
+                  primitives sent by the TCP/IP entity, the Socket API provides
+                  this function that checks if a primitive is to be handled by 
+                  the Socket API and if it is, handles it. The application is 
+                  supposed to call it immediately after receiving a primitive.
+                  If the primitive is meant for the Socket API, it is handled by
+                  this function. This will in most cases include calling the 
+                  callback function supplied by the application to deliver an 
+                  event. If the primitive is not meant for the Socket API,
+                  no action is taken.
+                  It is recommended to call this function early in the 
+                  application entity's pei_primitive() function.
+------------------------------------------------------------------------------*/
+BOOL sock_api_handles_primitive(T_SOCK_API_INSTANCE api_instance, 
+                                T_PRIM *prim);
+
+
+/* ******************* Bearer related functions ***************************** */
+
+/*------------------------------------------------------------------------------
+   Function     : sock_open_bearer()
+   Parameter    : - T_SOCK_API_INSTANCE: API instance value
+                  - T_SOCK_BEARER_TYPE :  CSD or GPRS
+                  - int:                  Number of the selected profile with a bearer 
+                                          selection of SOCK_BEARER_USE_PROFILE.
+                                          Unused in other cases.
+                  - T_SOCK_BEARER_INFO:   requested parameters of the bearer connection
+                  - T_SOCK_CALLBACK:      callback function to be called for return events.
+                  - void*:                An arbitrary pointer to be passed to the 
+                                          callback function when it is called
+   Return       : T_SOCK_RESULT indicates successor a problem that happend
+   Return Event : T_SOCK_OPEN_BEARER_CNF
+   Description  : Opens a CSD or GPRS connection for use with TCP/IP.
+                  This function a bearer connection for use with TCP/IP. It must be 
+                  called after sock_api_initialize() and before any other 
+                  TCP/IP-related functions.
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_open_bearer(T_SOCK_API_INSTANCE api_instance,
+                               T_SOCK_BEARER_TYPE bearer_select,
+                               int profile_number,
+                               T_SOCK_BEARER_INFO *params,
+                               T_SOCK_CALLBACK sock_cb,
+                               void *context);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_close_bearer()
+   Parameter    : - T_SOCK_API_INSTANCE : API instance value
+                  - T_SOCK_BEARER_HANDLE: returned by SOCK_OPEN_BEARER_CNF
+                  - T_SOCK_CALLBACK:      Callback function to be called for return events.
+                  - void*:                An arbitrary pointer to be passed to the 
+                                          callback function when it is called
+   Return       : T_SOCK_RESULT indicates successor a problem that happend
+   Return Event : T_SOCK_CLOSE_BEARER_CNF
+   Description  : Close a bearer connection that has been opened with sock_open_bearer().
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_close_bearer(T_SOCK_API_INSTANCE api_instance,
+                                T_SOCK_BEARER_HANDLE bearer_handle,
+                                T_SOCK_CALLBACK sock_cb,
+                                void *context);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_bearer_info()
+   Parameter    : - T_SOCK_API_INSTANCE:  API instance value
+                  - T_SOCK_BEARER_HANDLE: returned by SOCK_OPEN_BEARER_CNF
+                  - T_SOCK_CALLBACK:      Callback function to be called for 
+                                          return events.
+                  - void*:                An arbitrary pointer to be passed to the 
+                                          callback function when it is called
+   Return       : T_SOCK_RESULT
+   Return Event : T_SOCK_BEARER_INFO_CNF
+   Description  : Get information about a bearer connection that has been opened 
+                  with sock_open_bearer().
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_bearer_info(T_SOCK_API_INSTANCE api_instance,
+                               T_SOCK_BEARER_HANDLE bearer_handle,
+                               T_SOCK_CALLBACK sock_cb,
+                               void *context);
+
+
+/* ******************* Socket related functions ***************************** */
+
+/*------------------------------------------------------------------------------
+   Function     : sock_create
+   Parameter    : - T_SOCK_API_INSTANCE :
+                    'API instance value.'
+                  - T_SOCK_IPPROTO :
+                      'The protocol (UDP or TCP) to be used with this socket'
+                  - T_SOCK_CALLBACK :
+                      'The callback function to be called for events on this socket'
+                  - void * :
+                      'An arbitrary pointer to be passed to 
+                       the callback function when it is called'
+   Return       : (T_SOCK_RESULT)
+   Return Event : 'SOCK_CREATE_CNF'
+                    - T_SOCK_RESULT : Result code
+                    - T_SOCK_SOCKET : The socket descriptor returned by the TCP/IP entity
+   Description  : - Create a new UDP or TCP socket
+                  - This function creates a socket that can subsequently be used with 
+                    the other Socket API functions
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_create(T_SOCK_API_INSTANCE api_instance,
+                          T_SOCK_IPPROTO ipproto, 
+                          T_SOCK_CALLBACK callback,
+                          void *context);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_close
+   Parameter    :  - T_SOCK_SOCKET :
+                      'The socket descriptor to be closed'
+   Return       : (T_SOCK_RESULT)
+   Return Event : 'SOCK_CLOSE_CNF'
+                    - T_SOCK_RESULT : Result code
+                    - T_SOCK_SOCKET : The socket descriptor to be  closed
+   Description  : - Close socket, shutdown connection if present
+                  - This function closes a socket that has previously 
+                    been created with sock_create(). 
+                    If a connection is open for this socket, it will be closed. 
+                    If this socket has listened for connections, 
+                    no further connections will be accepted
+   History      : 0001    03.08.11    shkim    Created
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_close(T_SOCK_SOCKET socket);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_bind
+   Parameter    :  - T_SOCK_SOCKET :
+                      'The socket descriptor to be closed'
+                   - T_SOCK_PORT   :
+                      'The port number to bind the socket to'
+   Return       : (T_SOCK_RESULT)
+   Return Event : 'SOCK_BIND_CNF'
+                    - T_SOCK_RESULT : Result code
+                    - T_SOCK_SOCKET : The socket descriptor to be bound
+   Description  : - Bind socket to a specific local port number
+                  - This function binds a socket to the specified local port
+   History      : 0001    03.08.11    shkim    Created
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_bind(T_SOCK_SOCKET socket,
+                        T_SOCK_PORT port);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_listen
+   Parameter    :  - T_SOCK_SOCKET :
+                      'The socket descriptor to listen on'
+   Return       : (T_SOCK_RESULT)
+   Return Event : 'SOCK_LISTEN_CNF'
+                    - T_SOCK_RESULT : Result code
+                    - T_SOCK_SOCKET : The socket descriptor to listen on
+   Description  : - Accept TCP connections on this socket
+                  - This function makes TCP/IP listen for 
+                    TCP connections on this socket. 
+                    The socket should have been bound to a specific port 
+                    using sock_bind() before.
+   History      : 0001    03.08.11    shkim    Created
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_listen(T_SOCK_SOCKET socket);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_connect
+   Parameter    :  - T_SOCK_SOCKET :
+                      'The socket descriptor to connect'
+                   - T_SOCK_IPADDR :
+                      'The IP address to connect to'
+                   - T_SOCK_PORT   :
+                      'The port number to connect to'
+   Return       : (T_SOCK_RESULT)
+   Return Event : 'SOCK_CONNECT_CNF'
+                    - T_SOCK_RESULT : Result code
+                    - T_SOCK_SOCKET : The socket descriptor to connect
+   Description  : - Connect the socket to a remote endpoint
+                  - With TCP sockets, a TCP connection is established to 
+                      the specified IP address and the specified port. 
+                      The connection can then be used to send data using sock_send(); 
+                      received data is indicated by a SOCK_RECV_IND event.
+                    With UDP sockets, the specified IP address and port number 
+                      are stored with the socket; 
+                      subsequent UDP messages can be sent to this address 
+                      using sock_send(); 
+                      only messages from this address will be received.
+   History      : 0001    03.08.11    shkim    Created
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_connect(T_SOCK_SOCKET socket, 
+                           T_SOCK_IPADDR ipaddr,
+                           T_SOCK_PORT port);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_getsockname
+   Parameter    :  - T_SOCK_SOCKET :
+                      'The socket descriptor to retrieve information about'
+   Return       : (T_SOCK_RESULT)
+   Return Event : 'SOCK_SOCKNAME_CNF'
+                    - T_SOCK_RESULT : Result code
+                    - T_SOCK_SOCKET : The socket descriptor to connect
+                    - T_SOCK_IPADDR : The local IP address of the socket
+                    - T_SOCK_PORT   : The local port number of the socket
+   Description  : - Retrieve local address information
+                  - The function retrieves local address information of the socket. 
+                    If the socket has not yet been bound to an address using sock_bind(), 
+                    the port number is unspecified (SOCK_PORT_ANY)
+   History      : 0001    03.08.11    shkim    Created
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_getsockname(T_SOCK_SOCKET socket);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_getpeername
+   Parameter    :  - T_SOCK_SOCKET :
+                      'The socket descriptor to retrieve information about'
+   Return       : (T_SOCK_RESULT)
+   Return Event : 'SOCK_PEERNAME_CNF'
+                    - T_SOCK_RESULT : Result code
+                    - T_SOCK_SOCKET : The socket descriptor to connect
+                    - T_SOCK_IPADDR : The IP address of the remote peer
+                    - T_SOCK_PORT   : The port number at the remote peer
+   Description  : - Retrieve remote address information
+                  - The function retrieves address information of 
+                    the connection at the remote peer.
+                    If the socket is not connected, 
+                    the IP address and port number are unspecified
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_getpeername(T_SOCK_SOCKET socket);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_gethostbyname
+   Parameter    : - T_SOCK_API_INSTANCE :
+                      'API instance value.'
+                  - char * :
+                      'The name of the referenced host'
+                   - T_SOCK_CALLBACK :
+                      'The callback function to be called for the result event'
+                   - void * :
+                      'An arbitrary pointer to be passed to the callback
+                       function when it is called'
+   Return       : (T_SOCK_RESULT)
+   Return Event : 'SOCK_HOSTINFO_CNF'
+                    - T_SOCK_RESULT : Result code
+                    - char hostname[SOCK_MAXHOSTNAMELEN+1] : The name of the 
+                      host as a zero-terminated string
+                    - T_SOCK_IPADDR : The IP address of the host
+   Description  : - Get the IP address of a host
+                  - The function queries the IP address information of 
+                    the specified host from the DNS.
+                    Because the function is not associated to any socket, 
+                    a callback function and a context 
+                    pointer must be specified separately
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_gethostbyname(T_SOCK_API_INSTANCE api_instance, 
+                                 char *hostname,
+                                 T_SOCK_CALLBACK callback, 
+                                 void *context);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_gethostbyaddr
+   Parameter    : - T_SOCK_API_INSTANCE :
+                      'API instance value.'
+                  - T_SOCK_IPADDR  :
+                      'The IP address of the referenced host'
+                   - T_SOCK_CALLBACK  :
+                      'The callback function to be called for the result event'
+                   - void * :
+                      'An arbitrary pointer to be passed to the callback function 
+                      when it is called'
+   Return       : (T_SOCK_RESULT)
+   Return Event : 'SOCK_HOSTINFO_CNF'
+                    - T_SOCK_RESULT : Result code
+                    - char hostname[SOCK_MAXHOSTNAMELEN+1] : The name of the 
+                      host as a zero-terminated string
+                    - T_SOCK_IPADDR : The IP address of the host
+   Description  : - Get the name of a host
+                  - The function queries the hostname for the specified 
+                    IP address from the DNS.
+                    Because the function is not associated to any socket, 
+                    a callback function and a context pointer must be specified separately
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_gethostbyaddr(T_SOCK_API_INSTANCE api_instance,
+                                 T_SOCK_IPADDR ipaddr,
+                                 T_SOCK_CALLBACK callback,
+                                 void *context);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_send
+   Parameter    :  - T_SOCK_SOCKET :
+                      'The socket to send the data on'
+                   - char * :
+                      'The data buffer to be sent'
+                   - U16 :
+                      'The length of the data buffer in bytes'
+   Return       : (T_SOCK_RESULT)
+   Return Event : None
+   Description  : - Send data on a socket ( TCP only )
+                  - The function sends the specified data buffer over the socket. 
+                    The socket must be connected, 
+                    i. e. it must have been connected to a remote peer 
+                    using sock_connect() or been created when accepting 
+                    a connection as indicated by SOCK_SONNECT_IND.
+                    Implementation note: In order to send the payload data via DTI, 
+                        the data must be copied into a DTI descriptor by the Socket API; 
+                        there is no way to avoid the copy operation without 
+                        putting the burden of knowing DTI-internal data 
+                        structures on the application. 
+                        It has been decided to pay the cost of the copy operation 
+                        in order to free the application from this responsibility
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_send(T_SOCK_SOCKET socket, 
+                        char *buffer, 
+                        U16 buffer_length);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_sendto
+   Parameter    :  - T_SOCK_SOCKET :
+                      'The socket to send the data on'
+                   - char * :
+                      'The data buffer to be sent'
+                   - U16 :
+                      'The length of the data buffer'
+                   - T_SOCK_IPADDR :
+                      'IP address of the host to send data to'
+                   - T_SOCK_PORT :
+                      'Remote port to send data to'
+   Return       : (T_SOCK_RESULT)
+   Return Event : None
+   Description  : - Send data on a socket( UDP only )
+                  - The function sends the specified data buffer 
+                    over the socket to the specified address. The socket must be
+                    a UDP socket.
+                    Implementation note: In order to send the payload data via DTI, 
+                        the data must be copied into a DTI descriptor by the Socket API; 
+                        there is no way to avoid the copy operation without putting 
+                        the burden of knowing DTI-internal data structures on 
+                        the application. It has been decided to pay the cost of 
+                        the copy operation in order to free the application from 
+                        this responsibility
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_sendto(T_SOCK_SOCKET socket, 
+                          char *buffer, 
+                          U16 buffer_length, 
+                          T_SOCK_IPADDR ipaddr, 
+                          T_SOCK_PORT port);
+
+
+/*------------------------------------------------------------------------------------
+   Function     : sock_set_callback
+   Parameter    : - T_SOCK_SOCKET :
+                      'Socket to set callback and context for'
+                  - T_SOCK_CALLBACK :
+                      'New callback function for the socket'
+                  - void * :
+                      'New context pointer for the socket'
+   Return       : (T_SOCK_RESULT)
+   Return Event : None
+   Description  : - Set a new callback function and context pointer for the socket
+                  - The function defines a new callback function and a new context
+                    pointer for the socket. All socket events after this call will be
+                    delivered using the new callback function and the new context
+                    pointer
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_set_callback(T_SOCK_SOCKET socket,
+                                T_SOCK_CALLBACK callback, 
+                                void *context);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_get_callback
+   Parameter    : - T_SOCK_SOCKET :
+                      'Socket to get callback and context from'
+                  - T_SOCK_CALLBACK * :
+                      'Return callback function pointer for the socket'
+                  - void ** :
+                      'Return context pointer for the socket'
+   Return       : (T_SOCK_RESULT)
+   Return Event : None
+   Description  : - Get callback function pointer and context pointer for the socket
+                  - The function returns callback function pointer and context pointer
+                    for the socket.
+                    pointer
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_get_callback(T_SOCK_SOCKET socket,
+                                T_SOCK_CALLBACK *callback_p, 
+                                void **context_p);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_flow_xoff
+   Parameter    :  - T_SOCK_SOCKET :
+                      'Socket to switch to "xoff" status'
+   Return       : (T_SOCK_RESULT)
+   Return Event : None
+   Description  : - Flow control: make TCP/IP stop sending data
+                  - This function makes the Socket API stop TCP/IP sending data.
+                    If TCP/IP has already been stopped, the function has no effect.
+   History      : 0001    03.08.11    shkim    Created
+                  0002    03.09.12    STW      T_SOCK_RESULT added
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_flow_xoff(T_SOCK_SOCKET socket);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_flow_xon
+   Parameter    :  - T_SOCK_SOCKET :
+                      'Socket to switch to "xon" status'
+   Return       : (T_SOCK_RESULT)
+   Return Event : None
+   Description  : - Flow control: make TCP/IP resume sending data
+                  - This function makes TCP/IP resume sending data.
+                    If TCP/IP has not been stopped, the function has no effect
+   History      : 0001    03.08.11    shkim    Created
+                  0002    03.09.12    STW      T_SOCK_RESULT added
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_flow_xon(T_SOCK_SOCKET socket);
+
+
+/*------------------------------------------------------------------------------
+   Function     : sock_get_mtu_size
+   Parameter    :  - T_SOCK_SOCKET :
+                      'Socket to get MTU size from'
+   Return       : (T_SOCK_RESULT)
+   Return Event : 'SOCK_MTU_SIZE_CNF'
+                    - T_SOCK_RESULT : Result code
+                    - T_SOCK_SOCKET : The socket descriptor (unused).
+                    - U16           : MTU size
+   Description  : - Get MTU size of network connection
+                  - The function retrieves the size of 
+                    the Maximum Transfer Unit(MTU) of the network connection.
+   History      : 0001    03.08.11    shkim    Created
+                  0002    03.09.12    STW      T_SOCK_SOCKET added
+------------------------------------------------------------------------------*/
+T_SOCK_RESULT sock_get_mtu_size(T_SOCK_SOCKET socket);
+
+
+#endif  /* __SOCKET_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/include/condat/vmd.h	Sun Sep 28 01:14:48 2014 +0000
@@ -0,0 +1,112 @@
+/* 
++----------------------------------------------------------------------------- 
+|  Project :  GSM (6301)
+|  Modul   :  
++----------------------------------------------------------------------------- 
+|  Copyright 2002 Texas Instruments Berlin, AG 
+|                 All rights reserved. 
+| 
+|                 This file is confidential and a trade secret of Texas 
+|                 Instruments Berlin, AG 
+|                 The receipt of or possession of this file does not convey 
+|                 any rights to reproduce or disclose its contents or to 
+|                 manufacture, use, or sell anything it may describe, in 
+|                 whole, or in part, without the specific written consent of 
+|                 Texas Instruments Berlin, AG. 
++----------------------------------------------------------------------------- 
+|  Purpose :  Types definitions for the voice memo and dialling driver
+|             .
++----------------------------------------------------------------------------- 
+*/ 
+
+#ifndef DEF_VMD_H
+#define DEF_VMD_H
+
+/*
+ * Signal Types
+ */
+#define VMD_END_RECORD             1
+#define VMD_END_PLAY               2
+#define VMD_SPEECH_RECOGNITION     3
+
+
+/*
+ * type definitions
+ */
+typedef struct vmd_start_record_type
+{
+  USHORT * start_address;
+  USHORT * stop_address;
+  UBYTE    dtx_used;
+  USHORT   tone_id;
+} vmd_start_record_type;
+
+typedef struct vmd_start_play_type
+{
+  USHORT * start_address;
+} vmd_start_play_type;
+
+typedef struct vmd_end_record_type
+{
+  USHORT * stop_address;
+} vmd_end_record_type;
+
+typedef struct vmd_end_play_type
+{
+  USHORT * stop_address;
+} vmd_end_play_type;
+
+
+typedef struct vmd_speech_recognition_req_type
+{
+  USHORT   i_speaker;
+  USHORT   i_action;
+  USHORT   i_param1;
+  USHORT   i_param2;
+  USHORT * address;
+  USHORT   total_vocabulary_number;
+} vmd_speech_recognition_req_type;
+
+/*
+ * Constants
+ */
+#define SC_SR_MAX_NB_USER          10
+
+#define SC_SR_START_ENROLL          1
+#define SC_SR_START_UPDATE          2
+#define SC_SR_START_RECO            3
+#define SC_SR_ABORT                 6
+#define SC_SR_START_UPDATE_CHECK   13
+
+#define C_SR_CORRECT_END            0
+#define C_SR_CORRECT_END_ACQ        1
+#define C_SR_CORRECT_END_UPD        2
+#define C_SR_CORRECT_END_RECO       3
+#define C_SR_TIME_OUT              11
+#define C_SR_BAD_ACQUISITION       12
+#define C_SR_OOV_TOOCLOSE          13
+#define C_SR_UPDATE_CHECK_ERR      14
+#define C_SR_BAD_RECOGNITION       20
+
+#if defined (NEW_FRAME)
+/*
+ * to achieve backward compatibility with older definitions
+ */
+#define drv_SignalCB_Type           T_DRV_CB_FUNC
+#define drv_SignalID_Type           T_DRV_SIGNAL
+#endif
+
+ /*
+ * Prototypes
+ */
+EXTERN UBYTE vmd_init                       (drv_SignalCB_Type   in_SignalCBPtr);
+EXTERN void  vmd_exit                       (void);
+EXTERN UBYTE vmd_start_voice_memo_recording (vmd_start_record_type * vmd_parameter);
+EXTERN UBYTE vmd_stop_voice_memo_recording  (void);
+EXTERN UBYTE vmd_start_voice_memo_playing   (vmd_start_play_type   * vmd_parameter);
+EXTERN UBYTE vmd_stop_voice_memo_playing  (void);
+
+EXTERN UBYTE vmd_start_recognition          (vmd_speech_recognition_req_type * vmd_parameter);
+EXTERN UBYTE vmd_primitive                  (USHORT opc, void * data);
+
+#endif