FreeCalypso > hg > fc-tourmaline
changeset 199:b7421cdea22b
mfw_mme.c: rm code for non-Calypso platforms
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 29 Mar 2021 02:23:38 +0000 |
parents | bb5aba57ecfb |
children | f51fb87f4ae1 |
files | src/ui/mfw/mfw_mme.c |
diffstat | 1 files changed, 1 insertions(+), 285 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ui/mfw/mfw_mme.c Mon Mar 29 01:52:48 2021 +0000 +++ b/src/ui/mfw/mfw_mme.c Mon Mar 29 02:23:38 2021 +0000 @@ -142,23 +142,9 @@ #include "mfw_acie.h" #include "mfw_mme.h" #include "mfw_win.h" -#include "mfw_ffs.h" /*OMAPS00098881 x0039928(sumanth)*/ -//xashmic 9 Sep 2006, OMAPS00092732 -#ifdef FF_MMI_USBMS -#include "usb/usb_api.h" -#endif +#include "mfw_ffs.h" #include "fchg/fchg_api.h" -//x0pleela 01 Apr, 2007 ER: OMAPS00122561 -#ifdef FF_PHONE_LOCK -#include "mfw_sim.h" -#endif //FF_PHONE_LOCK - -/* OMAPS00057367, 8 Dec 2005, nekkare, build fix */ -#if (BOARD == 71) -#define ISAMPLE -#endif - #define hCommPL _ENTITY_PREFIXED(hCommPL) #define hCommACI _ENTITY_PREFIXED(hCommACI) @@ -235,14 +221,6 @@ ACCESSORY_CALLBACK_PARAM callbackparam ); #endif -/* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ -#ifdef FF_MMI_TFLASH -void tflash_notify_register(void); -typedef void (*T_MC_EVENT_CALLBACK)(T_MC_EVENT mcEvent, void *ctx); -#endif -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ - void mfw_audio_set_device(int type); //xdeepadh, nekkareb - OMAPS00076996: 05 May 2006 //Array to retrieve the profile name @@ -250,167 +228,6 @@ char aud_cg_file[5][15] = {"handheld","handheld","handfree","headset","carkit"}; #endif -//x0pleela 29 May, 2007 DR: OMAPS00132483 -#ifdef FF_PHONE_LOCK -EXTERN int mfw_get_Phlock_status(void); -#endif // FF_PHONE_LOCK - -/* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ -#ifdef FF_MMI_TFLASH -void tflash_cb(T_MC_EVENT mcEvent, void *ctx) -{ - PALLOC(tflash_mmi_ind, TFLASH_MMI_IND); - tflash_mmi_ind->mc_status = mcEvent; - PSENDX(ACI,tflash_mmi_ind); -} -#endif -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ - -//xashmic 9 Sep 2006, OMAPS00092732 -#ifdef FF_MMI_USBMS -/* -+--------------------------------------------------------------------+ -| PROJECT : MMI-Framework (8417) MODULE : MFW_MME | -| STATE : code ROUTINE : usbms_cb | -+--------------------------------------------------------------------+ - - PURPOSE : Posts the USB events to the MMI task - -*/ - -void usbms_cb (T_USB_EVENT usbEvent, void *ctx) -{ - PALLOC(usbms_mmi_ind,USBMS_MMI_IND); - usbms_mmi_ind->usb_status = (U8)usbEvent; - PSENDX(ACI,usbms_mmi_ind); -} - - - - -/* -+--------------------------------------------------------------------+ -| PROJECT : MMI-Framework (8417) MODULE : MFW_MME | -| STATE : code ROUTINE : mfw_usbms_init | -+--------------------------------------------------------------------+ - - PURPOSE : Registers a callback for USB connect/disconnect events - -*/ -void mfw_usbms_init(void) -{ - T_USB_RETURN ret; - TRACE_FUNCTION("mfw_usbms_init"); - ret = usb_register_notifcation( (T_USB_EVENT_CALLBACK)usbms_cb,NULL); - switch(ret) - { - case USB_NOT_SUPPORTED : - TRACE_ERROR("USB registeration unsuccessful- Not supported"); - break; - case USB_MEMORY_ERR: - TRACE_ERROR("USB registeration unsuccessful - Memeory error"); - break; - case USB_INTERNAL_ERR: - TRACE_ERROR("USB registeration unsuccessful - Internal error"); - break; - case USB_OK: - TRACE_EVENT("USB registeration successful"); - break; - } -} - -/* -+--------------------------------------------------------------------+ -| PROJECT : MMI-Framework (8417) MODULE : MFW_MME | -| STATE : code ROUTINE : mfw_usbms_enum_control | -+--------------------------------------------------------------------+ - - PURPOSE : Continues or abandons the enumeration based on user selection - -*/ -void mfw_usbms_enum_control(T_MFW_USB_ENUM_CONTROL usbms_enum_status, T_MFW_USB_ENUM_TYPE usb_enum_type) -{ - T_USB_ENUM_INFO enumInfo; - T_USB_RETURN ret; - TRACE_FUNCTION("mfw_usbms_enum_control"); - switch(usb_enum_type) - { - case MFW_USB_TYPE_MS: - enumInfo.info=USB_MS; - break; - case MFW_USB_TYPE_AT: - enumInfo.info=USB_AT; - break; - case MFW_USB_TYPE_TRACE: - enumInfo.info=USB_TRACE; - break; - case MFW_USB_TYPE_AT_MS://xashmic 27 Sep 2006, OMAPS00096389 - enumInfo.info=USB_AT|USB_MS; - break; - case MFW_USB_TYPE_AT_TRACE://xashmic 27 Sep 2006, OMAPS00096389 - enumInfo.info=USB_AT|USB_TRACE; - break; - case MFW_USB_TYPE_MS_TRACE://xashmic 27 Sep 2006, OMAPS00096389 - enumInfo.info=USB_MS|USB_TRACE; - break; - case MFW_USB_TYPE_ALL: - enumInfo.info=USB_MS| USB_AT|USB_TRACE; - break; - default: - TRACE_ERROR("mfw_usbms_enum_control():Invalid type"); - return; - } - TRACE_EVENT_P1("Ports %x",enumInfo.info); - switch(usbms_enum_status) - { - case MFW_USB_ENUM: - ret=usb_enum_control(USB_ENUM,&enumInfo); - TRACE_EVENT_P1("mfw_usbms_enum_control:ret:%d", ret); - switch(ret) - { - case USB_NOT_SUPPORTED : - TRACE_ERROR("USB enumeration unsuccessful- Not supported"); - break; - case USB_MEMORY_ERR: - TRACE_ERROR("USB enumeration unsuccessful - Memeory error"); - break; - case USB_INTERNAL_ERR: - TRACE_ERROR("USB enumeration unsuccessful - Internal error"); - break; - case USB_OK: - TRACE_EVENT("USB enumeration successful"); - break; - default: - TRACE_ERROR("USB enumeration unsuccessful - Invalid return"); - break; - } - break; - case MFW_USB_NO_ENUM: - ret=usb_enum_control(USB_NO_ENUM,&enumInfo); - switch(ret) - { - case USB_NOT_SUPPORTED : - TRACE_ERROR("USB no enumeration unsuccessful- Not supported"); - break; - case USB_MEMORY_ERR: - TRACE_ERROR("USB no enumeration unsuccessful - Memeory error"); - break; - case USB_INTERNAL_ERR: - TRACE_ERROR("USB no enumeration unsuccessful - Internal error"); - break; - case USB_OK: - TRACE_EVENT("USB no enumeration successful"); - break; - default: - TRACE_ERROR("USB enumeration successful - Invalid return"); - break; - } - break; - } -} - -#endif /* +--------------------------------------------------------------------+ @@ -466,40 +283,9 @@ /* install prim handler */ pSlot = aci_create((T_PRIM_HANDLER)mmePrimHandler,NULL); -//xashmic 9 Sep 2006, OMAPS00092732 -//Registers a callback for event handling -#ifdef FF_MMI_USBMS - mfw_usbms_init(); - -/* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ -#ifdef FF_MMI_TFLASH - tflash_notify_register(); -#endif -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ - -#endif - return MfwResOk; } -/* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ -#ifdef FF_MMI_TFLASH -void tflash_notify_register(void) -{ - T_RV_RET result; - - result = (T_RV_RET)mc_register_notifcation((T_MC_EVENT_CALLBACK)tflash_cb, NULL); - - if(result == RV_OK) - TRACE_EVENT("TFLASH callback registration successful"); - else - TRACE_ERROR("TFLASH callback registration failed"); -} -#endif -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ - // Jun 02, 2006 DRT OMAPS00079213 x0039928(sumanth) // Fix: Two new mfw hook register and unregister functions are added @@ -524,7 +310,6 @@ #endif - /* +--------------------------------------------------------------------+ | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | @@ -1085,72 +870,6 @@ mmeSignal(MfwMmeCarkit, cktData); return TRUE; #endif -//xashmic 9 Sep 2006, OMAPS00092732 -//Handler for USB connect or disconnect events -#ifdef FF_MMI_USBMS - case USBMS_MMI_IND: - { - T_USBMS_MMI_IND *usbms_mmi_ind=(T_USBMS_MMI_IND *) data; - switch(usbms_mmi_ind->usb_status) - { - case USB_CABLE_CONNECT_EVENT: - TRACE_EVENT("USB_CABLE_CONNECT_EVENT"); - //xashmic 27 Sep 2006, OMAPS00096389 - //xashmic 21 Sep 2006, OMAPS00095831 - //To enumerate based on user selection - if( ( getBootUpState() > 0 ) && ( getUSBMSFlags() & MFW_USBMS_POPUP_ENABLE)) - { - mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_CONNECT_EVENT); - } - //xashmic 21 Sep 2006, OMAPS00095831 - //To Enumerate automatically - else - { -//x0pleela 01 Apr, 2007 ER: OMAPS00122561 - #ifdef FF_PHONE_LOCK - //x0pleela 29 May, 2007 DR: OMAPS00132483 - //Check the phone lock status - if( mfw_get_Phlock_status() ) - mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_CONNECT_EVENT); - else - #endif //FF_PHONE_LOCK - mfw_usbms_enum_control(MFW_USB_ENUM , MFW_USB_TYPE_ALL); - } - break; - case USB_CABLE_DISCONNECT_EVENT: - TRACE_EVENT("USB_CABLE_DISCONNECT_EVENT"); - mmeSignal(MfwMmeUSBMS , MFW_USB_CABLE_DISCONNECT_EVENT); - mfw_usbms_enum_control(MFW_USB_NO_ENUM , MFW_USB_TYPE_ALL); - break; - } - PFREE(usbms_mmi_ind); - return TRUE; - } - -/* Mar 22, 2007 DVT: OMAPS00121916 x0039928 */ -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- Start */ -#ifdef FF_MMI_TFLASH - case TFLASH_MMI_IND: - { - T_TFLASH_MMI_IND *tflash_mmi_ind=(T_TFLASH_MMI_IND *) data; - switch(tflash_mmi_ind->mc_status) - { - case MC_INSERT_EVENT: - TRACE_EVENT("TFLASH card inserted"); - mmeSignal(MfwMmeUSBMS , MFW_TFLASH_INSERTED_EVENT); - break; - case MC_REMOVE_EVENT: - TRACE_EVENT("TFLASH card removed"); - mmeSignal(MfwMmeUSBMS , MFW_TFLASH_REMOVED_EVENT); - break; - } - PFREE(tflash_mmi_ind); - return TRUE; - } -#endif -/* Sep 26, 2007 Configuration of Drives for SBuild 2.3.0 Migration x0080701 (Bharat) -- End */ - -#endif } return FALSE; /* not processed, forward */ @@ -1275,7 +994,6 @@ #endif - /* +--------------------------------------------------------------------+ | PROJECT : MMI-Framework (8417) MODULE : MFW_MME | @@ -1567,5 +1285,3 @@ } #endif //ISAMPLE #endif - -