comparison g23m/condat/ms/src/bmi/MmiMmi.c @ 0:509db1a7b7b8

initial import: leo2moko-r1
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 01 Jun 2015 03:24:05 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:509db1a7b7b8
1 /*******************************************************************************
2
3 CONDAT (UK)
4
5 ********************************************************************************
6
7 This software product is the property of Condat (UK) Ltd and may not be
8 disclosed to any third party without the express permission of the owner.
9
10 ********************************************************************************
11
12 $Project name: Basic MMI
13 $Project code: BMI (6349)
14 $Module: MMI
15 $File: MmiMmi.c
16 $Revision: 1.0
17
18 $Author: Condat(UK)
19 $Date: 25/10/00
20
21 ********************************************************************************
22
23 Description:
24
25 This provides the root mofule for the basic MMI
26
27 ********************************************************************************
28 $History: MmiMmi.c
29
30 Jun 13 2005, REF:LOCOSTO-OTH-32113 - xpradipg
31 Description: Bypass the powerkey initialization at bootup
32 Solution: The powerkey initialization is bypassed by calling the
33 drvKeyUpDown() in mmi_main() instead of key_power_initialize
34
35 // Jun 23, 2004 REF: CRR MMI-SPR-16665 Rashmi C N(Sasken)
36 // Description: Ocasionaly the LCD used to get stuck with the TI LOGO during power off.
37 // Solution: By calling dspl_Enable(1) we are forcing the LCD to get updated.
38
39 25/10/00 Original Condat(UK) BMI version.
40
41 $End
42
43 *******************************************************************************/
44
45
46
47
48 /*******************************************************************************
49
50 Include Files
51
52 *******************************************************************************/
53
54 #define ENTITY_MFW
55
56 /* includes */
57 #include <string.h>
58 #include <stdio.h>
59 #include <stdlib.h>
60
61 #if defined (NEW_FRAME)
62
63 #include "typedefs.h"
64 #include "vsi.h"
65 #include "pei.h"
66 #include "custom.h"
67 #include "gsm.h"
68
69 #else
70
71 #include "STDDEFS.H"
72 #include "custom.h"
73 #include "gsm.h"
74 #include "vsi.h"
75
76 #endif
77 #include "mfw_sys.h"
78
79 #include "prim.h"
80
81
82 #include "mfw_mfw.h"
83 #include "mfw_win.h"
84 #include "mfw_kbd.h"
85 #include "mfw_lng.h"
86 #include "mfw_tim.h"
87 /* SPR#1428 - SH - New Editor changes */
88 #ifndef NEW_EDITOR
89 #include "mfw_edt.h"
90 #endif
91 #include "mfw_icn.h"
92 #include "mfw_mnu.h"
93 #include "mfw_phb.h"
94 #include "mfw_sim.h"
95 #include "mfw_nm.h"
96 #include "mfw_mme.h"
97 #include "mfw_sat.h"
98 #include "mfw_sms.h"
99
100 #include "cus_aci.h"
101
102 #include "prim.h"
103 #ifndef PCM_2_FFS
104 #include "pcm.h"
105 #endif
106
107 #include "ksd.h"
108 #include "psa.h"
109
110
111 #include "MmiMmi.h"
112 #include "MmiMain.h"
113
114 #include "MmiDummy.h"
115 #include "MmiDialogs.h"
116 #include "MmiLists.h"
117
118
119
120
121 #include "dspl.h"
122 #include "drv_key.h"
123
124 #ifdef FF_MMI_MULTIMEDIA
125 /* To Assign the MSL_Init Return Value */
126 #include "MSL.h"
127 #include "mmiMultimediaApp.h"
128 #include "omxutil.h"
129 #endif
130
131 #ifdef MMI_LITE
132 #define MFW_MEMORY_POOL_SIZE 22000 /*SPR 2686*/
133 #else
134 #ifdef FF_MMI_MMS
135 #define MFW_MEMORY_POOL_SIZE (220*1024)
136 #else
137 #ifdef FF_MMI_MULTIMEDIA
138 #define MFW_MEMORY_POOL_SIZE (220 * 1024) // RAVI - 18-07-2005 - For Image display
139 #else
140 #define MFW_MEMORY_POOL_SIZE 35000
141 #endif
142 #endif
143 #endif
144
145
146 #ifndef _SIMULATION_
147 extern void AI_Power(unsigned char power);
148 #endif //_SIMULATION_
149
150 /*******************************************************************************
151
152 Global Data Elements
153
154 *******************************************************************************/
155
156 U16 mmiScrX, mmiScrY; /* display sreen size */
157
158 static U8 mfwMem [MFW_MEMORY_POOL_SIZE]; /* mfw memory pool */
159 static int initialized = 0; /* initialization flag */
160
161
162
163
164 /*******************************************************************************
165
166 Public Methods
167
168 *******************************************************************************/
169
170 /*******************************************************************************
171
172 $Function: mmi_main
173
174 $Description: entry point for the MMI, this hands control to mmiInit
175
176 $Returns: None.
177
178 $Arguments: None.
179
180 *******************************************************************************/
181
182 void mmi_main( void )
183 {
184 /* JVJ #1874 - mmi_main doesnt start the MMI. It only initilizes the Keyboard handler*/
185 /* The keyboard handler will call mmiInit() when the Power Key is pressed */
186 // Jun 13 2005, REF:LOCOSTO-OTH-32113 - xpradipg
187 #if (BOARD == 61)
188 #if FF_MMI_SERVICES_MIGRATION
189 drvKeyUpDown(0,0);
190 #else
191 key_power_init();
192 #endif
193
194 #ifndef FF_MMI_MULTIMEDIA
195 vsi_t_sleep(VSI_CALLER 50);
196 mmiInit();
197 #endif
198
199 #else /* Other Builds */
200 key_power_init();
201 #endif
202
203 }
204
205
206
207 /*******************************************************************************
208
209 $Function: mmiInit
210
211 $Description: This initialises the MMI application
212
213 $Returns: None.
214
215 $Arguments: None.
216
217 *******************************************************************************/
218
219
220 void mmiInit( void )
221 {
222 #ifdef FF_MMI_MULTIMEDIA
223 unsigned int uiResult = 0;
224 #endif
225
226 /* get the resources running
227 */
228
229 /* Initialise the MFW and windowing system
230 */
231 mfwInit( mfwMem, sizeof( mfwMem ) );
232 winInit( &mmiScrX, &mmiScrY );
233
234
235 timInit(); /* init timer handler */
236 kbdInit(); /* init keyboard handler */
237 lngInit(); /* init language handler */
238 #ifndef NEW_EDITOR /* SPR#1428 - SH - New Editor changes */
239 edtInit(); /* init editor handler */
240 #endif /* NEW_EDITOR */
241 mnuInit(); /* init menu handler */
242 icnInit(); /* init icon handler */
243 mainInit(0);
244
245 #ifdef NEPTUNE_BOARD
246 sAT_PercentCSQ ( CMD_SRC_LCL, CSQ_Enable );
247 #endif
248
249 #ifdef FF_MMI_MULTIMEDIA
250 /* MSL Init Call */
251 uiResult = MSL_Init();
252 vsi_t_sleep(0, 100);
253 mmi_setInitResult(uiResult);
254
255 /* PCM Setup Done */
256 /* MSLRM_Start (); */
257 #endif
258
259 }
260
261
262
263
264
265
266 /*******************************************************************************
267
268 $Function: mmiExit
269
270 $Description: This exits the MMI application
271
272 $Returns: None.
273
274 $Arguments: None.
275
276 *******************************************************************************/
277
278
279
280
281
282 void mmiExit( void )
283 {
284 TRACE_EVENT("mmiExit");
285
286 icnExit(); /* finit icon handler */
287 mnuExit(); /* finit menu handler */
288 #ifndef NEW_EDITOR /* SPR#1428 - SH - New Editor changes */
289 edtExit(); /* finit edit handler */
290 #endif /* NEW_EDITOR */
291 lngExit(); /* finit language handler */
292 kbdExit(); /* finit keyboard handler */
293 timExit(); /* finit timer handler */
294
295 winExit(); /* finit window handler */
296 mfwExit(); /* exit mfw */
297
298 dspl_ClearAll();
299 // Jun 23, 2004 REF: CRR MMI-SPR-16665 Rashmi C N(Sasken)
300 // Description: Ocasionaly the LCD used to get stuck with the TI LOGO during power off.
301 // Solution: By calling dspl_Enable(1) we are forcing the LCD to get updated.
302 dspl_Enable(1);
303 TRACE_EVENT("SWITCHING_OFF!!!!!");
304 vsi_t_sleep (VSI_CALLER 50);
305 /*
306 * Power off the board
307 *
308 */
309 #ifndef _SIMULATION_
310 AI_Power(0);
311 #endif //_SIMULATION_
312
313 }
314
315
316
317
318 /*******************************************************************************
319
320 End Of File
321
322 *******************************************************************************/
323