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