comparison gsm-fw/g23m-glue/cst/cst_exts.c @ 845:21247e7d0b8d

cst_exts.c compiles
author Space Falcon <falcon@ivan.Harhan.ORG>
date Sat, 25 Apr 2015 21:36:27 +0000
parents c14bc60c6c30
children
comparison
equal deleted inserted replaced
844:55b3de755b7a 845:21247e7d0b8d
14 14
15 #ifndef CST_EXTS_C 15 #ifndef CST_EXTS_C
16 #define CST_EXTS_C 16 #define CST_EXTS_C
17 #endif 17 #endif
18 18
19 19 #include "config.h"
20 #include "config/swconfig.cfg" 20 #include "fixedconf.h"
21 #include "config/chipset.cfg" 21 #include "condat-features.h"
22 #include "config/l1sw.cfg"
23
24
25 22
26 #define ENTITY_CST 23 #define ENTITY_CST
27 /*==== INCLUDES ===================================================*/ 24 /*==== INCLUDES ===================================================*/
28 25
29 #include <stdlib.h> 26 #include <stdlib.h>
33 #include "m_sms.val" 30 #include "m_sms.val"
34 #include "m_fac.h" 31 #include "m_fac.h"
35 #include "p_mnsms.h" 32 #include "p_mnsms.h"
36 #include "p_mmreg.h" 33 #include "p_mmreg.h"
37 #include "p_mncc.h" 34 #include "p_mncc.h"
38 #include "aci_cmh.h" 35 #include "p_mnss.h"
39 #include "vsi.h" 36 #include "vsi.h"
40 #include "gsm.h" 37 #include "gsm.h"
41 #include "p_cst.h" 38 #include "p_cst.h"
42 #include "cst/cst.h" 39 #include "cst.h"
43 #include "custom.h" 40 #include "custom.h"
44 41 #include "p_mmi.h"
45 #ifdef ALR 42 #include "p_em.h"
43 #include "../../g23m-aci/aci/aci_cmh.h"
44
45 #if 0 //#ifdef ALR
46 #include "main/sys_ver.h" 46 #include "main/sys_ver.h"
47 #endif 47 #endif
48
49 /*==== MELODY TEST ==================================================*/
50
51 #define MELODY_E1 0
52
53 extern void enable_tch_vocoder(BOOL vocoder);
54
55 #if (MELODY_E1)
56 extern void audio_melo_e1_demo1_start(void);
57 extern void audio_melo_e1_demo1_stop(void);
58 extern void audio_melo_e1_demo2_start(void);
59 extern void audio_melo_e1_demo2_stop(void);
60 #endif
61
62 #if (MELODY_E2)
63 extern void audio_melo_e2_load_lsi(void);
64 extern void audio_melo_e2_demo1_start(void);
65 extern void audio_melo_e2_demo1_stop(void);
66 extern void audio_melo_e2_demo2_start(void);
67 extern void audio_melo_e2_demo2_stop(void);
68 #endif
69
70
71 48
72 /*==== CONSTANTS ==================================================*/ 49 /*==== CONSTANTS ==================================================*/
73 50
74 #define EXT_ATD "EXT: D, I" 51 #define EXT_ATD "EXT: D, I"
75 #define EXT_ATCFUN "EXT: +CFUN, I" 52 #define EXT_ATCFUN "EXT: +CFUN, I"
89 66
90 /*==== TYPES ======================================================*/ 67 /*==== TYPES ======================================================*/
91 68
92 #ifndef WIN32 69 #ifndef WIN32
93 extern USHORT IQ_GetBuild(void); 70 extern USHORT IQ_GetBuild(void);
94 #ifndef ALR
95 extern USHORT IQ_GetPoleStarVersion(void); 71 extern USHORT IQ_GetPoleStarVersion(void);
96 #endif
97 extern USHORT IQ_GetJtagId(void); 72 extern USHORT IQ_GetJtagId(void);
98 extern USHORT IQ_GetRevision(void); 73 extern USHORT IQ_GetRevision(void);
99 extern void l1dmacro_init_hw(void); 74 extern void l1dmacro_init_hw(void);
100 75
101 extern BOOL SER_WriteConfig (char *new_config, 76 extern BOOL SER_WriteConfig (char *new_config,
146 121
147 */ 122 */
148 123
149 #ifndef WIN32 124 #ifndef WIN32
150 125
151 126 #if 0
152 static void jtagid_to_chipset (USHORT jtagid, CHAR *chipset) 127 static void jtagid_to_chipset (USHORT jtagid, CHAR *chipset)
153 { 128 {
154 129
155 switch (jtagid) { 130 switch (jtagid) {
156 131
214 189
215 strcpy (chipset, "Unknown"); 190 strcpy (chipset, "Unknown");
216 break; 191 break;
217 } 192 }
218 } 193 }
194 #endif
219 195
220 GLOBAL void cmh_show_version ( 196 GLOBAL void cmh_show_version (
221 CHAR *command, 197 CHAR *command,
222 USHORT *len, 198 USHORT *len,
223 CHAR *output 199 CHAR *output
224 ) 200 )
225 { 201 {
226 #ifndef ALR 202 #if 1 //#ifndef ALR
227 CHAR buf[80]; 203 CHAR buf[80];
228 USHORT build, hw, rev; 204 USHORT build, hw, rev;
229 #else 205 #else
230 CHAR buf[160]; 206 CHAR buf[160];
231 CHAR chipset[25]; 207 CHAR chipset[25];
236 /* 212 /*
237 * Retrieve hardware JTAG ID info 213 * Retrieve hardware JTAG ID info
238 */ 214 */
239 jtag = IQ_GetJtagId(); 215 jtag = IQ_GetJtagId();
240 216
241 #ifndef ALR 217 #if 1 //#ifndef ALR
242 /* 218 /*
243 * Retrieve others hardware info and build from library 219 * Retrieve others hardware info and build from library
244 */ 220 */
245 build = IQ_GetBuild(); 221 build = IQ_GetBuild();
246 hw = IQ_GetPoleStarVersion(); 222 hw = IQ_GetPoleStarVersion();
609 cmd++; 585 cmd++;
610 586
611 switch (*cmd) { 587 switch (*cmd) {
612 588
613 case 'e': 589 case 'e':
614 case 'E': 590 case 'E':
615 /* 's''e' already detected => assume the command is at%ser. */ 591 /* 's''e' already detected => assume the command is at%ser. */
616 { 592 {
617 cmd += 3; /* Discard the following characters */ 593 cmd += 3; /* Discard the following characters */
618 *cmdLen -= 9; 594 *cmdLen -= 9;
619 if (SER_WriteConfig (cmd, (BOOL) (*(cmd + 3) - '0'))) 595 if (SER_WriteConfig (cmd, (BOOL) (*(cmd + 3) - '0')))
620 return( AT_CMPL ); 596 return( AT_CMPL );
621 else 597 else
622 return( AT_FAIL ); 598 return( AT_FAIL );
623 } 599 }
624 600
625 case 'w': 601 case 'w':
626 case 'W': 602 case 'W':
627 /* 's''w' already detected => assume the command is at%switch. */ 603 /* 's''w' already detected => assume the command is at%switch. */
628 { 604 {
629 *cmdLen -= 7; 605 *cmdLen -= 7;
630 if (SER_ImmediateSwitch()) 606 if (SER_ImmediateSwitch())
631 return( AT_CMPL ); 607 return( AT_CMPL );
632 else 608 else
633 return( AT_FAIL ); 609 return( AT_FAIL );
634 } 610 }
635 611
636 case 'l': 612 case 'l':
637 case 'L': 613 case 'L':
638 /* 's''l' already detected => assume the command is at%sleep. */ 614 /* 's''l' already detected => assume the command is at%sleep. */
639 { 615 {
640 cmd += 5; /* Discard the following characters */ 616 cmd += 5; /* Discard the following characters */
641 *cmdLen -= 8; 617 *cmdLen -= 8;
642 /* 618 /*
643 * Checks if the parameter is valid: 619 * Checks if the parameter is valid:
644 * 0 -> NO_SLEEP 620 * 0 -> NO_SLEEP
645 * 1 -> SMALL_SLEEP 621 * 1 -> SMALL_SLEEP
646 * 2 -> BIG_SLEEP 622 * 2 -> BIG_SLEEP
647 * 3 -> DEEP_SLEEP 623 * 3 -> DEEP_SLEEP
648 * 4 -> ALL_SLEEP 624 * 4 -> ALL_SLEEP
649 */ 625 */
650 626
651 if (((*cmd - '0') >= 0) && ((*cmd - '0') <= 4)) 627 if (((*cmd - '0') >= 0) && ((*cmd - '0') <= 4))
652 { 628 {
653 power_down_config ((UBYTE) (*cmd - '0'), UWIRE_CLK_CUT); 629 power_down_config ((UBYTE) (*cmd - '0'), UWIRE_CLK_CUT);
654 return( AT_CMPL ); 630 return( AT_CMPL );
655 } 631 }
656 else 632 else
657 return( AT_FAIL ); 633 return( AT_FAIL );
658 } 634 }
659 635
660 default: 636 default:
661 *cmdLen -= 2; 637 *cmdLen -= 2;
662 return ( AT_FAIL ); 638 return ( AT_FAIL );
663 639
664 } 640 }
665 } 641 }
666 642
667 case 'H': 643 case 'H':
668 *cmdLen -= 2; 644 *cmdLen -= 2;
669 645
733 { 709 {
734 //audio_test_misc(); 710 //audio_test_misc();
735 out[0] = 22; 711 out[0] = 22;
736 memcpy (&out[1], "Performing Audio Tests", 22); 712 memcpy (&out[1], "Performing Audio Tests", 22);
737 out [23] = (CHAR) 0xff; 713 out [23] = (CHAR) 0xff;
738 } 714 }
739 else 715 else
740 { 716 {
741 if (!strncmp(cmd, "R", 1) || !strncmp(cmd, "r", 1)) 717 if (!strncmp(cmd, "R", 1) || !strncmp(cmd, "r", 1))
742 { 718 {
743 //rtc_test_misc(); 719 //rtc_test_misc();
745 memcpy (&out[1], "Performing RTC Tests", 20); 721 memcpy (&out[1], "Performing RTC Tests", 20);
746 out [21] = (CHAR) 0xff; 722 out [21] = (CHAR) 0xff;
747 } 723 }
748 else 724 else
749 return( AT_FAIL ); 725 return( AT_FAIL );
750 } 726 }
751 return( AT_CMPL ); 727 return( AT_CMPL );
752 #endif 728 #endif
753 default: 729 default:
754 *cmdLen -= 2; 730 *cmdLen -= 2;
755 return ( AT_FAIL ); 731 return ( AT_FAIL );