comparison g23m-aci/aci/psa_mmip.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 : PSA_MMI
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 module defines the processing functions for the
18 | primitives send to the protocol stack adapter by the
19 | man machine interface.
20 +-----------------------------------------------------------------------------
21 */
22
23 #ifndef PSA_MMIP_C
24 #define PSA_MMIP_C
25 #endif
26
27 #include "config.h"
28 #include "fixedconf.h"
29 #include "condat-features.h"
30 #include "aci_conf.h"
31
32 #include "aci_all.h"
33
34 /*==== INCLUDES ===================================================*/
35 #include "aci_cmh.h"
36 #include "ati_cmd.h"
37 #include "aci_cmd.h"
38
39 #ifdef FAX_AND_DATA
40 #include "aci_fd.h"
41 #endif /* of #ifdef FAX_AND_DATA */
42
43 #include "aci.h"
44 #include "psa.h"
45 #include "psa_sms.h"
46 #include "psa_mmi.h"
47 #include "psa_mm.h"
48 #include "cmh.h"
49 #ifdef SIM_TOOLKIT
50 #include "psa_cc.h" /* includes defs used in CMH_SAT.H */
51 #include "psa_sat.h"
52 #include "psa_sim.h"
53 #include "cmh_sat.h"
54 #endif /* of SIM_TOOLKIT */
55 #include "cmh_sms.h"
56 #include "cmh_mmi.h"
57 #include "hl_audio_drv.h"
58
59 /*==== CONSTANTS ==================================================*/
60
61
62 /*==== TYPES ======================================================*/
63
64
65 /*==== EXPORT =====================================================*/
66
67
68 /*==== VARIABLES ==================================================*/
69
70
71 /*==== FUNCTIONS ==================================================*/
72
73 /*
74 +-------------------------------------------------------------------+
75 | PROJECT : GSM-PS (6147) MODULE : PSA_MMIP |
76 | ROUTINE : psa_mmi_keypad_ind |
77 +-------------------------------------------------------------------+
78
79 PURPOSE : processes the MMI_KEYPAD_IND primitive send by MMI.
80
81 */
82
83 GLOBAL void psa_mmi_keypad_ind ( T_MMI_KEYPAD_IND *mmi_keypad_ind )
84 {
85 TRACE_FUNCTION ("psa_mmi_keypad_ind()");
86
87 /* update shared parameter and notify ACI */
88 mmiShrdPrm.keyCd = mmi_keypad_ind -> key_code;
89 mmiShrdPrm.keySt = mmi_keypad_ind -> key_stat;
90
91 TRACE_EVENT_P2("Key pressed: code: %d, status: %d", mmi_keypad_ind->key_code, mmi_keypad_ind->key_stat);
92 cmhMMI_keyIndication();
93
94 /* free the primitive buffer */
95 PFREE (mmi_keypad_ind);
96
97 }
98
99 /*
100 +-------------------------------------------------------------------+
101 | PROJECT : GSM-PS (6147) MODULE : PSA_MMIP |
102 | ROUTINE : psa_mmi_cbch_ind |
103 +-------------------------------------------------------------------+
104
105 PURPOSE : processes the MMI_CBCH_IND primitive send by MMI.
106
107 */
108
109 GLOBAL void psa_mmi_cbch_ind ( T_MMI_CBCH_IND *mmi_cbch_ind )
110 {
111 TRACE_FUNCTION ("psa_mmi_cbch_ind()");
112
113 if (mmShrdPrm.regStat EQ RS_FULL_SRV)
114 {
115 cmhSMS_CBMIndication (mmi_cbch_ind);
116 }
117
118 /*
119 *-------------------------------------------------------------------
120 * free the primitive buffer
121 *-------------------------------------------------------------------
122 */
123 PFREE (mmi_cbch_ind);
124 }
125
126 #ifdef SIM_TOOLKIT
127 /*
128 +-------------------------------------------------------------------+
129 | PROJECT : GSM-PS (6147) MODULE : PSA_MMIP |
130 | ROUTINE : psa_mmi_cbch_dnl_ind |
131 +-------------------------------------------------------------------+
132
133 PURPOSE : processes the MMI_CBCH_DWNLD_IND primitive send by MMI.
134
135 */
136
137 GLOBAL void psa_sat_cbch_dnl_ind ( T_MMI_SAT_CBCH_DWNLD_IND *mmi_cbch_dnl_ind )
138 {
139 TRACE_FUNCTION ("psa_sat_cbch_dnl_ind()");
140
141 /*
142 *-----------------------------------------------------------------
143 * check if message should be transfered to SIM for SAT module
144 *-----------------------------------------------------------------
145 */
146 if (psaSIM_ChkSIMSrvSup( SRV_DtaDownlCB )) /* check if servive allocated and enabled */
147 {
148
149 cmhSAT_DatDwnLdCB ( mmi_cbch_dnl_ind -> cbch_msg,
150 mmi_cbch_dnl_ind -> cbch_len); /* build envelope */
151 }
152
153 /*
154 *-------------------------------------------------------------------
155 * free the primitive buffer
156 *-------------------------------------------------------------------
157 */
158 PFREE (mmi_cbch_dnl_ind);
159 }
160 #endif
161
162 /*
163 +-------------------------------------------------------------------+
164 | PROJECT : GSM-PS (6147) MODULE : PSA_MMIP |
165 | ROUTINE : psa_mmi_rxlev_ind |
166 +-------------------------------------------------------------------+
167
168 PURPOSE : processes the MMI_RXLEV_IND primitive send by MMI.
169
170 */
171
172 GLOBAL void psa_mmi_rxlev_ind ( T_MMI_RXLEV_IND *mmi_rxlev_ind )
173 {
174
175 TRACE_FUNCTION ("psa_mmi_rxlev_ind()");
176
177 /* update shared parameter and notify ACI */
178 mmiShrdPrm.rxLev = mmi_rxlev_ind -> rxlev;
179
180 cmhMMI_rxIndication();
181
182 /* free the primitive buffer */
183 PFREE (mmi_rxlev_ind);
184
185 }
186
187 /*
188 +-------------------------------------------------------------------+
189 | PROJECT : GSM-PS (6147) MODULE : PSA_MMIP |
190 | ROUTINE : psa_mmi_battery_ind |
191 +-------------------------------------------------------------------+
192
193 PURPOSE : processes the MMI_BATTERY_IND primitive send by MMI.
194
195 */
196
197 GLOBAL void psa_mmi_battery_ind ( T_MMI_BATTERY_IND *mmi_battery_ind )
198 {
199 TRACE_FUNCTION ("psa_mmi_battery_ind()");
200
201 /* update shared parameter and notify ACI */
202 mmiShrdPrm.btLev = mmi_battery_ind -> volt;
203
204 cmhMMI_btIndication();
205
206 /* free the primitive buffer */
207 PFREE (mmi_battery_ind);
208 }
209
210 #ifdef BTE_MOBILE
211 /*
212 +-------------------------------------------------------------------+
213 | PROJECT : GSM-PS (6147) MODULE : PSA_MMIP |
214 | ROUTINE : psa_mmi_keypad_ind |
215 +-------------------------------------------------------------------+
216
217 PURPOSE : processes the MMI_KEYPAD_IND primitive send by MMI.
218
219 */
220
221 #if defined (MFW)
222 extern mfw_bt_cb_notify_rxd(void);
223 #endif
224
225 GLOBAL void psa_mmi_bt_cb_notify_ind (T_MMI_BT_CB_NOTIFY_IND *mmi_bt_cb_notify_ind )
226 {
227 TRACE_FUNCTION ("psa_mmi_bt_cb_notify_ind()");
228
229 /*
230 ** Do something!
231 */
232 #if defined (MFW)
233 mfw_bt_cb_notify_rxd();
234 #endif
235
236 /* free the primitive buffer */
237 PFREE (mmi_bt_cb_notify_ind);
238
239 }
240 #endif
241
242
243 #ifndef VOCODER_FUNC_INTERFACE
244 /*
245 +-------------------------------------------------------------------+
246 | PROJECT : GSM-PS (6147) MODULE : PSA_MMIP |
247 | ROUTINE : psa_mmi_keypad_ind |
248 +-------------------------------------------------------------------+
249
250 PURPOSE : processes the MMI_KEYPAD_IND primitive send by MMI.
251
252 */
253
254 GLOBAL void psa_mmi_tch_vocoder_cfg_con(T_MMI_TCH_VOCODER_CFG_CON *mmi_tch_vocoder_cfg_con)
255 {
256 TRACE_FUNCTION("psa_mmi_tch_vocoder_cfg_con()");
257 hl_drv_vocoder_state_set();
258 PFREE (mmi_tch_vocoder_cfg_con);
259 }
260 #endif
261
262 /*==== EOF =========================================================*/