comparison src/ui3/mfw/mfw_mme.h @ 420:e8ddbb0837ed

src/ui3: initial import of TCS3/LoCosto BMI & MFW code
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 21 Jan 2018 03:09:00 +0000
parents
children
comparison
equal deleted inserted replaced
419:59143cd42ec7 420:e8ddbb0837ed
1 /*
2 +--------------------------------------------------------------------+
3 | PROJECT: MMI-Framework (8417) $Workfile:: mfw_mme.h $|
4 | $Author:: Es $ CONDAT GmbH $Revision:: 2 $|
5 | CREATED: 11.02.99 $Modtime:: 22.02.00 11:20 $|
6 | STATE : code |
7 +--------------------------------------------------------------------+
8
9 MODULE : MFW_MME
10
11 PURPOSE : Miscelleaneous Mobile Equipment
12
13 EXPORT :
14
15 TO DO :
16
17 $History:: mfw_mme.h $
18 ************************************************************************
19
20 Mar 22, 2007 DVT: OMAPS00121916 x0039928(sumanth)
21 Description: T-Flash hot swap.
22
23 xashmic 27 Sep 2006, OMAPS00096389
24 ENH - a) Providing static menu for re-selection of enum options for enumeration
25 b) Popup menu displayed on connect event, can be enabled or disabled via menu option
26
27 xashmic 9 Sep 2006, OMAPS00092732
28 USBMS ER
29
30 * Apr 17, 2006 ER: OMAPS00075178 x0pleela
31 * Description: When the charger connect to phone(i-sample), the charger driver works, but the MMI and App don't work
32 * Solution: Defined events for battery charger status
33 *
34 * xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
35 * Description: Support for various audio profiles
36 * Solution: The support for audio device's carkit/headset/loudspeaker/handheld.
37 * The audio device is enabled as per the user actions.
38 *
39 * ***************** Version 2 *******************************************
40 * User: Es Date: 2.03.00 Time: 16:48
41 * Updated in $/GSM/Condat/MS/SRC/MFW
42 * generate battery/signal primitives with more info from driver
43 * callbacks. Catch the primitives on reception and call MMI event
44 * handler. Don't use ACI any longer for this purpose.
45 *
46 * ***************** Version 1 *****************
47 * User: Es Date: 20.02.99 Time: 11:54
48 * Created in $/GSM/DEV/MS/SRC/MFW
49 * mobile equipment
50 */
51
52 #ifndef _DEF_MFW_MME_H_
53 #define _DEF_MFW_MME_H_
54
55 typedef struct MfwMmeTag /* Equipment CONTROL BLOCK */
56 {
57 MfwEvt map; /* selection of events */
58 MfwCb handler; /* event handler */
59 U32 value; /* event related value */
60 } MfwMme;
61
62 /* EQUIPMENT FLAGS & EVENTS */
63 #define MfwMmeSignal 1 /* signal quality change */
64 #define MfwMmeBattery 2 /* battery level change */
65 #define MfwMmeBaState 4 /* state of power supply */
66 #define MfwMmeRtcAlarm 8 /* real time clock alarm */
67 #define MfwMmeHdsDetect 16 /* headset detection */
68 #define MfwMmeIrdaMsg 32 /* IRDA event */
69 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
70 #ifdef FF_MMI_AUDIO_PROFILE
71 #define MfwMmeHeadset 64 /* headset event */
72 #define MfwMmeCarkit 128 /* carkit event */
73 #endif
74 #ifdef FF_MMI_FILEMANAGER
75 #define TFLASH_MMI_IND 0x1110
76
77 typedef enum
78 {
79 MC_INSERT_EVENT = 0, //MC Inserted
80 MC_REMOVE_EVENT //MC Removed
81 }T_MC_EVENT;
82
83 typedef struct
84 {
85 T_MC_EVENT mc_status;
86 } T_TFLASH_MMI_IND;
87 #endif
88
89 //xashmic 9 Sep 2006, OMAPS00092732
90 #ifdef FF_MMI_USBMS
91 #define MfwMmeUSBMS 256
92
93 /*Defining the premitive*/
94 #define USBMS_MMI_IND 0x1000 //This value has been set keeping in mind that it would not clash with exisitng IND created via sap editor.
95
96 /* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */
97
98 typedef struct
99 {
100 U32 usb_status;
101 } T_USBMS_MMI_IND;
102 typedef enum
103 {
104 MFW_USB_ENUM = 0, //USB Proceed With ENUM
105 MFW_USB_NO_ENUM //USB Do not Enumerate
106 }T_MFW_USB_ENUM_CONTROL;
107 typedef enum
108 {
109 MFW_USB_TYPE_MS = 0,
110 MFW_USB_TYPE_TRACE,
111 MFW_USB_TYPE_AT,
112 MFW_USB_TYPE_AT_TRACE,//xashmic 27 Sep 2006, OMAPS00096389
113 MFW_USB_TYPE_MS_TRACE,//xashmic 27 Sep 2006, OMAPS00096389
114 MFW_USB_TYPE_AT_MS,//xashmic 27 Sep 2006, OMAPS00096389
115 MFW_USB_TYPE_ALL
116 }T_MFW_USB_ENUM_TYPE;
117 typedef enum
118 {
119 MFW_USB_CABLE_CONNECT_EVENT = 0, //USB Cable Connection Detected
120 MFW_USB_CABLE_DISCONNECT_EVENT, //USB Cable Removal Detected
121 MFW_USB_ENUM_SUCCESS_EVENT, //USB Enumeration Successful
122 MFW_USB_ENUM_FAILURE_EVENT //USB Enumeration Failed
123 #ifdef FF_MMI_FILEMANAGER
124 ,MFW_TFLASH_INSERTED_EVENT,
125 MFW_TFLASH_REMOVED_EVENT
126 #endif
127 }T_MFW_USB_EVENT;
128
129
130 //xashmic 27 Sep 2006, OMAPS00096389
131 #define MFW_USBMS_PS_SHUTDOWN 0x01
132 #define MFW_USBMS_PS_NO_SHUTDOWN (~MFW_USBMS_PS_SHUTDOWN)
133 #define MFW_USBMS_POPUP_ENABLE 0x02
134 #define MFW_USBMS_POPUP_DISABLE (~MFW_USBMS_POPUP_ENABLE)
135 //PS shutdown disabled and Popup disabled
136 #define MFW_USBMS_DEFAULT MFW_USBMS_POPUP_ENABLE
137
138 #endif
139
140 //Light level settings
141 #define BL_NO_LIGHT 0
142 #define BL_MAX_LIGHT 255
143 #define BL_SET_IDLE -1
144 #define BL_NO_CHANGE -2
145
146 //Events that may affect the backlight
147 enum {
148 BL_INIT,
149 BL_IDLE_TIMER,
150 BL_KEY_PRESS,
151 BL_INCOMING_SMS,
152 BL_INCOMING_CALL,
153 BL_EXIT,
154 BL_SPARE_OPTION_1,
155 BL_SPARE_OPTION_2,
156 BL_SPARE_OPTION_3,
157 BL_LAST_OPTION
158 };
159 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
160 #ifdef FF_MMI_AUDIO_PROFILE
161 #define MFW_AUD_HANDHELD 1
162 #define MFW_AUD_LOUDSPEAKER 2
163 #define MFW_AUD_HEADSET 3
164 #define MFW_AUD_CARKIT 4
165 #endif
166
167 //x0pleela 10 Apr, 2006
168 //Events for battery charger status
169 enum{
170 PWR_CHG_BEGIN= 2, // charger begin
171 PWR_CHG_STOP = 3, // charger end
172 PWR_CHG_PLUG = 4, // charger plug
173 PWR_CHG_UNPLUG = 5 // charger unplug
174 };
175 /* PROTOTYPES */
176 MfwRes mmeInit (void);
177 MfwRes mmeExit (void);
178 MfwHnd mmeCreate (MfwHnd w, MfwEvt e, MfwCb f);
179 MfwRes mmeDelete (MfwHnd h);
180 void mmeSignal (U32 evt, U32 val);
181 void mmeBackLight (U8 level);
182 void mme_setBacklightEvent(int event, int lightLevel);
183 void mme_backlightEvent(int event);
184 void mmeAudioTone (U8 callTone, U8 volume, U8 toneStat);
185 MfwRes mmeSetVolume (U16 audioIn, U16 audioOut);
186 MfwRes mmeRtcInit (USHORT drvHandle, UBYTE *info);
187 MfwRes mmeHdsInit (void (*hds_init) ());
188
189 void mmeRxInfo (U8 intervalls, U16 level);
190 void mmeBattInfo (U8 intervalls, U16 level);
191 // xpradipg - LOCOSTO-ENH-31895 : 23 June 2005
192 #ifdef FF_MMI_AUDIO_PROFILE
193 EXTERN void mfw_auido_device_indication(U8 notify);
194 EXTERN int mfw_get_current_audioDevice();
195 EXTERN void mfw_unset_stereo_path(int device);
196 EXTERN void mfw_set_stereo_path(int device);
197 #endif
198 #endif