FreeCalypso > hg > fc-tourmaline
diff src/ui/bmi/mmiMmi.c @ 213:0947a816580c
first stage of FreeCalypso handset switch-on logic rework
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 22 Apr 2021 21:23:16 +0000 |
parents | 7eee5ad6ae86 |
children |
line wrap: on
line diff
--- a/src/ui/bmi/mmiMmi.c Thu Apr 22 20:41:41 2021 +0000 +++ b/src/ui/bmi/mmiMmi.c Thu Apr 22 21:23:16 2021 +0000 @@ -130,29 +130,9 @@ #include "MmiDialogs.h" #include "MmiLists.h" -/* Retrieve PM duration from FlashData structure */ -#ifdef NEPTUNE_BOARD -#ifdef MMI_POWER_MANAGEMENT_TEST -#include "mfw_ffs.h" -#endif -#endif - #include "dspl.h" #include "drv_key.h" -#ifdef FF_MMI_MULTIMEDIA -/* To Assign the MSL_Init Return Value */ -#include "MSL.h" -#include "mmiMultimediaApp.h" -#include "omxutil.h" -/* Bug Fix - OMAPS00084167 */ -/* Added - To access the funtion dev_Mbox_isDspMboxReady () */ -#include "typedefs.h" -#include "main_system.h" -#include "dev_Mbox.h" /* 04-07-2006 */ -#include "mfw_acie.h" /* prototypes of aci_delete and aci_create */ -#endif - #ifdef MMI_LITE #define MFW_MEMORY_POOL_SIZE 22000 /*SPR 2686*/ #else @@ -184,37 +164,6 @@ /* x0039928 - Lint warning fix static int initialized = 0; */ -/* Begin Bug Fix - OMAPS00084167 */ -/* Added for Primitive exchange */ -#ifdef ENABLE_KEY_ON_BOOTING -#define hCommACI _ENTITY_PREFIXED(hCommACI) - -#if defined (NEW_FRAME) -EXTERN T_HANDLE hCommACI; -#else -EXTERN T_VSI_CHANDLE hCommACI; -#endif - -#define BOOTUP_WAIT_TIME 20 -#define BOOTUP_SUCCESS_IND 1 -#define MFW_BOOTUP_IND 0x910 - -static int iPrimitiveSlot = 0; - -/* ====================================================== */ -/** -* Structure which holds the Status details -**/ -/* ====================================================== */ -typedef struct -{ - int iStatus; -}T_MFW_BOOTUP_IND; - -GLOBAL BOOL bootup_response_cb (ULONG opc, void * data); -#endif -/* End - OMAPS00084167 */ - /******************************************************************************* @@ -236,88 +185,13 @@ void mmi_main( void ) { - /* JVJ #1874 - mmi_main doesnt start the MMI. It only initilizes the Keyboard handler*/ - /* The keyboard handler will call mmiInit() when the Power Key is pressed */ -// Jun 13 2005, REF:LOCOSTO-OTH-32113 - xpradipg -#if (BOARD == 61) -/* BUG FIX - OMAPS00084167 */ -/* For multimedia alone generate the primitive */ -#ifdef ENABLE_KEY_ON_BOOTING - /* Send the primitive to MMI */ - PALLOC (bootup_indication, MFW_BOOTUP_IND); -#endif -/* END - OMAPS00084167 */ - -#if FF_MMI_SERVICES_MIGRATION - drvKeyUpDown(0,0); -#else - key_power_init(); -#endif - - -#ifndef ENABLE_KEY_ON_BOOTING - vsi_t_sleep(VSI_CALLER 50); - mmiInit(); -#else - /* Begin - Bug fix - OMAPS00084167 */ - iPrimitiveSlot = aci_create (bootup_response_cb, NULL); - - bootup_indication->iStatus = BOOTUP_SUCCESS_IND; - PSENDX (ACI, bootup_indication); - /* End - OMAPS00084167 */ -#endif - - -#else /* Other Builds */ - key_power_init(); -#endif - +/* + * In FreeCalypso this function is now empty: Switch_ON() will call + * fchs_pwon_button_boot() which will cause mmiInit() to be called + * in MMI task context, and the setup of key_power_init (for subsequent + * power-off, not for power-on!) now happens inside mmiInit(). + */ } -/* Begin - Bugfix - OMAPS00084167 */ -#ifdef ENABLE_KEY_ON_BOOTING -/* ===========================================================*/ -/** -* bootup_response_cb () - response function. -* -* @param ULONG opc - Operation Code. -* -* @param void * data - structure data. -* -* @return BOOL - TRUE / FALSE -* -* @see -*/ -/* =========================================================== */ -GLOBAL BOOL bootup_response_cb (ULONG opc, void * data) -{ - T_MFW_BOOTUP_IND *bootup_indication; - - if (opc == MFW_BOOTUP_IND) { - bootup_indication = (T_MFW_BOOTUP_IND *)data; - - /* Status is 1 then bootup sequence has enabled */ - if (bootup_indication->iStatus == BOOTUP_SUCCESS_IND) { - /* Contineous Pooling */ - while (dev_Mbox_isDspMboxReady() == FALSE) - { - vsi_t_sleep (VSI_CALLER BOOTUP_WAIT_TIME); /* Small Delay after each check */ - } - - aci_delete (iPrimitiveSlot); - - /* Once DSP initialization is done */ - mmiInit (); - - return TRUE; - - } - - } - - return FALSE; - -} -#endif /* End - OMAPS00084167 */ /******************************************************************************* @@ -335,10 +209,6 @@ void mmiInit( void ) { -#ifdef FF_MMI_MULTIMEDIA - unsigned int uiResult = 0; -#endif - /* get the resources running */ @@ -347,11 +217,11 @@ mfwInit( mfwMem, sizeof( mfwMem ) ); winInit( &mmiScrX, &mmiScrY ); - timInit(); /* init timer handler */ kbdInit(); /* init keyboard handler */ + key_power_init(); /* init power-off handler */ lngInit(); /* init language handler */ - #ifndef NEW_EDITOR /* SPR#1428 - SH - New Editor changes */ + #ifndef NEW_EDITOR /* SPR#1428 - SH - New Editor changes */ edtInit(); /* init editor handler */ #endif /* NEW_EDITOR */ @@ -360,25 +230,6 @@ //Oct 05, 2006 ER: OMAPS00094496 x0061088(Prachi) sAT_PercentCSQ ( CMD_SRC_LCL, CSQ_Enable ); mainInit(0); -#ifdef FF_MMI_MULTIMEDIA - /* MSL Init Call */ - uiResult = MSL_Init(); - vsi_t_sleep(0, 100); - mmi_setInitResult(uiResult); - -/* Power management. Enable/Disable on boot up based on value stored*/ -#ifdef NEPTUNE_BOARD -#ifdef MMI_POWER_MANAGEMENT_TEST - if(FFS_flashData.pm_duration) - { - SVC_SCN_EnablePM( 1, FFS_flashData.pm_duration); - } -#endif -#endif - /* PCM Setup Done */ -/* MSLRM_Start (); */ -#endif - } @@ -397,11 +248,11 @@ void mmiExit( void ) { - TRACE_EVENT("mmiExit"); + TRACE_EVENT("mmiExit"); icnExit(); /* finit icon handler */ mnuExit(); /* finit menu handler */ - #ifndef NEW_EDITOR /* SPR#1428 - SH - New Editor changes */ + #ifndef NEW_EDITOR /* SPR#1428 - SH - New Editor changes */ edtExit(); /* finit edit handler */ #endif /* NEW_EDITOR */ lngExit(); /* finit language handler */ @@ -425,7 +276,6 @@ #ifndef _SIMULATION_ AI_Power(0); #endif //_SIMULATION_ - }