annotate src/ui3/mfw/mfw_mme.c @ 702:9394305d4ff5 default tip

etm_audio.c: fix off-by-one error in auw of FIR coefficients This fix was already made in FC Tourmaline a while back, but it is also the kind of bugfix that deserves to be backported to Magnetite and Selenite as well.
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 31 Oct 2022 00:14:44 +0000
parents e8ddbb0837ed
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
420
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 | PROJECT: MMI-Framework (8417) $Workfile:: mfw_mme.c $|
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 | $Author:: Kk $ CONDAT GmbH $Revision:: 5 $|
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 | CREATED: 11.02.99 $Modtime:: 3.03.00 17:40 $|
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 | STATE : code |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 MODULE : MFW_MME
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 PURPOSE : Miscelleaneous Mobile Equipment functions
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 EXPORT :
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 TO DO :
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 $History:: mfw_mme.c $
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 ************************************************************************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 Description: Support from MMI to configure drives (NOR, NORMS, NAND, TFLASH)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 is added as part of SBuild 2.3.0 Migration
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 May 30, 2007 DR: OMAPS00132483 x0pleela
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 Description: MM: While playing an AAC, unplug USB freezes the audio
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 Solution: 1. Added the prototype to get the phone lock status
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 2. Replaced the function call mfw_get_phlock_status with mfw_get_Phlock_status
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 to get the phone lock status
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 Apr 03, 2007 ER: OMAPS00122561 x0pleela
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 Description: [ACI] Phone lock feature has to be supported by ACI
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 Solution: Phone Lock ER implementation
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 Mar 22, 2007 DVT: OMAPS00121916 x0039928(sumanth)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 Description: T-Flash hot swap.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 Oct 30 2006, OMAPS00098881 x0039928(sumanth)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 Removal of power variant
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 Oct 05, 2006 ER: OMAPS00094496 x0061088(Prachi)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 Description:Enhance RSSI to 3 parameters: Strength, quality, min-access-level
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 Solution:To solve the ER OMAPS0094496,mmeInit() is not calling rx_Init().
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 xashmic 27 Sep 2006, OMAPS00096389
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 ENH - a) Providing static menu for re-selection of enum options for enumeration
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 b) Popup menu displayed on connect event, can be enabled or disabled via menu option
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 xashmic 21 Sep 2006, OMAPS00095831
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 Description: USB enumeration does not happen in PIN/PUK/Insert SIM scenarios
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 Solution: When booting up without SIM card, or prompting for PIN/PUK/SIMP entry,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 enumerate all the USB ports automatically
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 xashmic 9 Sep 2006, OMAPS00092732
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 USBMS ER
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 * Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 * Description: Triton PG2.2 impacts on Locosto program
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 * Solution: Software workaround is done to register headset-hook dynamically
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 * during/before call is established and unregister it after the call is ended/disconnected.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 * xdeepadh, nekkareb - OMAPS00076996: 05 May 2006
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 * Description: MO TTY call works only for the first time
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 * Solution: For the Loocsto-lite variant, when a TTY call is initiated, the
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 * current audio profile is identified and when the TTY call is ended, this
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 * profile is loaded.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 * nekkareb - OMAPS00057367: 8 Dec 2005
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 * Description: Fix build problems for fix of OMAPS00057367
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 * Solution: Included OMAPS00057367 changes under a flag ISAMPLE
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 * nekkareb - OMAPS00057367: 3 Dec 2005
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 * Description: Locosto: TTY MT call does not work
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 * Solution: Extra TTY command added so as to initiate the AUDIO entity to send the
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 * TTY_START request to L1 only after the Vocoder enable is sent.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 * Current audio device is read from audio service entity functions.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 * xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 * Description: Support for various audio profiles
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 * Solution: The support for audio device's carkit/headset/loudspeaker/handheld.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 * The audio device is enabled as per the user actions.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 * ***************** Version 5 ********************************************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 * User: Kk Date: 3.03.00 Time: 17:52
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 * Updated in $/GSM/Condat/MS/SRC/MFW
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 * ***************** Version 4 *****************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 * User: Es Date: 2.03.00 Time: 16:48
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 * Updated in $/GSM/Condat/MS/SRC/MFW
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 * generate battery/signal primitives with more info from driver
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 * callbacks. Catch the primitives on reception and call MMI event
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 * handler. Don't use ACI any longer for this purpose.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 * ***************** Version 3 *****************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 * User: Es Date: 14.04.99 Time: 17:34
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 * Updated in $/GSM/DEV/MS/SRC/MFW
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 * moved to CST
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 | ***************** Version 2 *****************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 | User: Le Date: 14.04.99 Time: 9:51
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 | Updated in $/GSM/DEV/MS/SRC/MFW
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 *
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 * ***************** Version 1 *****************
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 * User: Es Date: 20.02.99 Time: 11:54
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 * Created in $/GSM/DEV/MS/SRC/MFW
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 * mobile equipment
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 #define ENTITY_MFW
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 #include <stdio.h>
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 #if defined (NEW_FRAME)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 #include "typedefs.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 #include "vsi.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 #include "custom.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 #include "gsm.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 #include "STDDEFS.H"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 #include "custom.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 #include "gsm.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 #include "vsi.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 #include "mfw_mfw.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 #include "mfw_sys.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 #include "prim.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 #include "message.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 #include "prim.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 #include "aci_cmh.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 #include "gdi.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 #include "audio.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 #include "pwr.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 #include "rx.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 #include "light.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 #include "mfw_acie.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 #include "mfw_mme.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 #include "mfw_win.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 #include "mfw_ffs.h" /*OMAPS00098881 x0039928(sumanth)*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 //xashmic 9 Sep 2006, OMAPS00092732
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 #ifdef FF_MMI_USBMS
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 #include "usb/usb_api.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 //x0pleela 01 Apr, 2007 ER: OMAPS00122561
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 #ifdef FF_PHONE_LOCK
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 #include "mfw_sim.h"
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 #endif //FF_PHONE_LOCK
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 /* OMAPS00057367, 8 Dec 2005, nekkare, build fix */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 #if (BOARD == 71)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 #define ISAMPLE
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 #define hCommPL _ENTITY_PREFIXED(hCommPL)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 #define hCommACI _ENTITY_PREFIXED(hCommACI)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 #if defined (NEW_FRAME)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 EXTERN T_HANDLE hCommPL;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 EXTERN T_HANDLE hCommACI;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 EXTERN T_VSI_CHANDLE hCommPL;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 EXTERN T_VSI_CHANDLE hCommACI;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 EXTERN MfwHdr * current_mfw_elem;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 /* FLAG DRIVER CALLBACKS */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 #define MmeFlagRtcAlarm 1 /* rtc alarm */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 #define MmeFlagHdsDetect 2 /* headset detection */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 #define MmeFlagIrdaMsg 4 /* IRDA event */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 U16 mfwMmeDrvFlag = 0; /* hold driver CB flags */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 static U8 battLevel = 0; /* battery level */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 static U8 battState = 0; /* state of power supply */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 static U16 hdsPresence = 0; /* headset presence */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 static int mmeCommand (U32 cmd, void *h);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 /* driver callbacks */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 static void pwrCb (drv_SignalID_Type *signal_params);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 static void rxCb (drv_SignalID_Type *signal_params);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 static void rtcCb (drv_SignalID_Type *signal_params);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 /* Added to remove warning Aug - 11 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 EXTERN UBYTE dspl_Enable (UBYTE in_Enable);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 /* End - remove warning Aug - 11 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 static BOOL mmePrimHandler (USHORT opc, void *data);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 static int pSlot; /* primitive handler slot */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 #ifndef FF_MMI_AUDIO_PROFILE /*a0393213 warnings removal*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 static void hdsCb (drv_SignalID_Type *signal_params);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 #ifdef FF_MMI_AUDIO_PROFILE
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 #define HANDHELD "handheld" //0
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 #define LOUDSPEAKER "handfree" // 1
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 #define HEADSET "headset" // 2
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 #define CARKIT "carkit" // 3
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 static UBYTE currAudioDevice = MFW_AUD_HANDHELD;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 UBYTE headsetInserted = FALSE; //indicates if the headset is inserted or not
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 UBYTE carkitInserted = FALSE; //indicates if the carkit is inserted or not
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 UBYTE mfwAudPlay = FALSE; //indicates if any other audio media is being played or not
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 extern audio_set_device(char* mode);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212 // Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 // Fix: A callback function is added that is registered for hook.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 void mfw_audio_hook_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 ACCESSORY_CALLBACK_PARAM callbackparam );
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 void mfw_audio_headSet_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 ACCESSORY_CALLBACK_PARAM callbackparam );
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 void mfw_audio_carKit_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 ACCESSORY_CALLBACK_PARAM callbackparam );
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 #ifdef FF_MMI_TFLASH
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225 void tflash_notify_register(void);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 typedef void (*T_MC_EVENT_CALLBACK)(T_MC_EVENT mcEvent, void *ctx);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 void mfw_audio_set_device(int type);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 //xdeepadh, nekkareb - OMAPS00076996: 05 May 2006
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 //Array to retrieve the profile name
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233 #ifdef MMI_LITE
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 char aud_cg_file[5][15] = {"handheld","handheld","handfree","headset","carkit"};
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 //x0pleela 29 May, 2007 DR: OMAPS00132483
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238 #ifdef FF_PHONE_LOCK
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239 EXTERN int mfw_get_Phlock_status(void);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 #endif // FF_PHONE_LOCK
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 #ifdef FF_MMI_TFLASH
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245 void tflash_cb(T_MC_EVENT mcEvent, void *ctx)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
247 PALLOC(tflash_mmi_ind, TFLASH_MMI_IND);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248 tflash_mmi_ind->mc_status = mcEvent;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249 PSENDX(ACI,tflash_mmi_ind);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
250 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
251 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
252 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254 //xashmic 9 Sep 2006, OMAPS00092732
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
255 #ifdef FF_MMI_USBMS
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
258 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
259 | STATE : code ROUTINE : usbms_cb |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
260 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
261
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
262 PURPOSE : Posts the USB events to the MMI task
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
263
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
264 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
265
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
266 void usbms_cb (T_USB_EVENT usbEvent, void *ctx)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
267 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
268 PALLOC(usbms_mmi_ind,USBMS_MMI_IND);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
269 usbms_mmi_ind->usb_status = (U8)usbEvent;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
270 PSENDX(ACI,usbms_mmi_ind);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
271 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
272
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
273
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
274
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
275
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
276 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
277 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
278 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279 | STATE : code ROUTINE : mfw_usbms_init |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
281
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282 PURPOSE : Registers a callback for USB connect/disconnect events
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 void mfw_usbms_init(void)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287 T_USB_RETURN ret;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288 TRACE_FUNCTION("mfw_usbms_init");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289 ret = usb_register_notifcation( (T_USB_EVENT_CALLBACK)usbms_cb,NULL);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290 switch(ret)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 case USB_NOT_SUPPORTED :
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293 TRACE_ERROR("USB registeration unsuccessful- Not supported");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295 case USB_MEMORY_ERR:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296 TRACE_ERROR("USB registeration unsuccessful - Memeory error");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298 case USB_INTERNAL_ERR:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299 TRACE_ERROR("USB registeration unsuccessful - Internal error");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 case USB_OK:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302 TRACE_EVENT("USB registeration successful");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
303 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
306
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310 | STATE : code ROUTINE : mfw_usbms_enum_control |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313 PURPOSE : Continues or abandons the enumeration based on user selection
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
316 void mfw_usbms_enum_control(T_MFW_USB_ENUM_CONTROL usbms_enum_status, T_MFW_USB_ENUM_TYPE usb_enum_type)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
317 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
318 T_USB_ENUM_INFO enumInfo;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
319 T_USB_RETURN ret;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
320 TRACE_FUNCTION("mfw_usbms_enum_control");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321 switch(usb_enum_type)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
322 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
323 case MFW_USB_TYPE_MS:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324 enumInfo.info=USB_MS;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
326 case MFW_USB_TYPE_AT:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327 enumInfo.info=USB_AT;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
328 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
329 case MFW_USB_TYPE_TRACE:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
330 enumInfo.info=USB_TRACE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332 case MFW_USB_TYPE_AT_MS://xashmic 27 Sep 2006, OMAPS00096389
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333 enumInfo.info=USB_AT|USB_MS;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
334 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 case MFW_USB_TYPE_AT_TRACE://xashmic 27 Sep 2006, OMAPS00096389
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336 enumInfo.info=USB_AT|USB_TRACE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
338 case MFW_USB_TYPE_MS_TRACE://xashmic 27 Sep 2006, OMAPS00096389
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
339 enumInfo.info=USB_MS|USB_TRACE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
340 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
341 case MFW_USB_TYPE_ALL:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 enumInfo.info=USB_MS| USB_AT|USB_TRACE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
343 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344 default:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345 TRACE_ERROR("mfw_usbms_enum_control():Invalid type");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346 return;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
347 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
348 TRACE_EVENT_P1("Ports %x",enumInfo.info);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
349 switch(usbms_enum_status)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
350 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
351 case MFW_USB_ENUM:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
352 ret=usb_enum_control(USB_ENUM,&enumInfo);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
353 TRACE_EVENT_P1("mfw_usbms_enum_control:ret:%d", ret);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354 switch(ret)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
355 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
356 case USB_NOT_SUPPORTED :
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
357 TRACE_ERROR("USB enumeration unsuccessful- Not supported");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
358 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
359 case USB_MEMORY_ERR:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
360 TRACE_ERROR("USB enumeration unsuccessful - Memeory error");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
361 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
362 case USB_INTERNAL_ERR:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
363 TRACE_ERROR("USB enumeration unsuccessful - Internal error");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
364 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
365 case USB_OK:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
366 TRACE_EVENT("USB enumeration successful");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
367 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
368 default:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
369 TRACE_ERROR("USB enumeration unsuccessful - Invalid return");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
370 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
372 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
373 case MFW_USB_NO_ENUM:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
374 ret=usb_enum_control(USB_NO_ENUM,&enumInfo);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
375 switch(ret)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
376 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
377 case USB_NOT_SUPPORTED :
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
378 TRACE_ERROR("USB no enumeration unsuccessful- Not supported");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
379 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
380 case USB_MEMORY_ERR:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
381 TRACE_ERROR("USB no enumeration unsuccessful - Memeory error");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
382 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
383 case USB_INTERNAL_ERR:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
384 TRACE_ERROR("USB no enumeration unsuccessful - Internal error");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
385 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
386 case USB_OK:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
387 TRACE_EVENT("USB no enumeration successful");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
388 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
389 default:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
390 TRACE_ERROR("USB enumeration successful - Invalid return");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
391 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
392 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
393 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
394 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
395 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
396
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
397 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
398
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
399 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
400 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
401 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
402 | STATE : code ROUTINE : mmeInit |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
403 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
404 PURPOSE : initialize equipment handler
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
405 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
406 MfwRes mmeInit (void)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
407 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
408 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
409 // the callback registeration variables are populated here and passed as
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
410 // argument to audio_init
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
411 #ifdef FF_MMI_AUDIO_PROFILE
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
412 T_ACCESSORY_CALLBACK audio_device_config[MAX_EXT_AUD_DEVICE];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
413
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
414 audio_device_config[CALLBACK_HEADSET].callbackFunc = mfw_audio_headSet_indication;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
415 audio_device_config[CALLBACK_HEADSET].callbackVal = NULL;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
416 audio_device_config[CALLBACK_CARKIT].callbackFunc = mfw_audio_carKit_indication;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
417 audio_device_config[CALLBACK_CARKIT].callbackVal = NULL;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
418 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
419
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
420 mfwCommand[MfwTypMme] = (MfwCb) mmeCommand;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
421
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
422 mfwMmeDrvFlag = 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
423
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
424 battLevel = 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
425 battState = 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
426 hdsPresence = 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
427
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
428
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
429 pwr_Init(pwrCb); //power driver
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
430 rx_Init(rxCb); //fieldstrength driver
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
431 light_Init(); //light emitting driver
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
432 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
433 #ifdef FF_MMI_AUDIO_PROFILE
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
434 audio_Init(audio_device_config);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
435 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
436 audio_Init(hdsCb); //audio driver
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
437 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
438
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
439 mmeBattInfo ( 10, 0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
440
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
441 mmeRxInfo(5,0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
442
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
443 /* install prim handler */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
444 pSlot = aci_create((T_PRIM_HANDLER)mmePrimHandler,NULL);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
445
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
446 //xashmic 9 Sep 2006, OMAPS00092732
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
447 //Registers a callback for event handling
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
448 #ifdef FF_MMI_USBMS
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
449 mfw_usbms_init();
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
450
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
451 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
452 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
453 #ifdef FF_MMI_TFLASH
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
454 tflash_notify_register();
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
455 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
456 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
457
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
458 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
459
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
460 return MfwResOk;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
461 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
462
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
463 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
464 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
465 #ifdef FF_MMI_TFLASH
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
466 void tflash_notify_register(void)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
467 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
468 T_RV_RET result;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
469
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
470 result = (T_RV_RET)mc_register_notifcation((T_MC_EVENT_CALLBACK)tflash_cb, NULL);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
471
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
472 if(result == RV_OK)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
473 TRACE_EVENT("TFLASH callback registration successful");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
474 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
475 TRACE_ERROR("TFLASH callback registration failed");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
476 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
477 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
478 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
479
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
480
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
481 // Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
482 // Fix: Two new mfw hook register and unregister functions are added
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
483 // which call the hook register and unregister functions in audio.c file
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
484 #ifdef FF_MMI_AUDIO_PROFILE
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
485 void mfw_hook_unregister(void)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
486 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
487 TRACE_FUNCTION("mfw hook unregister");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
488 hook_unregister();
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
489 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
490
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
491 void mfw_hook_register(void)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
492 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
493 T_ACCESSORY_CALLBACK hook_device;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
494
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
495 TRACE_FUNCTION("mfw hook register");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
496
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
497 hook_device.callbackVal = NULL;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
498 hook_device.callbackFunc = mfw_audio_hook_indication;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
499 hook_register(hook_device);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
500 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
501 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
502
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
503
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
504
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
505 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
506 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
507 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
508 | STATE : code ROUTINE : mmeExit |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
509 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
510
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
511 PURPOSE : finalize equipment handler
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
512
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
513 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
514 MfwRes mmeExit (void)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
515 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
516 aci_delete(pSlot); /* remove prim handler */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
517 mfwCommand[MfwTypMme] = 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
518
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
519 return MfwResOk;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
520 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
521
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
522
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
523 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
524 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
525 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
526 | STATE : code ROUTINE : mmeCreate |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
527 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
528
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
529 PURPOSE : create equipment control
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
530
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
531 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
532
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
533 MfwHnd mmeCreate (MfwHnd w, MfwEvt e, MfwCb f)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
534 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
535 MfwHdr *hdr = (MfwHdr *) mfwAlloc(sizeof(MfwHdr));
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
536 MfwMme *mme = (MfwMme *) mfwAlloc(sizeof(MfwMme));
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
537 MfwHdr *insert_status =0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
538
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
539 if (!hdr || !mme)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
540 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
541 TRACE_ERROR("ERROR: mmeCreate() Mem Alloc Failed.");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
542
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
543 if(hdr)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
544 mfwFree((U8*)hdr,sizeof(MfwHdr));
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
545 if(mme)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
546 mfwFree((U8*)mme,sizeof(MfwMme));
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
547
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
548 return 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
549 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
550
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
551 mme->map = e;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
552 mme->handler = f;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
553 mme->value = 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
554
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
555 hdr->data = mme;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
556 hdr->type = MfwTypMme;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
557
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
558 insert_status = mfwInsert(w,hdr);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
559
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
560 if(!insert_status)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
561 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
562 TRACE_ERROR("ERROR: mmeCreate() Failed to Install Handler. ");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
563 mfwFree((U8*)hdr,sizeof(MfwHdr));
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
564 mfwFree((U8*)mme ,sizeof(MfwMme));
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
565 return 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
566 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
567 return insert_status;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
568 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
569
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
570
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
571 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
572 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
573 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
574 | STATE : code ROUTINE : mmeDelete |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
575 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
576
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
577 PURPOSE : delete equipment control
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
578
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
579 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
580
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
581 MfwRes mmeDelete (MfwHnd h)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
582 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
583 MfwRes res;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
584
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
585 if (!h)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
586 return MfwResIllHnd;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
587
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
588 res = (mfwRemove(h)) ? MfwResOk : MfwResIllHnd;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
589
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
590 mfwFree(((MfwHdr *) h)->data,sizeof(MfwMme));
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
591 mfwFree(h,sizeof(MfwHdr));
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
592
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
593 return res;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
594 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
595
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
596
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
597 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
598 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
599 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
600 | STATE : code ROUTINE : mmeHdsInit |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
601 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
602
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
603 PURPOSE : init the Headset detection and setup callback handler
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
604
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
605 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
606
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
607 MfwRes mmeHdsInit (void (*hds_init) ())
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
608 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
609 mfwMmeDrvFlag &= ~MmeFlagHdsDetect;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
610
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
611 return MfwResOk;/*a0393213 compiler warnings removal - 1 changed to MfwResOk*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
612 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
613
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
614
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
615 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
616 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
617 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
618 | STATE : code ROUTINE : mmeRtcInit |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
619 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
620
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
621 PURPOSE : init the RTC and setup the alarm callback handler
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
622
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
623 extern UBYTE clk_Init (USHORT, drv_SignalCB_Type, UBYTE*);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
624 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
625
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
626 MfwRes mmeRtcInit (USHORT drvHandle, UBYTE *info)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
627 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
628 mfwMmeDrvFlag &= ~MmeFlagRtcAlarm;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
629
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
630 return MfwResOk; // RAVI /*a0393213 compiler warnings removal - 0 changed to MfwResOk*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
631 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
632
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
633
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
634 static int mme_backlightStatus[BL_LAST_OPTION];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
635 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
636 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
637 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
638 | STATE : code ROUTINE : mme_setBacklightIdle |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
639 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
640
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
641 PURPOSE : called when an event may change the backlight level/status
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
642
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
643 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
644 void mme_backlightEvent(int event)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
645 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
646 int light;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
647 if ((event >=BL_INIT) && (event <BL_LAST_OPTION))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
648 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
649 light = mme_backlightStatus[event];
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
650 if (light == BL_SET_IDLE)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
651 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
652 light_setBacklightIdle();
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
653 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
654 else if (light == BL_NO_CHANGE)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
655 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
656 //No change
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
657 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
658 else if ((light >=BL_NO_LIGHT) && (light <=BL_MAX_LIGHT))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
659 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
660 mmeBackLight ((U8)light);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
661 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
662
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
663 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
664 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
665
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
666 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
667 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
668 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
669 | STATE : code ROUTINE : mme_setBacklightIdle |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
670 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
671
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
672 PURPOSE : called to initialise backlight events
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
673
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
674 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
675 void mme_setBacklightEvent(int event, int lightLevel)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
676 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
677 if ((event >=BL_INIT) && (event <BL_LAST_OPTION))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
678 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
679 mme_backlightStatus[event] = lightLevel;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
680 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
681 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
682
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
683
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
684 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
685 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
686 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
687 | STATE : code ROUTINE : mmeBackLight |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
688 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
689
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
690 PURPOSE : set display backlight
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
691
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
692 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
693 void mmeBackLight (U8 level)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
694 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
695 light_SetStatus(LIGHT_DEVICE_BACKLIGHT,level);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
696 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
697
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
698
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
699 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
700 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
701 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
702 | STATE : code ROUTINE : mmeAudioTone |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
703 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
704
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
705 PURPOSE : configure the buzzer
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
706
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
707 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
708
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
709 void mmeAudioTone (U8 callTone, U8 volume, U8 toneStat)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
710 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
711 if (toneStat EQ TONE_SWT_OFF)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
712 #ifdef FF_MMI_RINGTONE /* Stop MSL Play */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
713 audio_StopSoundbyID(AUDIO_SPEAKER, CALLTONE_SELECT);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
714 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
715 audio_StopSoundbyID(AUDIO_SPEAKER,callTone);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
716 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
717 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
718 #ifdef FF_MMI_RINGTONE /* Play MSL Ring tone */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
719 audio_PlaySoundID(AUDIO_SPEAKER,CALLTONE_SELECT,volume,toneStat);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
720 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
721 audio_PlaySoundID(AUDIO_SPEAKER,callTone,volume,toneStat);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
722 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
723 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
724
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
725
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
726 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
727 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
728 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
729 | STATE : code ROUTINE : mmeSetVolume |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
730 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
731
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
732 PURPOSE : configure mic and speaker volume
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
733
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
734 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
735
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
736 MfwRes mmeSetVolume (U16 audioIn, U16 audioOut)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
737 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
738 if (audioIn > 255) audioIn = 255;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
739 if (audioOut > 255) audioOut = 255;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
740
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
741 audio_SetAmplf(AUDIO_MICROPHONE,(U8) audioIn);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
742 audio_SetAmplf(AUDIO_SPEAKER,(U8) audioOut);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
743
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
744 return MfwResOk;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
745 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
746
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
747
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
748 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
749 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
750 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
751 | STATE : code ROUTINE : mmeRxInfo |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
752 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
753
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
754 PURPOSE : configure signal quality information:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
755 request from the PS an indication on change of the
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
756 rx level with n intervalls.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
757 Parameters mode and level are not used in the moment.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
758
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
759 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
760
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
761 void mmeRxInfo (U8 intervalls, U16 level)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
762 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
763 rx_DCB_Type rx_DCB;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
764
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
765 rx_DCB.Steps = intervalls;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
766 rx_SetConfig(&rx_DCB);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
767 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
768
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
769
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
770 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
771 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
772 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
773 | STATE : code ROUTINE : mmeBattInfo |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
774 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
775
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
776 PURPOSE : configure battery level information
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
777
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
778
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
779 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
780
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
781 void mmeBattInfo ( U8 intervalls, U16 level)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
782 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
783 pwr_DCB_Type pwr_DCB;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
784
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
785 if (level > 255) level = 255;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
786
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
787 pwr_DCB.RangeMin = (U8) level; /* low level threshold */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
788 pwr_DCB.RangeMax = 100; /* 100 Percent */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
789 pwr_DCB.Steps = intervalls; /* n Steps */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
790 pwr_SetConfig(&pwr_DCB);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
791 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
792
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
793
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
794 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
795 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
796 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
797 | STATE : code ROUTINE : sigExec |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
798 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
799
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
800 PURPOSE : execute equipment signal
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
801
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
802 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
803
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
804 static int sigExec (MfwHdr *curElem, U32 evt, U32 val)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
805 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
806 MfwMme *ec;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
807
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
808 while (curElem)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
809 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
810 if (curElem->type == MfwTypMme)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
811 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
812 ec = curElem->data;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
813 if (ec->map & evt)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
814 { /* events match */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
815 ec->value = val;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
816 if (ec->handler) /* handler valid */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
817 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
818 // PATCH LE 06.06.00
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
819 // store current mfw elem
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
820 current_mfw_elem = curElem;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
821 // END PATCH LE 06.06.00
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
822 if ((*(ec->handler))(evt,ec))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
823 return 1; /* event consumed */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
824 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
825 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
826 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
827 curElem = curElem->next;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
828 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
829
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
830 return 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
831 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
832
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
833
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
834 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
835 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
836 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
837 | STATE : code ROUTINE : mmeSignal |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
838 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
839
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
840 PURPOSE : equipment event (called by driver/PEI)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
841
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
842 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
843
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
844 void mmeSignal (U32 evt, U32 value)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
845 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
846 UBYTE temp=0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
847 #ifndef FF_POWER_MANAGEMENT
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
848 temp = dspl_Enable(0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
849 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
850 /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
851 display is enabled only when lcd refresh is needed*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
852 if(FFS_flashData.refresh == 1)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
853 temp = dspl_Enable(0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
854 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
855 if (mfwSignallingMethod EQ 0)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
856 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
857 if (mfwFocus)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
858 if (sigExec(mfwFocus,evt,value))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
859 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
860 #ifndef FF_POWER_MANAGEMENT
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
861 dspl_Enable(temp);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
862 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
863 /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
864 display is enabled only when lcd refresh is needed*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
865 if(FFS_flashData.refresh == 1)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
866 dspl_Enable(temp);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
867 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
868 return;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
869 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
870 if (mfwRoot)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
871 sigExec(mfwRoot,evt,value);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
872 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
873 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
874 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
875 MfwHdr * h = 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
876
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
877 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
878 * Focus set, then start here
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
879 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
880 if (mfwFocus)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
881 h = mfwFocus;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
882 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
883 * Focus not set, then start root
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
884 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
885 if (!h)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
886 h = mfwRoot;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
887
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
888 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
889 * No elements available, return
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
890 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
891
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
892 while (h)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
893
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
894
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
895 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
896 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
897 * Signal consumed, then return
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
898 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
899 if (sigExec (h, evt, value))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
900 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
901 #ifndef FF_POWER_MANAGEMENT
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
902 dspl_Enable(temp);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
903 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
904 /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
905 display is enabled only when lcd refresh is needed*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
906 if(FFS_flashData.refresh == 1)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
907 dspl_Enable(temp);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
908 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
909 return;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
910 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
911
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
912 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
913 * All windows tried inclusive root
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
914 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
915 if (h == mfwRoot)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
916 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
917 #ifndef FF_POWER_MANAGEMENT
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
918 dspl_Enable(temp);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
919 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
920 /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
921 display is enabled only when lcd refresh is needed*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
922 if(FFS_flashData.refresh == 1)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
923 dspl_Enable(temp);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
924 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
925 return;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
926 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
927
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
928 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
929 * get parent window
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
930 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
931 h = mfwParent(mfwParent(h));
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
932 if(h)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
933 h = ((MfwWin * )(h->data))->elems;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
934 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
935 sigExec (mfwRoot, evt, value);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
936
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
937 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
938 #ifndef FF_POWER_MANAGEMENT
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
939 dspl_Enable(temp);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
940 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
941 /*OMAPS00098881 (removing power variant) a0393213(Prabakar)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
942 display is enabled only when lcd refresh is needed*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
943 if(FFS_flashData.refresh == 1)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
944 dspl_Enable(temp);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
945 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
946 return;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
947 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
948
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
949
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
950 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
951 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
952 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
953 | STATE : code ROUTINE : mmeCommand |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
954 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
955
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
956 PURPOSE : handle mfw windows command
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
957
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
958 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
959
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
960 static int mmeCommand (U32 cmd, void *h)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
961 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
962 switch (cmd)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
963 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
964 case MfwCmdDelete: /* delete me */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
965 if (!h)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
966 return 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
967 mmeDelete(h);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
968 return 1;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
969 default:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
970 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
971 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
972
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
973 return 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
974 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
975
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
976
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
977 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
978 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
979 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
980 | STATE : code ROUTINE : rAT_PercentSQ |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
981 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
982
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
983 PURPOSE : called by ACI on change of signal quality
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
984
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
985 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
986
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
987 void rAT_PercentSQ (BYTE val)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
988 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
989 TRACE_FUNCTION("rAT_PercentSQ()");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
990
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
991 //ES!! no longer needed mmeSignal(MfwMmeSignal,val);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
992 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
993
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
994
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
995 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
996 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
997 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
998 | STATE : code ROUTINE : rAT_PercentBC |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
999 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1000
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1001 PURPOSE : called by ACI on change of battery status
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1002
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1003 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1004
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1005 void rAT_PercentBC (BYTE val)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1006 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1007 TRACE_FUNCTION("rAT_PercentBC()");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1008
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1009 //ES!! no longer needed mmeSignal(MfwMmeBattery,val);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1010 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1011
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1012
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1013 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1014 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1015 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1016 | STATE : code ROUTINE : mmePrimHandler |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1017 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1018
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1019 PURPOSE : MME primitive handler
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1020
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1021 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1022
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1023 static BOOL mmePrimHandler (USHORT opc, void *data)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1024 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1025 U8 level;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1026 U8 state;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1027 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1028 #ifdef FF_MMI_AUDIO_PROFILE
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1029 U8 hdsData;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1030 U8 cktData;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1031 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1032
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1033
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1034 // TRACE_FUNCTION ("mmePrimHandler()");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1035
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1036 switch (opc)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1037 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1038 case MMI_RXLEV_IND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1039 level = ((T_MMI_RXLEV_IND *) data)->rxlev;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1040 mmeSignal(MfwMmeSignal,level);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1041 return TRUE; /* processed by MME, delete */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1042 case MMI_BATTERY_IND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1043 level = ((T_MMI_BATTERY_IND *) data)->volt;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1044 state = ((T_MMI_BATTERY_IND *) data)->temp;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1045 if (battLevel != level)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1046 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1047 battLevel = level;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1048 mmeSignal(MfwMmeBattery,level);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1049 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1050 if (battState != state)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1051 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1052 battState = state;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1053 mmeSignal(MfwMmeBaState,state);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1054 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1055 return TRUE; /* processed by MME, delete */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1056 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1057 // the corresponding callback function is called in MMI context
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1058 // this comment will be removed once the sap for this is available
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1059 #ifdef FF_MMI_AUDIO_PROFILE
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1060 case MMI_HEADSET_IND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1061 TRACE_EVENT("MMI_HEADSET_IND");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1062 hdsData = ((T_MMI_HEADSET_IND *) data)->headset_status;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1063 mmeSignal(MfwMmeHeadset,hdsData);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1064 return TRUE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1065 case MMI_CARKIT_IND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1066 TRACE_EVENT("MMI_CARKIT_IND");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1067 cktData = ((T_MMI_CARKIT_IND *) data)->carkit_status;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1068 mmeSignal(MfwMmeCarkit, cktData);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1069 return TRUE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1070 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1071 //xashmic 9 Sep 2006, OMAPS00092732
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1072 //Handler for USB connect or disconnect events
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1073 #ifdef FF_MMI_USBMS
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1074 case USBMS_MMI_IND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1075 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1076 T_USBMS_MMI_IND *usbms_mmi_ind=(T_USBMS_MMI_IND *) data;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1077 switch(usbms_mmi_ind->usb_status)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1078 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1079 case USB_CABLE_CONNECT_EVENT:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1080 TRACE_EVENT("USB_CABLE_CONNECT_EVENT");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1081 //xashmic 27 Sep 2006, OMAPS00096389
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1082 //xashmic 21 Sep 2006, OMAPS00095831
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1083 //To enumerate based on user selection
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1084 if( ( getBootUpState() > 0 ) && ( getUSBMSFlags() & MFW_USBMS_POPUP_ENABLE))
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1085 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1086 mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_CONNECT_EVENT);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1087 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1088 //xashmic 21 Sep 2006, OMAPS00095831
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1089 //To Enumerate automatically
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1090 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1091 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1092 //x0pleela 01 Apr, 2007 ER: OMAPS00122561
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1093 #ifdef FF_PHONE_LOCK
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1094 //x0pleela 29 May, 2007 DR: OMAPS00132483
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1095 //Check the phone lock status
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1096 if( mfw_get_Phlock_status() )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1097 mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_CONNECT_EVENT);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1098 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1099 #endif //FF_PHONE_LOCK
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1100 mfw_usbms_enum_control(MFW_USB_ENUM , MFW_USB_TYPE_ALL);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1101 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1102 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1103 case USB_CABLE_DISCONNECT_EVENT:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1104 TRACE_EVENT("USB_CABLE_DISCONNECT_EVENT");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1105 mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_DISCONNECT_EVENT);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1106 mfw_usbms_enum_control(MFW_USB_NO_ENUM , MFW_USB_TYPE_ALL);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1107 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1108 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1109 PFREE(usbms_mmi_ind);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1110 return TRUE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1111 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1112
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1113 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1114 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1115 #ifdef FF_MMI_TFLASH
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1116 case TFLASH_MMI_IND:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1117 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1118 T_TFLASH_MMI_IND *tflash_mmi_ind=(T_TFLASH_MMI_IND *) data;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1119 switch(tflash_mmi_ind->mc_status)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1120 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1121 case MC_INSERT_EVENT:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1122 TRACE_EVENT("TFLASH card inserted");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1123 mmeSignal(MfwMmeUSBMS , MFW_TFLASH_INSERTED_EVENT);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1124 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1125 case MC_REMOVE_EVENT:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1126 TRACE_EVENT("TFLASH card removed");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1127 mmeSignal(MfwMmeUSBMS , MFW_TFLASH_REMOVED_EVENT);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1128 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1129 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1130 PFREE(tflash_mmi_ind);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1131 return TRUE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1132 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1133 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1134 /* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1135
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1136 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1137 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1138
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1139 return FALSE; /* not processed, forward */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1140 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1141
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1142
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1143 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1144 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1145 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1146 | STATE : code ROUTINE : mmeFlagHandler |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1147 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1148
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1149 PURPOSE : MME driver flag handler
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1150
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1151 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1152
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1153 void mmeFlagHandler (void)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1154 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1155 TRACE_FUNCTION ("mmeFlagHandler()");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1156
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1157 while (mfwMmeDrvFlag)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1158 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1159 if (mfwMmeDrvFlag & MmeFlagRtcAlarm)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1160 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1161 mfwMmeDrvFlag &= ~MmeFlagRtcAlarm;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1162 mmeSignal(MfwMmeRtcAlarm,0);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1163 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1164 else if (mfwMmeDrvFlag & MmeFlagHdsDetect)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1165 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1166 mfwMmeDrvFlag &= ~MmeFlagHdsDetect;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1167 mmeSignal(MfwMmeHdsDetect,hdsPresence);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1168 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1169 else if (mfwMmeDrvFlag & MmeFlagIrdaMsg)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1170 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1171 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1172 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1173 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1174 mfwMmeDrvFlag = 0;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1175 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1176 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1177 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1178
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1179
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1180 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1181 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1182 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1183 | STATE : code ROUTINE : pwr_callback |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1184 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1185
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1186 PURPOSE : Called by battery driver
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1187
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1188 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1189
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1190 static void pwrCb (drv_SignalID_Type *signal_params)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1191 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1192 pwr_Status_Type *para;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1193 PALLOC(battery_ind, MMI_BATTERY_IND);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1194
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1195 para = (pwr_Status_Type *) signal_params->UserData;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1196 battery_ind->volt = para->BatteryLevel;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1197 battery_ind->temp = para->Status;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1198
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1199 PSENDX(ACI,battery_ind);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1200 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1201
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1202
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1203 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1204 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1205 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1206 | STATE : code ROUTINE : rx_callback |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1207 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1208
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1209 PURPOSE : Called by fieldstrength driver
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1210
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1211 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1212
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1213 static void rxCb (drv_SignalID_Type *signal_params)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1214 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1215 rx_Status_Type *para;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1216 PALLOC(rxlevel_ind,MMI_RXLEV_IND);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1217
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1218 para = (rx_Status_Type *) signal_params->UserData;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1219 rxlevel_ind->rxlev = para->actLevel;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1220
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1221 PSENDX(ACI,rxlevel_ind);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1222 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1223
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1224
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1225 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1226 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1227 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1228 | STATE : code ROUTINE : rtcCb |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1229 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1230
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1231 PURPOSE : alarm callback from RTC
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1232
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1233 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1234 /*a0393213(R.Prabakar) lint warnings removal
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1235 warning:symbol(rtcCb) not referenced
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1236 soln :this function was not at all called. so this function has been put under MMI_LINT_WARNING_REMOVAL,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1237 which is not defined. If this function is needed this flag can be removed*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1238 #ifdef MMI_LINT_WARNING_REMOVAL
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1239 static void rtcCb (drv_SignalID_Type *signal_params)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1240 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1241 mfwMmeDrvFlag |= MmeFlagRtcAlarm;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1242 vsi_c_awake(VSI_CALLER_SINGLE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1243 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1244 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1245
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1246
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1247
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1248 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1249 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1250 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1251 | STATE : code ROUTINE : hdsCb |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1252 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1253
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1254 PURPOSE : callback from headset detection
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1255
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1256 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1257 #ifndef FF_MMI_AUDIO_PROFILE /*a0393213 warnings removal*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1258 static void hdsCb (drv_SignalID_Type *signal_params)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1259 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1260 if (signal_params->SignalType == 1)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1261 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1262 hdsPresence = (U16)signal_params->UserData;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1263 mfwMmeDrvFlag |= MmeFlagHdsDetect;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1264 vsi_c_awake(VSI_CALLER_SINGLE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1265 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1266 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1267 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1268
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1269 #ifdef FF_MMI_AUDIO_PROFILE
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1270 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1271 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1272 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1273 | STATE : code ROUTINE : mfw_set_stereo_path |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1274 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1275
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1276 PURPOSE : This sets the stereo path for the current audio profile
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1277
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1278 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1279
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1280 void mfw_set_stereo_path(int device)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1281 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1282 TRACE_FUNCTION("mfw_set_stereo_path()");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1283
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1284 TRACE_EVENT_P1("Device === %d", device);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1285 switch(device)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1286 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1287 case MFW_AUD_HEADSET:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1288 audio_set_path(AUDIO_STEREO_SPEAKER_HEADPHONE, TRUE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1289 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1290 case MFW_AUD_HANDHELD:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1291 audio_set_path(AUDIO_STEREO_SPEAKER_HANDHELD, TRUE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1292 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1293 case MFW_AUD_CARKIT:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1294 audio_set_path(AUDIO_STEREO_SPEAKER_CARKIT, TRUE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1295 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1296 case MFW_AUD_LOUDSPEAKER:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1297 audio_set_path(AUDIO_STEREO_SPEAKER_HANDFREE, TRUE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1298 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1299 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1300 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1301 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1302 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1303 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1304 | STATE : code ROUTINE : mfw_unset_stereo_path |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1305 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1306
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1307 PURPOSE : This resets the voice path for the current audio profile
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1308
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1309 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1310 void mfw_unset_stereo_path(int device)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1311 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1312 TRACE_FUNCTION("mfw_unset_stereo_path()");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1313
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1314 TRACE_EVENT_P1("Device === %d", device);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1315 switch(device)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1316 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1317 case MFW_AUD_HEADSET:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1318 audio_set_path(AUDIO_SPEAKER_HEADSET, FALSE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1319 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1320 case MFW_AUD_HANDHELD:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1321 audio_set_path(AUDIO_SPEAKER_HANDHELD, FALSE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1322 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1323 case MFW_AUD_CARKIT:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1324 audio_set_path(AUDIO_SPEAKER_CARKIT, FALSE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1325 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1326 case MFW_AUD_LOUDSPEAKER:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1327 audio_set_path(AUDIO_SPEAKER_HANDFREE, FALSE);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1328 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1329 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1330 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1331
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1332 // Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1333 // Fix: Callback function called when mfw receives hook detect event from BSP
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1334 void mfw_audio_hook_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1335 ACCESSORY_CALLBACK_PARAM callbackparam )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1336 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1337
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1338 PALLOC(hdsData,MMI_HEADSET_IND);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1339 hdsData->headset_status = (U8)notify;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1340 PSENDX(ACI,hdsData);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1341
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1342 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1343
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1344 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1345 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1346 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1347 | STATE : code ROUTINE : mfw_audio_headSet_indication |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1348 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1349
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1350 PURPOSE :Callback function for the events related to headset and create and post a primitive
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1351
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1352 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1353 void mfw_audio_headSet_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1354 ACCESSORY_CALLBACK_PARAM callbackparam )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1355 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1356
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1357 PALLOC(hdsData,MMI_HEADSET_IND);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1358 hdsData->headset_status = (U8)notify;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1359 PSENDX(ACI,hdsData);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1360
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1361 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1362 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1363 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1364 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1365 | STATE : code ROUTINE : mfw_audio_headSet_indication |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1366 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1367
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1368 PURPOSE :Callback function for the events related to carkit and create and post a primitive
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1369
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1370 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1371 void mfw_audio_carKit_indication ( T_AUDIO_ACCESSORY_NOTIFICATION notify,
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1372 ACCESSORY_CALLBACK_PARAM callback_param )
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1373 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1374 PALLOC(cktData,MMI_CARKIT_IND);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1375 cktData->carkit_status = (U8)notify;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1376 PSENDX(ACI,cktData);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1377 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1378 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1379 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1380 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1381 | STATE : code ROUTINE : mfw_audio_headSet_indication |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1382 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1383
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1384 PURPOSE :handles the request to switch to the respective device from the
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1385 Bmi when the indications of insert and removal are received
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1386
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1387 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1388 void mfw_audio_device_indication( U8 notify)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1389 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1390 TRACE_FUNCTION("mfw_audio_device_indication()");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1391
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1392 TRACE_EVENT_P1(" Indication Type == %d",notify);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1393 switch(notify)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1394 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1395 case AUDIO_HEADSET_PLUGGED:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1396 if(currAudioDevice != MFW_AUD_HEADSET)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1397 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1398 mfw_audio_set_device(MFW_AUD_HEADSET);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1399 headsetInserted = TRUE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1400 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1401 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1402 case AUDIO_HEADSET_UNPLUGGED:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1403 if( currAudioDevice == MFW_AUD_HEADSET)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1404 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1405 mfw_audio_set_device(MFW_AUD_HANDHELD );
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1406
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1407 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1408 headsetInserted = FALSE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1409 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1410 case AUDIO_HEADSET_HOOK_DETECT:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1411 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1412 case AUDIO_CARKIT_PLUGGED:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1413 if(currAudioDevice != MFW_AUD_CARKIT)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1414 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1415 mfw_audio_set_device(MFW_AUD_CARKIT);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1416 carkitInserted = TRUE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1417 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1418 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1419 case AUDIO_CARKIT_UNPLUGGED:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1420 if( currAudioDevice == MFW_AUD_CARKIT)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1421 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1422 if(headsetInserted == TRUE)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1423 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1424 mfw_audio_set_device (MFW_AUD_HEADSET);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1425 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1426 else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1427 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1428 mfw_audio_set_device (MFW_AUD_HANDHELD);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1429 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1430 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1431 carkitInserted = FALSE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1432 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1433 default:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1434 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1435 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1436 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1437 /*
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1438 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1439 | PROJECT : MMI-Framework (8417) MODULE : MFW_MME |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1440 | STATE : code ROUTINE : mfw_audio_headSet_indication |
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1441 +--------------------------------------------------------------------+
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1442
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1443 PURPOSE :This function handles the switch between the handheld and loudspeaker.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1444 The type of device to be loaded will be posted from the menu selection
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1445 When the profile changes if there is any other media played then the
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1446 speaker should be set to stereo speaker
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1447
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1448 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1449 void mfw_audio_set_device(int type)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1450 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1451 /*Description: this array holds the file names on the ffs in which the audio profiles are stored.
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1452 The file names are yet to be confirmed from the audio services group*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1453 //char aud_cg_file[4][15] = {"handheld","loudspeaker","headset","carkit"};
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1454 TRACE_FUNCTION("mfw_audio_set_device()");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1455
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1456 TRACE_EVENT_P1("type of device = %d",type);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1457 switch(type)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1458 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1459 case MFW_AUD_HANDHELD:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1460 audio_set_device((char*)HANDHELD);// (aud_cg_file[HANDHELD] );
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1461 currAudioDevice = MFW_AUD_HANDHELD;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1462 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1463 case MFW_AUD_LOUDSPEAKER:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1464 audio_set_device((char*) LOUDSPEAKER);//(aud_cg_file[LOUDSPEAKER]);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1465 currAudioDevice = MFW_AUD_LOUDSPEAKER;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1466 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1467 case MFW_AUD_HEADSET:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1468 audio_set_device((char*)HEADSET);//(aud_cg_file[HEADSET]);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1469 currAudioDevice = MFW_AUD_HEADSET;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1470 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1471 case MFW_AUD_CARKIT:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1472 audio_set_device((char*)CARKIT);//(aud_cg_file[CARKIT]);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1473 currAudioDevice = MFW_AUD_CARKIT;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1474 default:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1475 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1476 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1477 if(TRUE == mfwAudPlay)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1478 mfw_set_stereo_path(currAudioDevice);
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1479
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1480 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1481
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1482 #ifdef ISAMPLE
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1483 /* OMAPS00057367, 3 Dec 2005, nekkareb : start */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1484 /* Function mfw_get_current_audioDevice modified to read the
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1485 current audio device using the audio service entity function
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1486 audio_full_access_read. This solves some synchronisation
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1487 problems b/n Audio & MMI for the DR OMAPS00057367 */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1488 /*returns the current active audio device*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1489 int mfw_get_current_audioDevice()
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1490 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1491 T_AUDIO_FULL_ACCESS_READ read;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1492 INT8 speaker;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1493
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1494 read.variable_indentifier = AUDIO_SPEAKER_MODE;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1495 read.data = &speaker;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1496
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1497 TRACE_FUNCTION("mfw_get_current_audioDevice()");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1498 audio_full_access_read(&read );
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1499
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1500 switch(speaker)
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1501 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1502 case AUDIO_SPEAKER_NONE:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1503 TRACE_EVENT("mfw_get_current_audioDevice() - SPEAKER PATH NOT CONFIGURED");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1504 currAudioDevice = MFW_AUD_HANDHELD; //Need to check the mapping
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1505 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1506 case AUDIO_SPEAKER_HANDHELD:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1507 currAudioDevice = MFW_AUD_HANDHELD;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1508 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1509 case AUDIO_SPEAKER_HEADSET:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1510 currAudioDevice = MFW_AUD_HEADSET;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1511 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1512 case AUDIO_SPEAKER_AUX:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1513 currAudioDevice = MFW_AUD_LOUDSPEAKER; //Need to check the mapping
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1514 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1515 case AUDIO_SPEAKER_CARKIT:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1516 currAudioDevice = MFW_AUD_CARKIT;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1517 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1518 case AUDIO_SPEAKER_HANDFREE:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1519 case AUDIO_SPEAKER_HANDFREE_CLASS_D:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1520 currAudioDevice = MFW_AUD_LOUDSPEAKER;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1521 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1522 case AUDIO_SPEAKER_INVERTED_VOICE:
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1523 currAudioDevice = MFW_AUD_HEADSET; //Need to check the mapping
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1524 break;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1525 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1526
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1527 return currAudioDevice;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1528 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1529 /* OMAPS00057367, 3 Dec 2005, nekkareb : end */
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1530 #else
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1531 /*returns the current active audio device*/
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1532 int mfw_get_current_audioDevice()
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1533 {
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1534 TRACE_FUNCTION("mfw_get_current_audioDevice()");
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1535 return currAudioDevice;
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1536 }
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1537 #endif //ISAMPLE
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1538 #endif
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1539
e8ddbb0837ed src/ui3: initial import of TCS3/LoCosto BMI & MFW code
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1540