FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/g23m-aci/ati_ext/ati_ext_mech.c @ 1015:9ced8e13cf91
fc-shell tch-dl command implementation: brown paper bag
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Sun, 20 Mar 2016 23:07:46 +0000 |
parents | 1e4dbee8dcfd |
children |
rev | line source |
---|---|
781
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 +----------------------------------------------------------------------------- |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 | Project : |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 | Modul : J:\g23m-aci\aci_ext\ati_ext_mech.c |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 +----------------------------------------------------------------------------- |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 | Copyright 2002 Texas Instruments Berlin, AG |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 | All rights reserved. |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 | This file is confidential and a trade secret of Texas |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 | Instruments Berlin, AG |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 | The receipt of or possession of this file does not convey |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 | any rights to reproduce or disclose its contents or to |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 | manufacture, use, or sell anything it may describe, in |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 | whole, or in part, without the specific written consent of |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 | Texas Instruments Berlin, AG. |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 +----------------------------------------------------------------------------- |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 | Purpose : This is the implementation of the AT command extension mechanism. Customers |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 | can implement their own handling of extension AT comannds here. |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 +----------------------------------------------------------------------------- |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 #ifndef ATI_EXT_MECH_C |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 #define ATI_EXT_MECH_C |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 |
819
1e4dbee8dcfd
ati_ext/ati_ext_mech.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
781
diff
changeset
|
24 #include "config.h" |
1e4dbee8dcfd
ati_ext/ati_ext_mech.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
781
diff
changeset
|
25 #include "fixedconf.h" |
1e4dbee8dcfd
ati_ext/ati_ext_mech.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
781
diff
changeset
|
26 #include "condat-features.h" |
1e4dbee8dcfd
ati_ext/ati_ext_mech.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
781
diff
changeset
|
27 #include "aci_conf.h" |
1e4dbee8dcfd
ati_ext/ati_ext_mech.c compiles
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
781
diff
changeset
|
28 |
781
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 #include "aci_all.h" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 #include "aci_cmh.h" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 #include "ati_cmd.h" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 #include "aci_cmd.h" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 #include "aci_lst.h" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 #include "ati_int.h" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 #include "ati_ext_mech.h" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 #ifdef FF_BAT |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 #include "aci_bat_ext.h" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 #endif |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 /*==== CONSTANTS ==================================================*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 #define EXT_ATD "EXT: D, I" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 #define EXT_ATCFUN "EXT: +CFUN, I" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 #define EXT_ATCOPS_START "EXT: +COPS, I" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 #define EXT_ATCOPS_STOP "EXT: +COPS, O" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 #define EXT_ENTER "EXT: I" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 #define EXT_LEAVE "EXT: O" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 #define EXT_UNEXPCTD "EXT: E" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 #define EXT_DIAL_VOICE_PASS "DVCP" |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 #define EXT_MAX_BUF_LEN 41 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 #define EXT_VOICE_DELIMITER ';' |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 /*==== EXTERNALS ======================================================*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 /*==== LOCALS =========================================================*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 /*==== EXPORT ======================================================*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 EXTERN UBYTE src_id_ext; /* this source runs currently an extension command */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 /*==== TYPES ======================================================*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 #ifndef WIN32 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 extern USHORT IQ_GetBuild(void); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 #ifndef ALR |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 extern USHORT IQ_GetPoleStarVersion(void); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 #endif |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 extern USHORT IQ_GetJtagId(void); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 extern USHORT IQ_GetRevision(void); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 #endif*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 /*==== VARIABLES ==================================================*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 LOCAL CHAR extDialNum[MAX_CC_ORIG_NUM_LEN]; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 /* number to be dialled during testing */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 LOCAL T_ACI_AT_CMD currAbrtCmd = AT_CMD_NONE; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 /* used for indicating abort of */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 /* asynchronous command handling */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 LOCAL T_ACI_AT_CMD currExtCmd_v2 = AT_CMD_NONE; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 /* used for indicating asynchronous */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 /* command handling */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
87 /* identifier of the call which was */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
88 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
89 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
90 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 | PROJECT : GSM-PS (8403) MODULE : TIL_CSF | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
92 | STATE : code ROUTINE : cmh_show_version | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
93 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
94 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
95 PURPOSE : Trace Layer 1 DSP version numbers |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
96 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
97 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
98 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
99 #ifndef WIN32 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
100 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
101 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
102 static void jtagid_to_chipset (USHORT jtagid, CHAR *chipset) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
103 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
104 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
105 switch (jtagid) { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
107 case 0xB268: |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
108 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
109 strcpy (chipset, "Hercules"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
110 break; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
111 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
112 case 0xB2B5: |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
113 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
114 strcpy (chipset, "Ulysse 1Mbits rev. B"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
115 break; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
116 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
117 case 0xB335: |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
118 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
119 strcpy (chipset, "Ulysse 1Mbits rev. A"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
120 break; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
121 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
122 case 0xB334: |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
123 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
124 strcpy (chipset, "Ulysse 2Mbits"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
125 break; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
126 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
127 case 0xB393: |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
128 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
129 strcpy (chipset, "Ulysse G1"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
130 break; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
131 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
132 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
133 case 0xB396: |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
134 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
135 strcpy (chipset, "Calypso rev. B"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
136 break; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
137 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
138 case 0xB2AC: |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
139 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
140 // Samson and Calypso rev. A share the same JTAG ID. |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
141 #if (CHIPSET != 7) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
142 strcpy (chipset, "Samson"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
143 #else |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
144 strcpy (chipset, "Calypso rev. A"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
145 #endif |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
146 break; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
147 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
148 default: |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
149 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
150 strcpy (chipset, "Unknown"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
151 break; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
152 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
153 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
154 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
155 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
156 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
157 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
158 GLOBAL void cmh_show_version (UBYTE src_id ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
159 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
160 #ifndef ALR |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
161 CHAR buf[80]; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
162 USHORT build, hw, rev; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
163 #else |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
164 CHAR buf[160]; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
165 CHAR chipset[25]; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
166 #endif |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
167 USHORT jtag; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
168 UCHAR size; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
169 CHAR *output;*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
170 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
171 * Retrieve hardware JTAG ID info |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
172 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
173 /* jtag = IQ_GetJtagId(); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
174 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
175 #ifndef ALR |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
176 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
177 build = IQ_GetBuild(); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
178 hw = IQ_GetPoleStarVersion(); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
179 rev = IQ_GetRevision(); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
180 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
181 sprintf (buf, "Build %d, Silicon Revision %04X/%04X/%04X", |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
182 build, hw, jtag, rev); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
183 #else |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
184 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
185 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
186 jtagid_to_chipset (jtag, chipset); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
187 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
188 sprintf (buf, |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
189 "Chipset Version:\n\r\t%s\n\rS/W Versions:\n\n\r\tTI Layer1\t\t%4X\n\r\tCondat G.2-3\t\t %3X\n\r\tTI Ref. Design Release\t %3X", |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
190 chipset, |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
191 SOFTWAREVERSION, |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
192 G23VERSION, |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
193 SYSTEMVERSION); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
194 #endif |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
195 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
196 // Format output as a list of Pascal-like strings |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
197 size = strlen(buf); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
198 output[0] = size; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
199 strcpy(&(output[1]), buf); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
200 output[size+1] = (CHAR) 0xFF; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
201 sEXT_Output (src_id, ATI_EXT_CMPL_LINE, output); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
202 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
203 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
204 #endif |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
205 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
206 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
207 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
208 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
209 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
210 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
211 | PROJECT : GSM-PS (6147) MODULE : ATI_EXT_MECH | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
212 | STATE : code ROUTINE : aci_to_ext_return_map | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
213 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
214 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
215 PURPOSE : This function is used to map the ACI return values to the EXT return values |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
216 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
217 LOCAL T_ATI_EXT_RETURN aci_to_ext_return_map (T_ACI_RETURN aci_return) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
218 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
219 TRACE_FUNCTION ("aci_to_ext_return_map ()"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
220 switch (aci_return) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
221 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
222 case AT_FAIL: return ATI_EXT_FAIL; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
223 case AT_CMPL: return ATI_EXT_CMPL; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
224 case AT_EXCT: return ATI_EXT_EXCT; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
225 case AT_BUSY: return ATI_EXT_BUSY; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
226 default: return ATI_EXT_FAIL; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
227 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
228 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
229 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
230 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
231 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
232 | PROJECT : GSM-PS (6147) MODULE : ATI_EXT_MECH | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
233 | STATE : code ROUTINE : aci_to_ext_return_map | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
234 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
235 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
236 PURPOSE : This function is used to map the ATI return values to the EXT return values |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
237 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
238 LOCAL T_ATI_EXT_RETURN ati_to_ext_return_map (T_ATI_RSLT ati_return) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
239 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
240 TRACE_FUNCTION ("ati_to_ext_return_map ()"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
241 switch (ati_return) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
242 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
243 case ATI_FAIL: return ATI_EXT_FAIL; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
244 case ATI_CMPL: return ATI_EXT_CMPL; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
245 case ATI_EXCT: return ATI_EXT_EXCT; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
246 case ATI_BUSY: return ATI_EXT_BUSY; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
247 default: return ATI_EXT_FAIL; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
248 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
249 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
250 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
251 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
252 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
253 | PROJECT : GSM-PS (6147) MODULE : ATI_EXT_MECH | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
254 | STATE : code ROUTINE : ext_LeaveEXT_v2 | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
255 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
256 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
257 PURPOSE : This function is called in case the extensin mechansim |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
258 should be left finally. |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
259 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
260 LOCAL void ext_LeaveEXT_v2 ( ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
261 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
262 /*indicating that no extended AT command is still in progress*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
263 currExtCmd_v2 = AT_CMD_NONE; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
264 /*indicate end of extended command handling to the AT interpreter*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
265 /* sEXT_Finit();*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
266 sEXT_Indication (src_id_ext, EXT_LEAVE ); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
267 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
268 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
269 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
270 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
271 | PROJECT : GSM-PS (6147) MODULE : CMH_EXTS | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
272 | STATE : code ROUTINE : ext_ContinueTest_v2 | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
273 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
274 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
275 PURPOSE : This function is called in case the AT extension |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
276 procedure should be continued. |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
277 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
278 <id>: identifies the specific procedure to be continued |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
279 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
280 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
281 LOCAL void ext_ContinueTest_v2 ( CHAR* id ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
282 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
283 T_ACI_RETURN rslt; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
284 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
285 if ( strcmp ( id, EXT_DIAL_VOICE_PASS ) EQ 0 ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
286 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
287 T_ACI_D_TOC callType = D_TOC_Data; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
288 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
289 if ( extDialNum [strlen ( extDialNum ) - 1] EQ EXT_VOICE_DELIMITER ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
290 callType = D_TOC_Voice; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
291 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
292 extDialNum[strlen ( extDialNum ) - 1] = '\0'; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
293 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
294 rslt = sAT_Dn ( CMD_SRC_LCL, |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
295 extDialNum, |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
296 D_CLIR_OVRD_Default, |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
297 D_CUG_CTRL_NotPresent, |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
298 callType ); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
299 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
300 if ( rslt EQ AT_EXCT ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
301 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
302 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
303 * generate some output at the AT interface |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
304 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
305 sEXT_Indication (src_id_ext, EXT_ATD); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
306 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
307 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
308 * indicating that an extended AT command is still in progress |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
309 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
310 currExtCmd_v2 = AT_CMD_D; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
311 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
312 else if (rslt EQ AT_CMPL) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
313 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
314 sEXT_Confirm (src_id_ext); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
315 ext_LeaveEXT_v2 (); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
316 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
317 else |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
318 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
319 rCI_PlusCME ( AT_CMD_EXT, CME_ERR_Unknown ); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
320 ext_LeaveEXT_v2 (); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
321 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
322 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
323 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
324 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
325 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
326 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
327 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
328 | PROJECT : GSM-PS (6147) MODULE : CMH_EXTS | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
329 | STATE : code ROUTINE : ext_OK_v2 | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
330 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
331 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
332 PURPOSE : This function is called in case the positive |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
333 result of the asynchronous command handling is available. |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
334 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
335 <cmdId>: command identity |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
336 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
337 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
338 GLOBAL void ext_OK_v2 ( T_ACI_AT_CMD cmdId ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
339 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
340 T_ACI_RETURN rslt; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
341 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
342 if ( cmdId EQ AT_CMD_CFUN AND currAbrtCmd EQ AT_CMD_NONE ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
343 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
344 rslt = sAT_PlusCOPS ( CMD_SRC_LCL, |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
345 COPS_MOD_Auto, |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
346 COPS_FRMT_NotPresent, |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
347 NULL ); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
348 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
349 if ( rslt EQ AT_EXCT ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
350 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
351 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
352 * generate some output at the AT interface |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
353 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
354 sEXT_Output (src_id_ext, ATI_EXT_CMPL_LINE, EXT_ATCOPS_START); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
355 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
356 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
357 * indicating that an extended AT command is still in progress |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
358 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
359 currExtCmd_v2 = AT_CMD_COPS; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
360 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
361 else |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
362 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
363 ext_LeaveEXT_v2 (); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
364 sEXT_Error ( AT_CMD_EXT, CME_ERR_Unknown); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
365 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
366 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
367 else if ( cmdId EQ AT_CMD_COPS AND currAbrtCmd EQ AT_CMD_NONE ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
368 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
369 currExtCmd_v2 = AT_CMD_NONE; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
370 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
371 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
372 * generate some output at the AT interface |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
373 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
374 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
375 sEXT_Indication (AT_CMD_EXT, EXT_ATCOPS_STOP ); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
376 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
377 #ifndef WIN32 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
378 ext_ContinueTest_v2 ( EXT_DIAL_VOICE_PASS ); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
379 #endif |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
380 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
381 else if ( cmdId EQ AT_CMD_D AND currAbrtCmd EQ AT_CMD_NONE ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
382 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
383 ext_LeaveEXT_v2 (); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
384 sEXT_Confirm( AT_CMD_EXT ); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
385 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
386 else if ( currAbrtCmd NEQ AT_CMD_NONE ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
387 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
388 currAbrtCmd = AT_CMD_NONE; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
389 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
390 ext_LeaveEXT_v2 (); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
391 sEXT_Confirm( AT_CMD_EXT ); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
392 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
393 else |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
394 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
395 /*generate some output at the AT interface*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
396 sEXT_Output(src_id_ext, ATI_EXT_CMPL_LINE, EXT_UNEXPCTD); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
397 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
398 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
399 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
400 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
401 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
402 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
403 | PROJECT : GSM-PS (6147) MODULE : ATI_EXT_MECH | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
404 | STATE : code ROUTINE : rEXT_Init | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
405 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
406 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
407 PURPOSE : This function is called in the ATI initialization process. |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
408 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
409 GLOBAL T_ATI_EXT_RETURN rEXT_Init () |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
410 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
411 #ifdef _SIMULATION_ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
412 static CHAR *cmd_list[] = {"$A", "$B", "%TA", NULL}; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
413 #else /*_SIMULATION_*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
414 static CHAR *cmd_list[] = {NULL}; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
415 //static CHAR *cmd_list[] = {"$A", "$B", "%TA", NULL}; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
416 #endif /*_SIMULATION_*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
417 TRACE_FUNCTION ("rEXT_Init ()"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
418 if (sEXT_Init (cmd_list) EQ ATI_CMPL) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
419 return ATI_EXT_CMPL; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
420 else |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
421 return ATI_EXT_FAIL; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
422 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
423 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
424 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
425 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
426 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
427 | PROJECT : GSM-PS (6147) MODULE : ATI_EXT_MECH | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
428 | STATE : code ROUTINE : rAT_EXT | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
429 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
430 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
431 PURPOSE : This function is called by ATI in case of the detection of an |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
432 unknown command. |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
433 <src_id> : source Id |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
434 <cmd> : remaining unparsed command string. |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
435 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
436 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
437 GLOBAL T_ATI_EXT_RETURN rEXT_Execute (UBYTE src_id, CHAR *cmd) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
438 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
439 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
440 TRACE_FUNCTION ("rEXT_Execute ()"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
441 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
442 /*example how to process the command AT$A*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
443 if (*cmd EQ '$') |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
444 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
445 cmd++; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
446 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
447 switch (*cmd++) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
448 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
449 T_ATI_RSLT output_rslt; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
450 case 'A': /*print out string "Hello World"*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
451 output_rslt = ATI_FAIL; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
452 if (*cmd EQ '\0') |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
453 output_rslt = sEXT_Output (src_id, ATI_EXT_CMPL_LINE, "Hello World!"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
454 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
455 if (*cmd EQ '=' AND *(cmd+1) EQ '0') |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
456 output_rslt = sEXT_Output (src_id, ATI_EXT_CMPL_LINE, "AT$A is set to off."); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
457 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
458 if (*cmd EQ '=' AND *(cmd+1) EQ '1') |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
459 output_rslt = sEXT_Output (src_id, ATI_EXT_CMPL_LINE, "AT$A is set to on."); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
460 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
461 if (*cmd EQ '=' AND *(cmd+1) EQ '?') |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
462 output_rslt = sEXT_Output (src_id, ATI_EXT_CMPL_LINE, "$A: 0, 1"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
463 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
464 return (ati_to_ext_return_map (output_rslt)); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
465 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
466 case 'B': /*print out a complete string part by part*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
467 sEXT_Output(src_id, ATI_EXT_PART_BEGIN, "This is "); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
468 sEXT_Output(src_id, ATI_EXT_PART_LINE, "a complete "); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
469 sEXT_Output(src_id, ATI_EXT_PART_LAST, "line. "); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
470 return (ATI_EXT_CMPL); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
471 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
472 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
473 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
474 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
475 * example how to process the command AT% commands |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
476 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
477 if (*cmd EQ '%') |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
478 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
479 sEXT_Output (src_id, ATI_EXT_CMPL_LINE, EXT_ENTER); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
480 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
481 cmd++; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
482 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
483 switch (*cmd) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
484 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
485 case 'T': |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
486 case 't': |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
487 /*Enables RTC or AUDIO tests */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
488 cmd++; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
489 if (!strncmp(cmd, "A", 1) || !strncmp(cmd, "a", 1)) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
490 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
491 sEXT_Output (src_id, ATI_EXT_CMPL_LINE, "Performing Audio Tests"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
492 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
493 else |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
494 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
495 if (!strncmp(cmd, "R", 1) || !strncmp(cmd, "r", 1)) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
496 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
497 sEXT_Output (src_id, ATI_EXT_CMPL_LINE, "Performing RTC Tests"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
498 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
499 else |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
500 return( ATI_EXT_FAIL ); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
501 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
502 return( ATI_EXT_CMPL ); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
503 default: |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
504 return ( ATI_EXT_FAIL ); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
505 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
506 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
507 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
508 else if ( *cmd EQ 'D' ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
509 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
510 T_ACI_RETURN rslt; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
511 size_t sl1=strlen(cmd); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
512 TRACE_EVENT ("ATD in extension mechanism."); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
513 strncpy ( extDialNum, cmd + 1, MINIMUM ( (MAX_CC_ORIG_NUM_LEN - 1), (sl1 - 1) ) ); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
514 extDialNum[MINIMUM ( (MAX_CC_ORIG_NUM_LEN - 1), (sl1 - 1) )] = '\0'; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
515 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
516 rslt = sAT_PlusCFUN ( CMD_SRC_LCL, CFUN_FUN_Full, CFUN_RST_NotPresent ); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
517 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
518 if ( rslt EQ AT_EXCT ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
519 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
520 /*generate some output at the AT interface*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
521 sEXT_Output (src_id, ATI_EXT_CMPL_LINE, EXT_ATCFUN); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
522 /*indicating that an extended AT command is still in progress*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
523 currExtCmd_v2 = AT_CMD_CFUN; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
524 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
525 if (rslt EQ AT_FAIL) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
526 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
527 sEXT_Indication(src_id, EXT_LEAVE); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
528 sEXT_Error (src_id, CME_ERR_Unknown); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
529 return ATI_EXT_FAIL; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
530 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
531 else if (rslt EQ AT_CMPL) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
532 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
533 ext_LeaveEXT_v2 (); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
534 return ATI_EXT_CMPL; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
535 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
536 return ( aci_to_ext_return_map (rslt)); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
537 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
538 return ATI_EXT_FAIL; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
539 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
540 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
541 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
542 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
543 | PROJECT : GSM-PS (6147) MODULE : ATI_EXT_MECH | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
544 | STATE : code ROUTINE : rEXT_Abort | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
545 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
546 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
547 PURPOSE : This function is called by the ATI in case of aborting a pending |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
548 extension command. |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
549 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
550 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
551 GLOBAL T_ATI_EXT_RETURN rEXT_Abort (UBYTE src_id) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
552 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
553 T_ACI_RETURN rslt = AT_CMPL; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
554 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
555 TRACE_FUNCTION ("rEXT_Abort ()"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
556 /* call the abort function if necessary */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
557 if ( currExtCmd_v2 NEQ AT_CMD_NONE ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
558 rslt = sAT_Abort ((T_ACI_CMD_SRC)src_id, currExtCmd_v2 ); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
559 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
560 switch ( rslt ) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
561 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
562 case ( AT_CMPL ): |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
563 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
564 currExtCmd_v2 = AT_CMD_NONE; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
565 sEXT_Indication(src_id, cmdAtError(atOk)); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
566 ext_LeaveEXT_v2(); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
567 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
568 break; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
569 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
570 case ( AT_EXCT ): |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
571 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
572 currExtCmd_v2 = AT_CMD_ABRT; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
573 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
574 break; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
575 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
576 default: |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
577 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
578 /* do nothing */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
579 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
580 break; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
581 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
582 return aci_to_ext_return_map (rslt); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
583 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
584 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
585 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
586 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
587 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
588 | PROJECT : GSM-PS (6147) MODULE : ATI_EXT_MECH | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
589 | STATE : code ROUTINE : rEXT_Signal | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
590 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
591 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
592 PURPOSE : This function is called by the ATI when an extension signal is received. |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
593 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
594 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
595 GLOBAL T_ATI_EXT_RETURN rEXT_Signal (T_ACI_EXT_IND *aci_ext_ind) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
596 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
597 TRACE_FUNCTION ("rEXT_Signal ()"); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
598 /*The handling of the extension signal can be done here.*/ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
599 sEXT_Output (CMD_SRC_ATI_5, ATI_EXT_CMPL_LINE, "This is an extension signal."); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
600 return ATI_EXT_CMPL; |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
601 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
602 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
603 #ifdef FF_BAT |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
604 /* |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
605 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
606 | PROJECT : GSM-PS (6147) MODULE : ATI_EXT_MECH | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
607 | STATE : code ROUTINE : rEXT_Response_BAT | |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
608 +--------------------------------------------------------------------+ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
609 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
610 PURPOSE : This function is called by BAT Module when customer stuff |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
611 is asynchronously received. |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
612 */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
613 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
614 GLOBAL T_ATI_EXT_RETURN rEXT_Response_BAT (UBYTE src_id, T_BAT_cmd_response *resp) |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
615 { |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
616 return(ATI_EXT_CMPL); |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
617 } |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
618 #endif |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
619 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
620 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
621 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
622 #endif /* ATI_EXT_MECH_C */ |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
623 |
8eea89c37047
gsm-fw/g23m-aci/ati_ext: imported from LoCosto source
Michael Spacefalcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
624 |