FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/g23m-glue/cst/cst_exts.c @ 843:7666dd5df2bc
gsm-fw: libgdi.a added to the link with CONFIG_INCLUDE_PS
gtamodem-gsm build almost passes, now only CST is missing
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Sat, 25 Apr 2015 19:49:37 +0000 |
parents | c14bc60c6c30 |
children | 21247e7d0b8d |
rev | line source |
---|---|
832
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 | PROJECT: GSM-F&D (8411) $Workfile:: CST_EXTS.C $| |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 | $Author:: Sa $ CONDAT GmbH $Revision:: 7 $| |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 | CREATED: 03.08.99 $Modtime:: 14.02.00 16:06 $| |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 | STATE : code | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 MODULE : CST_EXTS |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 PURPOSE : This Modul defines the custom specific AT commands |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 #ifndef CST_EXTS_C |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 #define CST_EXTS_C |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 #include "config/swconfig.cfg" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 #include "config/chipset.cfg" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 #include "config/l1sw.cfg" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 #define ENTITY_CST |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 /*==== INCLUDES ===================================================*/ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 #include <stdlib.h> |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 #include <string.h> |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 #include <stdio.h> |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 #include "typedefs.h" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 #include "m_sms.val" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 #include "m_fac.h" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 #include "p_mnsms.h" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 #include "p_mmreg.h" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 #include "p_mncc.h" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 #include "aci_cmh.h" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 #include "vsi.h" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 #include "gsm.h" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 #include "p_cst.h" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 #include "cst/cst.h" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 #include "custom.h" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 #ifdef ALR |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 #include "main/sys_ver.h" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 /*==== MELODY TEST ==================================================*/ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 #define MELODY_E1 0 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 extern void enable_tch_vocoder(BOOL vocoder); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 #if (MELODY_E1) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 extern void audio_melo_e1_demo1_start(void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 extern void audio_melo_e1_demo1_stop(void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 extern void audio_melo_e1_demo2_start(void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 extern void audio_melo_e1_demo2_stop(void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 #if (MELODY_E2) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 extern void audio_melo_e2_load_lsi(void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 extern void audio_melo_e2_demo1_start(void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 extern void audio_melo_e2_demo1_stop(void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 extern void audio_melo_e2_demo2_start(void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 extern void audio_melo_e2_demo2_stop(void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 /*==== CONSTANTS ==================================================*/ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 #define EXT_ATD "EXT: D, I" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 #define EXT_ATCFUN "EXT: +CFUN, I" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 #define EXT_ATCOPS_START "EXT: +COPS, I" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 #define EXT_ATCOPS_STOP "EXT: +COPS, O" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 #define EXT_ENTER "EXT: I" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 #define EXT_LEAVE "EXT: O" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 #define EXT_UNEXPCTD "EXT: E" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 #define EXT_DIAL_VOICE_PASS "DVCP" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 #define EXT_MAX_BUF_LEN 41 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 #define EXT_VOICE_DELIMITER ';' |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
87 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
88 /*==== EXPORT =====================================================*/ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
89 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
90 /*==== TYPES ======================================================*/ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
92 #ifndef WIN32 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
93 extern USHORT IQ_GetBuild(void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
94 #ifndef ALR |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
95 extern USHORT IQ_GetPoleStarVersion(void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
96 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
97 extern USHORT IQ_GetJtagId(void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
98 extern USHORT IQ_GetRevision(void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
99 extern void l1dmacro_init_hw(void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
100 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
101 extern BOOL SER_WriteConfig (char *new_config, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
102 BOOL write_to_flash); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
103 extern BOOL SER_ImmediateSwitch (void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
104 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
105 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 LOCAL CHAR* percentCFG ( CHAR* cmd ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
107 LOCAL CHAR* percentDBG ( CHAR* cmd ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
108 LOCAL void ext_LeaveEXT ( BOOL final ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
109 LOCAL void ext_CreatePString ( CHAR* buffer, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
110 CHAR* text ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
111 GLOBAL void ext_ContinueTest ( CHAR* id ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
112 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
113 /*==== VARIABLES ==================================================*/ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
114 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
115 LOCAL CHAR* extCmd; /* remaining unparsed command string, */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
116 /* will be needed in case of asynchronous */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
117 /* command handling */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
118 LOCAL USHORT extCmdLen; /* length of command string, will be */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
119 /* needed in case of asynchronous */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
120 /* command handling */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
121 LOCAL CHAR extBuffer[EXT_MAX_BUF_LEN]; /* outbut buffer */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
122 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
123 LOCAL CHAR extDialNum[MAX_PHB_NUM_LEN]; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
124 /* number to be dialled during testing */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
125 GLOBAL SHORT extCallId = ACI_NumParmNotPresent; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
126 /* identifier of the call which was */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
127 /* set-up using AT extension mechansim */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
128 GLOBAL T_ACI_AT_CMD currExtCmd = AT_CMD_NONE; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
129 /* used for indicating asynchronous */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
130 /* command handling */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
131 LOCAL T_ACI_AT_CMD currAbrtCmd = AT_CMD_NONE; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
132 /* used for indicating abort of */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
133 /* asynchronous command handling */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
134 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
135 /*==== FUNCTIONS ==================================================*/ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
136 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
137 USHORT * csf_return_adc (void); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
138 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
139 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
140 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
141 | PROJECT : GSM-PS (8403) MODULE : TIL_CSF | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
142 | STATE : code ROUTINE : cmh_show_version | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
143 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
144 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
145 PURPOSE : Trace Layer 1 DSP version numbers |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
146 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
147 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
148 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
149 #ifndef WIN32 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
150 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
151 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
152 static void jtagid_to_chipset (USHORT jtagid, CHAR *chipset) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
153 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
154 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
155 switch (jtagid) { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
156 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
157 case 0xB268: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
158 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
159 strcpy (chipset, "Hercules"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
160 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
161 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
162 case 0xB2B5: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
163 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
164 strcpy (chipset, "Ulysse 1Mbits rev. B"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
165 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
166 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
167 case 0xB335: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
168 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
169 strcpy (chipset, "Ulysse 1Mbits rev. A"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
170 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
171 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
172 case 0xB334: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
173 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
174 strcpy (chipset, "Ulysse 2Mbits"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
175 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
176 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
177 case 0xB393: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
178 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
179 strcpy (chipset, "Ulysse G1"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
180 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
181 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
182 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
183 case 0xB396: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
184 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
185 strcpy (chipset, "Calypso rev. B"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
186 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
187 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
188 case 0xB2AC: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
189 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
190 // Samson and Calypso rev. A share the same JTAG ID. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
191 #if (CHIPSET != 7) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
192 strcpy (chipset, "Samson"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
193 #else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
194 strcpy (chipset, "Calypso rev. A"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
195 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
196 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
197 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
198 case 0xB217: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
199 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
200 strcpy (chipset, "Ulysse C035"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
201 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
202 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
203 case 0xB496: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
204 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
205 strcpy (chipset, "Calypso C035"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
206 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
207 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
208 case 0xB4FB: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
209 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
210 strcpy (chipset, "Calypso Lite C035"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
211 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
212 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
213 default: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
214 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
215 strcpy (chipset, "Unknown"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
216 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
217 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
218 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
219 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
220 GLOBAL void cmh_show_version ( |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
221 CHAR *command, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
222 USHORT *len, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
223 CHAR *output |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
224 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
225 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
226 #ifndef ALR |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
227 CHAR buf[80]; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
228 USHORT build, hw, rev; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
229 #else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
230 CHAR buf[160]; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
231 CHAR chipset[25]; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
232 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
233 USHORT jtag; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
234 UCHAR size; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
235 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
236 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
237 * Retrieve hardware JTAG ID info |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
238 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
239 jtag = IQ_GetJtagId(); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
240 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
241 #ifndef ALR |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
242 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
243 * Retrieve others hardware info and build from library |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
244 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
245 build = IQ_GetBuild(); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
246 hw = IQ_GetPoleStarVersion(); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
247 rev = IQ_GetRevision(); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
248 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
249 sprintf (buf, "Build %d, Silicon Revision %04X/%04X/%04X", |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
250 build, hw, jtag, rev); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
251 #else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
252 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
253 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
254 * Retrieve CHIPSET name from JTAG ID |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
255 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
256 jtagid_to_chipset (jtag, chipset); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
257 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
258 sprintf (buf, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
259 "Chipset Version:\n\r\t%s\n\rS/W Versions:\n\n\r\tLayer1\t%4X_%3X\n\r\tLayer2-3 %3XBERLIN_S420\n\r\tNICE\t %3X_I64", |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
260 chipset, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
261 OFFICIAL_VERSION, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
262 INTERNAL_VERSION, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
263 G23VERSION, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
264 SYSTEMVERSION); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
265 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
266 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
267 // Format output as a list of Pascal-like strings |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
268 size = strlen(buf); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
269 output[0] = size; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
270 strcpy(&(output[1]), buf); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
271 output[size+1] = (CHAR) 0xFF; // terminate list of strings |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
272 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
273 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
274 #endif /* #ifndef WIN32 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
275 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
276 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
277 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
278 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
279 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
280 | PROJECT : GSM-PS (8403) MODULE : TIL_CSF | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
281 | STATE : code ROUTINE : show_adc_conversion | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
282 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
283 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
284 PURPOSE : Trace Layer 1 AD conversions results |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
285 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
286 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
287 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
288 GLOBAL void show_adc_conversion (CHAR *output) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
289 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
290 USHORT * adc_conversion; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
291 #ifdef ALR |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
292 CHAR buf[160]; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
293 #else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
294 CHAR buf[80]; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
295 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
296 UCHAR size; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
297 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
298 adc_conversion = csf_return_adc (); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
299 #ifdef ALR |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
300 sprintf (buf, "ADC 0 = %x, ADC 1 = %x, ADC 2 = %x, ADC 3 = %x, ADC 4 = %x, ADC 5 = %x, ADC 6 = %x, ADC 7 = %x, ADC 8 = %x", |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
301 *adc_conversion++, *adc_conversion++, *adc_conversion++, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
302 *adc_conversion++, *adc_conversion++, *adc_conversion++, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
303 *adc_conversion++, *adc_conversion++, *adc_conversion); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
304 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
305 #else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
306 sprintf (buf, "ADC 0 = %x, ADC 1 = %x, ADC 2 = %x, ADC 3 = %x, ADC 4 = %x", |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
307 *adc_conversion++, *adc_conversion++, *adc_conversion++, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
308 *adc_conversion++, *adc_conversion); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
309 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
310 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
311 // Format output as a list of Pascal-like strings |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
312 size = strlen(buf); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
313 output[0] = size; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
314 strcpy(&(output[1]), buf); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
315 output[size+1] = (CHAR) 0xFF; // terminate list of strings |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
316 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
317 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
318 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
319 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
320 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
321 | PROJECT : GSM-PS (8403) MODULE : CST_EXTS | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
322 | STATE : code ROUTINE : AEC_Enable | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
323 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
324 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
325 PURPOSE : activate the Acoustic Echo Cancelation |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
326 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
327 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
328 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
329 GLOBAL void AEC_Enable (CHAR *command, CHAR *output) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
330 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
331 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
332 /* -------------------------------------------------------------------------- */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
333 /* MMI_AEC_REQ : 0283 = Long AEC, 105 = SPENH, 187 = AEC+SPENH, 1 = STOP */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
334 /* aec_control register bits | 0 0 Sa t2|t1 g3 g2 g1|g0 e2 e1 ak| */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
335 /* bit 0 : ACK bit : set to 1 in order to warn DSP that a new command */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
336 /* is present. */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
337 /* bit 1 : enable AEC */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
338 /* bit 2 : enable SPENH (= Speech Enhancement = noise reduction) */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
339 /* bit 3 : additionnal AEC gain attenuation (lsb) */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
340 /* bit 4 : additionnal AEC gain attenuation (msb) */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
341 /* bit 5 : additionnal SPENH gain attenuation (lsb) */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
342 /* bit 6 : additionnal SPENH gain attenuation (msb) */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
343 /* bit 7 : reset trigger for AEC */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
344 /* bit 8 : reset trigger for SPENH */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
345 /* bit 9 : AEC selector 0 : short AEC, 1 : long AEC */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
346 /* */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
347 /* for Short AEC 0083 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
348 /* for long AEC 0283 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
349 /* for long AEC -6 dB 028B */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
350 /* for long AEC -12 dB 0293 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
351 /* for long AEC -18 dB 029B */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
352 /* for SPENH 0105 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
353 /* for SPENH -6 dB 0125 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
354 /* for SPENH -12 dB 0145 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
355 /* for SPENH -18 dB 0165 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
356 /* for BOTH 0187 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
357 /* for STOP ALL 0001 (all bits reset + ACK to 1 to warn the DSP) */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
358 /* -------------------------------------------------------------------------- */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
359 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
360 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
361 command++; /* increment command pointer to point on the hexa value of the command */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
362 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
363 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
364 if (!strncmp(command, "0083", 4)) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
365 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
366 output[0] = strlen ("Short AEC is active"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
367 memcpy (&output[1], "Short AEC is active", 19); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
368 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
369 /* end of string list */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
370 output [20] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
371 csf_aec_enable(0x0083); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
372 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
373 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
374 else if (!strncmp(command, "0283", 4)) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
375 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
376 output[0] = strlen ("Long AEC is active"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
377 memcpy (&output[1], "Long AEC is active", 18); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
378 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
379 /* end of string list */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
380 output [19] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
381 csf_aec_enable(0x0283); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
382 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
383 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
384 else if (!strncmp(command, "028B", 4)) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
385 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
386 output[0] = strlen ("Long AEC -6 dB is active"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
387 memcpy (&output[1], "Long AEC -6 dB is active", 24); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
388 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
389 /* end of string list */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
390 output [25] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
391 csf_aec_enable(0x028B); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
392 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
393 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
394 else if (!strncmp(command, "0293", 4)) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
395 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
396 output[0] = strlen ("Long AEC -12 dB is active"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
397 memcpy (&output[1], "Long AEC -12 dB is active", 25); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
398 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
399 /* end of string list */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
400 output [26] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
401 csf_aec_enable(0x0293); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
402 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
403 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
404 else if (!strncmp(command, "029B", 4)) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
405 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
406 output[0] = strlen ("Long AEC -18 dB is active"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
407 memcpy (&output[1], "Long AEC -18 dB is active", 25); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
408 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
409 /* end of string list */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
410 output [26] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
411 csf_aec_enable(0x029B); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
412 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
413 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
414 else if (!strncmp(command, "0105", 4)) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
415 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
416 output[0] = strlen ("Noise reduction is active"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
417 memcpy (&output[1], "Noise reduction is active", 25); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
418 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
419 /* end of string list */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
420 output [26] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
421 csf_aec_enable(0x0105); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
422 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
423 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
424 else if (!strncmp(command, "0125", 4)) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
425 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
426 output[0] = strlen ("Noise reduction -6 dB is active"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
427 memcpy (&output[1], "Noise reduction -6 dB is active", 31); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
428 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
429 /* end of string list */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
430 output [32] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
431 csf_aec_enable(0x0125); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
432 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
433 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
434 else if (!strncmp(command, "0145", 4)) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
435 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
436 output[0] = strlen ("Noise reduction -12 dB is active"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
437 memcpy (&output[1], "Noise reduction -12 dB is active", 32); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
438 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
439 /* end of string list */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
440 output [33] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
441 csf_aec_enable(0x0145); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
442 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
443 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
444 else if (!strncmp(command, "0165", 4)) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
445 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
446 output[0] = strlen ("Noise reduction -18 dB is active"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
447 memcpy (&output[1], "Noise reduction -18 dB is active", 32); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
448 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
449 /* end of string list */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
450 output [33] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
451 csf_aec_enable(0x0165); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
452 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
453 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
454 else if (!strncmp(command, "0187", 4)) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
455 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
456 output[0] = strlen ("Both AEC and Noise reduction are active"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
457 memcpy (&output[1], "Both AEC and Noise reduction are active", 39); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
458 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
459 /* end of string list */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
460 output [40] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
461 csf_aec_enable(0x0187); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
462 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
463 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
464 else if (!strncmp(command, "0001", 4)) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
465 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
466 output[0] = strlen ("AEC and Noise reduction are unactivated"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
467 memcpy (&output[1], "AEC and Noise reduction are unactivated", 39); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
468 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
469 /* end of string list */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
470 output [40] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
471 csf_aec_enable(0x0001); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
472 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
473 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
474 else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
475 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
476 output[0] = strlen ("Bad AT command"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
477 memcpy (&output[1], "Bad AT command", 14); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
478 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
479 /* end of string list */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
480 output [15] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
481 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
482 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
483 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
484 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
485 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
486 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
487 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
488 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
489 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
490 | PROJECT : GSM-PS (6147) MODULE : CST_EXTS | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
491 | STATE : code ROUTINE : rAT_EXT | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
492 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
493 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
494 PURPOSE : This function is called by the interpreter part of the |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
495 ACI in case of the detection of an unknown command. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
496 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
497 <cmd> : remaining unparsed command string. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
498 <cmdLen> : length of command string. This value must be |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
499 incremented by the amount of parsed characters |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
500 by this function. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
501 <out> : this parameter can be used to display some |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
502 strings at the AT command interface. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
503 The first char of one string must contain |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
504 the length of the following string. The |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
505 special length 0xff must be used to define |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
506 the end of the string list. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
507 <outLen> : maximum length of output buffer referenced |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
508 by parameter <out>. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
509 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
510 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
511 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
512 GLOBAL T_ACI_RETURN rAT_EXT ( |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
513 CHAR* cmd, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
514 USHORT* cmdLen, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
515 CHAR* out, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
516 USHORT outLen |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
517 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
518 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
519 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
520 * store command string in case it will be needed later on, when |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
521 * result code of this function is equal to AT_EXCT |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
522 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
523 extCmd = cmd; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
524 extCmdLen = *cmdLen; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
525 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
526 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
527 * example how to send an unsolicited result code via the AT interface |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
528 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
529 ext_CreatePString ( extBuffer, EXT_ENTER ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
530 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
531 sAT_URC ( extBuffer ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
532 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
533 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
534 * example how to process the command AT%H |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
535 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
536 if (*cmd == '%') |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
537 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
538 cmd++; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
539 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
540 switch (*cmd) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
541 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
542 case 'A': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
543 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
544 * Display AD conversions results |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
545 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
546 *cmdLen -= 2; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
547 show_adc_conversion(out); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
548 return( AT_CMPL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
549 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
550 case 'C': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
551 case 'c': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
552 case 'D': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
553 case 'd': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
554 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
555 CHAR* nextCmd; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
556 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
557 *cmdLen -= 2; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
558 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
559 switch ( *cmd ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
560 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
561 case 'C': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
562 case 'c': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
563 /* dynamic configuration via AT command interface */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
564 nextCmd = percentCFG ( ++cmd ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
565 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
566 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
567 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
568 case 'D': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
569 case 'd': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
570 /* set debug pin for reset purposes */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
571 nextCmd = percentDBG ( ++cmd ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
572 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
573 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
574 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
575 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
576 *out = ( CHAR ) 0xFF; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
577 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
578 if ( nextCmd EQ NULL ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
579 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
580 return ( AT_FAIL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
581 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
582 else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
583 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
584 *cmdLen -= ( nextCmd - cmd ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
585 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
586 return ( AT_CMPL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
587 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
588 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
589 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
590 case 'N': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
591 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
592 * Enables the AEC by sending a primitive to L1A |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
593 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
594 *cmdLen -= 6; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
595 AEC_Enable(cmd, out); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
596 return( AT_CMPL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
597 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
598 //---------------------------------------------------------------------------// |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
599 // Added by Matthieu Vanin for the test of melody E2/E1 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
600 //---------------------------------------------------------------------------// |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
601 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
602 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
603 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
604 // End |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
605 //---------------------------------------------------------------------------// |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
606 case 'S': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
607 case 's': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
608 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
609 cmd++; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
610 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
611 switch (*cmd) { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
612 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
613 case 'e': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
614 case 'E': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
615 /* 's''e' already detected => assume the command is at%ser. */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
616 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
617 cmd += 3; /* Discard the following characters */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
618 *cmdLen -= 9; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
619 if (SER_WriteConfig (cmd, (BOOL) (*(cmd + 3) - '0'))) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
620 return( AT_CMPL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
621 else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
622 return( AT_FAIL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
623 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
624 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
625 case 'w': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
626 case 'W': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
627 /* 's''w' already detected => assume the command is at%switch. */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
628 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
629 *cmdLen -= 7; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
630 if (SER_ImmediateSwitch()) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
631 return( AT_CMPL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
632 else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
633 return( AT_FAIL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
634 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
635 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
636 case 'l': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
637 case 'L': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
638 /* 's''l' already detected => assume the command is at%sleep. */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
639 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
640 cmd += 5; /* Discard the following characters */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
641 *cmdLen -= 8; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
642 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
643 * Checks if the parameter is valid: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
644 * 0 -> NO_SLEEP |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
645 * 1 -> SMALL_SLEEP |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
646 * 2 -> BIG_SLEEP |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
647 * 3 -> DEEP_SLEEP |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
648 * 4 -> ALL_SLEEP |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
649 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
650 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
651 if (((*cmd - '0') >= 0) && ((*cmd - '0') <= 4)) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
652 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
653 power_down_config ((UBYTE) (*cmd - '0'), UWIRE_CLK_CUT); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
654 return( AT_CMPL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
655 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
656 else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
657 return( AT_FAIL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
658 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
659 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
660 default: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
661 *cmdLen -= 2; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
662 return ( AT_FAIL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
663 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
664 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
665 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
666 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
667 case 'H': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
668 *cmdLen -= 2; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
669 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
670 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
671 * here you can perform some actions with drivers etc. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
672 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
673 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
674 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
675 * and create some additional output at the AT interface |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
676 * The strings: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
677 *"Hello" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
678 *"" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
679 *"World" |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
680 * will be displayed at the terminal. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
681 * |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
682 * first string Hello |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
683 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
684 out[0] = strlen ("Hello"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
685 memcpy (&out[1], "Hello", 5); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
686 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
687 * add a spare line with an empty string |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
688 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
689 out [6] = 0; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
690 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
691 * second string World |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
692 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
693 out [7] = strlen ("World"); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
694 memcpy (&out[8], "World", 5); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
695 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
696 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
697 * end of string list |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
698 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
699 out [13] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
700 return( AT_CMPL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
701 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
702 #ifndef WIN32 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
703 case 'R': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
704 case 'r': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
705 *cmdLen -= 2; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
706 l1dmacro_init_hw(); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
707 out[0] = 0; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
708 out[1] = (CHAR) 0xFF; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
709 return( AT_CMPL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
710 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
711 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
712 #ifndef WIN32 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
713 case 'V': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
714 case 'v': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
715 *cmdLen -= 2; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
716 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
717 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
718 * Display version numbers |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
719 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
720 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
721 cmh_show_version (cmd, cmdLen, out); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
722 return( AT_CMPL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
723 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
724 #if defined (ALR) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
725 case 'T': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
726 case 't': |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
727 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
728 * Enables RTC or AUDIO tests |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
729 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
730 cmd++; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
731 *cmdLen -= 3; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
732 if (!strncmp(cmd, "A", 1) || !strncmp(cmd, "a", 1)) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
733 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
734 //audio_test_misc(); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
735 out[0] = 22; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
736 memcpy (&out[1], "Performing Audio Tests", 22); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
737 out [23] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
738 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
739 else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
740 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
741 if (!strncmp(cmd, "R", 1) || !strncmp(cmd, "r", 1)) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
742 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
743 //rtc_test_misc(); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
744 out[0] = 20; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
745 memcpy (&out[1], "Performing RTC Tests", 20); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
746 out [21] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
747 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
748 else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
749 return( AT_FAIL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
750 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
751 return( AT_CMPL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
752 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
753 default: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
754 *cmdLen -= 2; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
755 return ( AT_FAIL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
756 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
757 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
758 else if ( *cmd EQ 'D' ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
759 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
760 T_ACI_RETURN rslt; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
761 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
762 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
763 * this is only a test implementation. As soon as a "ATD" command |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
764 * string is detected in the AT interpreter and the mobile is not |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
765 * yet registered (neither limited nor full service is availbale) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
766 * this function is called. Then instead of dialling immediately |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
767 * an activation of the mobile is performed in advance. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
768 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
769 strncpy ( extDialNum, cmd + 1, MINIMUM ( MAX_PHB_NUM_LEN - 1, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
770 *cmdLen - 1 ) ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
771 extDialNum[MINIMUM ( MAX_PHB_NUM_LEN - 1, *cmdLen - 1 )] = '\0'; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
772 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
773 extCmdLen = 0; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
774 *cmdLen = 0; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
775 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
776 rslt = sAT_PlusCFUN ( CMD_SRC_LCL, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
777 CFUN_FUN_Full, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
778 CFUN_RST_NotPresent ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
779 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
780 if ( rslt EQ AT_EXCT ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
781 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
782 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
783 * generate some output at the AT interface |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
784 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
785 ext_CreatePString ( out, EXT_ATCFUN ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
786 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
787 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
788 * indicating that an extended AT command is still in progress |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
789 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
790 currExtCmd = AT_CMD_CFUN; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
791 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
792 else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
793 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
794 ext_LeaveEXT ( TRUE ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
795 rCI_PlusCME ( AT_CMD_EXT, CME_ERR_Unknown ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
796 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
797 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
798 return ( rslt ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
799 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
800 else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
801 return( AT_FAIL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
802 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
803 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
804 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
805 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
806 | PROJECT : GSM-PS (6147) MODULE : CST_EXTS | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
807 | STATE : code ROUTINE : percentCFG | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
808 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
809 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
810 PURPOSE : %CFG command (enables dynamic configuration of the |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
811 protocol stack using the AT command interface) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
812 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
813 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
814 EXTERN char *parse (char *b, char *f, ...); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
815 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
816 GLOBAL SHORT cc_pei_config (char * inString, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
817 char * outString); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
818 GLOBAL SHORT cst_pei_config (char * inString, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
819 char * outString); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
820 GLOBAL SHORT dl_pei_config (char * inString, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
821 char * outString); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
822 GLOBAL SHORT mm_pei_config (char * inString, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
823 char * outString); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
824 GLOBAL SHORT rr_pei_config (char * inString, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
825 char * outString); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
826 GLOBAL SHORT sim_pei_config (char * inString, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
827 char * outString); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
828 GLOBAL SHORT sms_pei_config (char * inString, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
829 char * outString); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
830 GLOBAL SHORT ss_pei_config (char * inString, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
831 char * outString); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
832 GLOBAL SHORT pl_pei_config (char * inString, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
833 char * outString); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
834 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
835 #ifdef FAX_AND_DATA |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
836 GLOBAL SHORT fad_pei_config (char * inString, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
837 char * outString); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
838 GLOBAL SHORT l2r_pei_config (char * inString, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
839 char * outString); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
840 GLOBAL SHORT ra_pei_config (char * inString, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
841 char * outString); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
842 GLOBAL SHORT rlp_pei_config (char * inString, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
843 char * outString); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
844 GLOBAL SHORT t30_pei_config (char * inString, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
845 char * outString); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
846 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
847 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
848 GLOBAL CHAR* percentCFG ( CHAR* cl ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
849 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
850 CHAR entity[5]; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
851 CHAR config[40]; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
852 CHAR dummy; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
853 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
854 TRACE_FUNCTION ( "percentCFG()" ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
855 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
856 switch ( *cl ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
857 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
858 case('='): |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
859 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
860 cl++; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
861 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
862 cl = parse ( cl, "ss", ( LONG )sizeof(entity), entity, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
863 ( LONG )sizeof(config), config ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
864 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
865 if( !cl OR |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
866 *entity EQ '\0' OR |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
867 *config EQ '\0' ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
868 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
869 return ( NULL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
870 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
871 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
872 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
873 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
874 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
875 default: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
876 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
877 return ( NULL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
878 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
879 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
880 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
881 if ( strcmp ( entity, CC_NAME ) EQ 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
882 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
883 cc_pei_config ( config, &dummy ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
884 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
885 else if ( strcmp ( entity, CST_NAME ) EQ 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
886 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
887 cst_pei_config ( config, &dummy ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
888 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
889 else if ( strcmp ( entity, DL_NAME ) EQ 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
890 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
891 dl_pei_config ( config, &dummy ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
892 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
893 else if ( strcmp ( entity, MM_NAME ) EQ 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
894 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
895 mm_pei_config ( config, &dummy ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
896 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
897 else if ( strcmp ( entity, RR_NAME ) EQ 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
898 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
899 rr_pei_config ( config, &dummy ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
900 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
901 else if ( strcmp ( entity, SIM_NAME ) EQ 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
902 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
903 sim_pei_config ( config, &dummy ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
904 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
905 else if ( strcmp ( entity, SMS_NAME ) EQ 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
906 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
907 sms_pei_config ( config, &dummy ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
908 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
909 else if ( strcmp ( entity, SS_NAME ) EQ 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
910 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
911 ss_pei_config ( config, &dummy ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
912 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
913 else if ( strcmp ( entity, PL_NAME ) EQ 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
914 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
915 pl_pei_config ( config, &dummy ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
916 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
917 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
918 #ifdef FAX_AND_DATA |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
919 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
920 else if ( strcmp ( entity, FAD_NAME ) EQ 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
921 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
922 fad_pei_config ( config, &dummy ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
923 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
924 else if ( strcmp ( entity, L2R_NAME ) EQ 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
925 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
926 l2r_pei_config ( config, &dummy ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
927 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
928 else if ( strcmp ( entity, RA_NAME ) EQ 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
929 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
930 ra_pei_config ( config, &dummy ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
931 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
932 else if ( strcmp ( entity, RLP_NAME ) EQ 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
933 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
934 rlp_pei_config ( config, &dummy ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
935 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
936 else if ( strcmp ( entity, T30_NAME ) EQ 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
937 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
938 t30_pei_config ( config, &dummy ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
939 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
940 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
941 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
942 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
943 else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
944 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
945 return ( NULL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
946 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
947 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
948 return ( cl ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
949 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
950 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
951 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
952 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
953 | PROJECT : GSM-PS (6147) MODULE : CST_EXTS | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
954 | STATE : code ROUTINE : percentDBG | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
955 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
956 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
957 PURPOSE : %RST command (simulates pressing the reset button |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
958 of the ASample) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
959 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
960 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
961 #ifndef TRACE_PORT_TIMING |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
962 #ifdef _TMS470 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
963 #if (CHIPSET == 0) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
964 EXTERN void l1s_set_debug_pin ( UBYTE, UBYTE ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
965 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
966 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
967 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
968 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
969 GLOBAL CHAR* percentDBG ( CHAR* cl ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
970 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
971 SHORT line = 1; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
972 SHORT polarity = 1; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
973 SHORT delay = 650; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
974 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
975 TRACE_FUNCTION ( "atPercentDBG()" ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
976 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
977 switch ( *cl ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
978 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
979 case( '\0' ): |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
980 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
981 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
982 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
983 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
984 case('='): |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
985 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
986 cl++; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
987 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
988 cl = parse ( cl, "rrr", &line, &polarity, &delay ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
989 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
990 if( !cl OR |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
991 polarity < 0 OR polarity > 1 OR |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
992 line < 0 OR line > 7 OR |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
993 delay < 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
994 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
995 return ( NULL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
996 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
997 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
998 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
999 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1000 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1001 default: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1002 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1003 return ( NULL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1004 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1005 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1006 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1007 #ifndef TRACE_PORT_TIMING |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1008 #ifdef _TMS470 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1009 #if (CHIPSET == 0) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1010 #if defined (NEW_FRAME) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1011 vsi_t_sleep ( VSI_CALLER ( T_TIME ) delay ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1012 #else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1013 vsi_t_sleep ( VSI_CALLER ( T_VSI_TVALUE ) delay ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1014 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1015 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1016 l1s_set_debug_pin ( ( UBYTE ) line, ( UBYTE ) polarity ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1017 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1018 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1019 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1020 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1021 return ( cl ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1022 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1023 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1024 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1025 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1026 | PROJECT : GSM-PS (6147) MODULE : CMH_EXTS | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1027 | STATE : code ROUTINE : rAT_ACP | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1028 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1029 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1030 PURPOSE : This function is called by the interpreter part of the |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1031 ACI in case of aborting a pending extension command. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1032 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1033 <out> : this parameter can be used to display some |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1034 strings at the AT command interface. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1035 The first char of one string must contain |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1036 the length of the following string. The |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1037 special length 0xff must be used to define |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1038 the end of the string list. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1039 <outLen> : maximum length of output buffer referenced |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1040 by parameter <out>. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1041 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1042 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1043 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1044 GLOBAL T_ACI_RETURN rAT_ACP ( |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1045 CHAR* out, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1046 USHORT outLen |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1047 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1048 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1049 T_ACI_RETURN rslt = AT_CMPL; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1050 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1051 /* call the abort function if necessary */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1052 if ( currExtCmd NEQ AT_CMD_NONE ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1053 rslt = sAT_Abort (CMD_SRC_LCL, currExtCmd ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1054 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1055 switch ( rslt ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1056 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1057 case ( AT_CMPL ): |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1058 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1059 currExtCmd = AT_CMD_NONE; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1060 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1061 ext_LeaveEXT ( TRUE ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1062 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1063 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1064 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1065 case ( AT_EXCT ): |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1066 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1067 currExtCmd = AT_CMD_ABRT; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1068 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1069 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1070 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1071 default: |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1072 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1073 /* do nothing */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1074 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1075 break; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1076 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1077 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1078 return rslt; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1079 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1080 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1081 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1082 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1083 | PROJECT : GSM-PS (6147) MODULE : CMH_EXTS | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1084 | STATE : code ROUTINE : ext_OK | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1085 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1086 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1087 PURPOSE : This function is called by the MMI in case the positive |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1088 result of the asynchronous command handling is available. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1089 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1090 <cmdId>: command identity |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1091 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1092 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1093 GLOBAL void ext_OK ( T_ACI_AT_CMD cmdId ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1094 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1095 T_ACI_RETURN rslt; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1096 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1097 if ( cmdId EQ AT_CMD_CFUN AND currAbrtCmd EQ AT_CMD_NONE ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1098 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1099 rslt = sAT_PlusCOPS ( CMD_SRC_LCL, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1100 COPS_MOD_Auto, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1101 COPS_FRMT_NotPresent, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1102 NULL ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1103 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1104 if ( rslt EQ AT_EXCT ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1105 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1106 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1107 * generate some output at the AT interface |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1108 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1109 ext_CreatePString ( extBuffer, EXT_ATCOPS_START ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1110 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1111 sAT_URC ( extBuffer ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1112 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1113 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1114 * indicating that an extended AT command is still in progress |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1115 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1116 currExtCmd = AT_CMD_COPS; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1117 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1118 else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1119 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1120 ext_LeaveEXT ( TRUE ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1121 rCI_PlusCME ( AT_CMD_EXT, CME_ERR_Unknown ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1122 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1123 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1124 else if ( cmdId EQ AT_CMD_COPS AND currAbrtCmd EQ AT_CMD_NONE ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1125 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1126 currExtCmd = AT_CMD_NONE; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1127 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1128 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1129 * generate some output at the AT interface |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1130 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1131 ext_CreatePString ( extBuffer, EXT_ATCOPS_STOP ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1132 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1133 sAT_URC ( extBuffer ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1134 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1135 #ifndef WIN32 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1136 ext_ContinueTest ( EXT_DIAL_VOICE_PASS ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1137 #endif |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1138 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1139 else if ( cmdId EQ AT_CMD_D AND currAbrtCmd EQ AT_CMD_NONE ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1140 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1141 extCallId = 1; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1142 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1143 ext_LeaveEXT ( TRUE ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1144 rCI_OK ( AT_CMD_EXT ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1145 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1146 else if ( currAbrtCmd NEQ AT_CMD_NONE ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1147 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1148 currAbrtCmd = AT_CMD_NONE; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1149 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1150 ext_LeaveEXT ( TRUE ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1151 rCI_OK ( AT_CMD_EXT ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1152 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1153 else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1154 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1155 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1156 * generate some output at the AT interface |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1157 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1158 ext_CreatePString ( extBuffer, EXT_UNEXPCTD ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1159 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1160 sAT_URC ( extBuffer ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1161 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1162 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1163 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1164 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1165 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1166 | PROJECT : GSM-PS (6147) MODULE : CMH_EXTS | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1167 | STATE : code ROUTINE : ext_LeaveExtension | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1168 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1169 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1170 PURPOSE : This function is called in case the extensin mechansim |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1171 should be left finally. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1172 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1173 <final>: indicates whether final result code should be |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1174 sent explicitly |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1175 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1176 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1177 LOCAL void ext_LeaveEXT ( BOOL final ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1178 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1179 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1180 * generate some output at the AT interface |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1181 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1182 ext_CreatePString ( extBuffer, EXT_LEAVE ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1183 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1184 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1185 * indicating that no extended AT command is still in progress |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1186 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1187 currExtCmd = AT_CMD_NONE; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1188 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1189 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1190 * indicate end of extended command handling to the AT interpreter |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1191 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1192 sAT_URC ( extBuffer ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1193 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1194 if ( final ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1195 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1196 sAT_FRI ( extCmdLen ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1197 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1198 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1199 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1200 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1201 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1202 | PROJECT : GSM-PS (6147) MODULE : CMH_EXTS | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1203 | STATE : code ROUTINE : ext_ContinueTest | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1204 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1205 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1206 PURPOSE : This function is called in case the AT extension |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1207 procedure should be continued. |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1208 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1209 <id>: identifies the specific procedure to be continued |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1210 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1211 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1212 GLOBAL void ext_ContinueTest ( CHAR* id ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1213 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1214 T_ACI_RETURN rslt; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1215 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1216 if ( strcmp ( id, EXT_DIAL_VOICE_PASS ) EQ 0 ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1217 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1218 T_ACI_D_TOC callType = D_TOC_Data; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1219 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1220 if ( extDialNum [strlen ( extDialNum ) - 1] EQ EXT_VOICE_DELIMITER ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1221 callType = D_TOC_Voice; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1222 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1223 extDialNum[strlen ( extDialNum ) - 1] = '\0'; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1224 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1225 rslt = sAT_Dn ( CMD_SRC_LCL, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1226 extDialNum, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1227 D_CLIR_OVRD_Default, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1228 D_CUG_CTRL_NotPresent, |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1229 callType ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1230 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1231 if ( rslt EQ AT_EXCT ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1232 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1233 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1234 * generate some output at the AT interface |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1235 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1236 ext_CreatePString ( extBuffer, EXT_ATD ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1237 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1238 sAT_URC ( extBuffer ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1239 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1240 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1241 * indicating that an extended AT command is still in progress |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1242 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1243 currExtCmd = AT_CMD_D; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1244 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1245 else |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1246 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1247 ext_LeaveEXT ( TRUE ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1248 rCI_PlusCME ( AT_CMD_EXT, CME_ERR_Unknown ); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1249 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1250 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1251 } |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1252 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1253 /* |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1254 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1255 | PROJECT : GSM-PS (6147) MODULE : CMH_EXTS | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1256 | STATE : code ROUTINE : ext_CreatePString | |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1257 +--------------------------------------------------------------------+ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1258 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1259 PURPOSE : |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1260 |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1261 */ |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1262 LOCAL void ext_CreatePString ( CHAR* buffer, CHAR* text ) |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1263 { |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1264 buffer[0] = strlen (text); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1265 memcpy (&buffer[1], text, buffer[0]); |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1266 buffer [buffer[0]+1] = (CHAR) 0xff; |
c14bc60c6c30
gsm-fw/g23m-glue/cst: import from Leonardo source
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1267 } |