comparison g23m-gsm/cc/cc_csf.c @ 0:75a11d740a02

initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 09 Jun 2016 00:02:41 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:75a11d740a02
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 #include "config.h"
29 #include "fixedconf.h"
30 #include "condat-features.h"
31
32 #define ENTITY_CC
33 /*==== INCLUDES ===================================================*/
34
35 #include <string.h>
36 #include "typedefs.h"
37 #include "pcm.h"
38 #include "vsi.h"
39 #include "custom.h"
40 #include "gsm.h"
41 #include "message.h"
42 #include "ccdapi.h"
43 #include "prim.h"
44 #include "cnf_cc.h"
45 #include "mon_cc.h"
46 #include "pei.h"
47 #include "tok.h"
48 #include "cc.h"
49
50 #include "m_rr_com.h"
51
52 /*==== EXPORT =====================================================*/
53
54 /*==== PRIVAT =====================================================*/
55
56 /*==== VARIABLES ==================================================*/
57
58 /*==== FUNCTIONS ==================================================*/
59
60 /*
61 +------------------------------------------------------------------------------
62 | Function : cc_csf_ms_cap
63 +------------------------------------------------------------------------------
64 | Description : Reads the MS's capabilities from non volatile memory (flash).
65 |
66 | Parameters : cc_data - Pointer to the CC data
67 |
68 | Return : -
69 +------------------------------------------------------------------------------
70 */
71 GLOBAL void cc_csf_ms_cap (void)
72 {
73 GET_INSTANCE_DATA;
74 UBYTE version;
75 T_mob_class_2 mob_class_2;
76 EXTERN void rr_csf_get_classmark2 (T_mob_class_2 *mob_class_2);
77
78 TRACE_FUNCTION ("cc_csf_ms_cap()");
79
80 (void)pcm_ReadFile ((UBYTE *)EF_MSCAP_ID, SIZE_EF_MSCAP,
81 (UBYTE *)&cc_data->mscap, &version);
82
83 TRACE_EVENT_P6 ("MSCAP: %02x %02x %02x %02x %02x %02x",
84 cc_data->mscap.chnMode,
85 cc_data->mscap.datCap1,
86 cc_data->mscap.datCap2,
87 cc_data->mscap.featLst1,
88 cc_data->mscap.featLst2,
89 cc_data->mscap.featLst3);
90
91 rr_csf_get_classmark2 (&mob_class_2);
92
93 memset (&cc_data->call_ctrl_cap, 0, sizeof (T_M_CC_call_ctrl_cap));
94 /* G23 always supports DTMF regardless of PCM when voice is supported */
95 cc_data->call_ctrl_cap.dtmf = cc_voice_capability ();
96 /* Use CMSP bit of mobile class 2 as PCP bit in CC capabilities */
97 cc_data->call_ctrl_cap.pcp = mob_class_2.cmsp;
98
99 #ifdef REL99
100 /* Always one bearer in this release 99 version of the protocol */
101 cc_data->call_ctrl_cap.max_nof_supp_bearers = M_CC_MAX_NOF_SUPP_BEARER_1;
102 if (cc_voice_capability ())
103 {
104 cc_data->call_ctrl_cap.max_nof_supp_speech_bearers = M_CC_MAX_NOF_SUPP_SPEECH_BEARER_1;
105 }
106 else
107 {
108 cc_data->call_ctrl_cap.max_nof_supp_speech_bearers = M_CC_MAX_NOF_SUPP_SPEECH_BEARER_0;
109 }
110 #endif
111
112 }
113
114
115 /*
116 +--------------------------------------------------------------------+
117 | PROJECT : GSM-PS (6147) MODULE : CC_CSF |
118 | STATE : code ROUTINE : bc_prio_x |
119 +--------------------------------------------------------------------+
120
121 PURPOSE : To set the Bearer capabilities for triple vocoder.
122
123 radio channel requirement
124 content 1 means full rate support only mobile station
125 content 2 means dual rate support mobile station, half rate preferred
126 content 3 means dual rate support mobile station, full rate preferred
127
128 */
129
130 /*
131 * Setting of Radio Channel Requirement
132 */
133 GLOBAL const UBYTE bc_prio_0 [4] =
134 {
135 1, /* support of FR, full rate support only mobile station */
136 3, /* support of FR+HR, dual rate, fullrate preferred */
137 1, /* support of FR+EFR, full rate support only mobile station */
138 3, /* support of FR+HR+EFR, dual rate, fullrate preferred */
139 };
140
141 #endif