comparison src/g23m-gsm/cc/cc_csf.c @ 104:27a4235405c6

src/g23m-gsm: import from LoCosto source
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 04 Oct 2016 18:24:05 +0000
parents
children 4b7e0dba42f6
comparison
equal deleted inserted replaced
103:76d139c7a25e 104:27a4235405c6
1 /*
2 +-----------------------------------------------------------------------------
3 | Project : GSM-PS (6147)
4 | Modul : CC_CSF
5 +-----------------------------------------------------------------------------
6 | Copyright 2002 Texas Instruments Berlin, AG
7 | All rights reserved.
8 |
9 | This file is confidential and a trade secret of Texas
10 | Instruments Berlin, AG
11 | The receipt of or possession of this file does not convey
12 | any rights to reproduce or disclose its contents or to
13 | manufacture, use, or sell anything it may describe, in
14 | whole, or in part, without the specific written consent of
15 | Texas Instruments Berlin, AG.
16 +-----------------------------------------------------------------------------
17 | Purpose : This Modul defines the custom specific functions
18 | for the component CC of the mobile station
19 |
20 | Use this module to integrate the entity
21 | in your target system !
22 +-----------------------------------------------------------------------------
23 */
24
25 #ifndef CC_CSF_C
26 #define CC_CSF_C
27
28 #define ENTITY_CC
29 /*==== INCLUDES ===================================================*/
30
31 #include <string.h>
32 #include "typedefs.h"
33 #include "pcm.h"
34 #include "vsi.h"
35 #include "custom.h"
36 #include "gsm.h"
37 #include "message.h"
38 #include "ccdapi.h"
39 #include "prim.h"
40 #include "cnf_cc.h"
41 #include "mon_cc.h"
42 #include "pei.h"
43 #include "tok.h"
44 #include "cc.h"
45
46 #include "M_rr_com.h"
47
48 /*==== EXPORT =====================================================*/
49
50 /*==== PRIVAT =====================================================*/
51
52 /*==== VARIABLES ==================================================*/
53
54 /*==== FUNCTIONS ==================================================*/
55
56 /*
57 +------------------------------------------------------------------------------
58 | Function : cc_csf_ms_cap
59 +------------------------------------------------------------------------------
60 | Description : Reads the MS's capabilities from non volatile memory (flash).
61 |
62 | Parameters : cc_data - Pointer to the CC data
63 |
64 | Return : -
65 +------------------------------------------------------------------------------
66 */
67 GLOBAL void cc_csf_ms_cap (void)
68 {
69 GET_INSTANCE_DATA;
70 UBYTE version;
71 T_mob_class_2 mob_class_2;
72 EXTERN void rr_csf_get_classmark2 (T_mob_class_2 *mob_class_2);
73
74 TRACE_FUNCTION ("cc_csf_ms_cap()");
75
76 (void)pcm_ReadFile ((UBYTE *)EF_MSCAP_ID, SIZE_EF_MSCAP,
77 (UBYTE *)&cc_data->mscap, &version);
78
79 TRACE_EVENT_P6 ("MSCAP: %02x %02x %02x %02x %02x %02x",
80 cc_data->mscap.chnMode,
81 cc_data->mscap.datCap1,
82 cc_data->mscap.datCap2,
83 cc_data->mscap.featLst1,
84 cc_data->mscap.featLst2,
85 cc_data->mscap.featLst3);
86
87 rr_csf_get_classmark2 (&mob_class_2);
88
89 memset (&cc_data->call_ctrl_cap, 0, sizeof (T_M_CC_call_ctrl_cap));
90 /* G23 always supports DTMF regardless of PCM when voice is supported */
91 cc_data->call_ctrl_cap.dtmf = cc_voice_capability ();
92 /* Use CMSP bit of mobile class 2 as PCP bit in CC capabilities */
93 cc_data->call_ctrl_cap.pcp = mob_class_2.cmsp;
94
95 #ifdef REL99
96 /* Always one bearer in this release 99 version of the protocol */
97 cc_data->call_ctrl_cap.max_nof_supp_bearers = M_CC_MAX_NOF_SUPP_BEARER_1;
98 if (cc_voice_capability ())
99 {
100 cc_data->call_ctrl_cap.max_nof_supp_speech_bearers = M_CC_MAX_NOF_SUPP_SPEECH_BEARER_1;
101 }
102 else
103 {
104 cc_data->call_ctrl_cap.max_nof_supp_speech_bearers = M_CC_MAX_NOF_SUPP_SPEECH_BEARER_0;
105 }
106 #endif
107
108 }
109
110
111 /*
112 +--------------------------------------------------------------------+
113 | PROJECT : GSM-PS (6147) MODULE : CC_CSF |
114 | STATE : code ROUTINE : bc_prio_x |
115 +--------------------------------------------------------------------+
116
117 PURPOSE : To set the Bearer capabilities for triple vocoder.
118
119 radio channel requirement
120 content 1 means full rate support only mobile station
121 content 2 means dual rate support mobile station, half rate preferred
122 content 3 means dual rate support mobile station, full rate preferred
123
124 */
125
126 /*
127 * Setting of Radio Channel Requirement
128 */
129 GLOBAL const UBYTE bc_prio_0 [4] =
130 {
131 1, /* support of FR, full rate support only mobile station */
132 3, /* support of FR+HR, dual rate, fullrate preferred */
133 1, /* support of FR+EFR, full rate support only mobile station */
134 3, /* support of FR+HR+EFR, dual rate, fullrate preferred */
135 };
136
137 #endif
138