comparison src/ui/bmi/mmiMain.c @ 84:7160f0d005d2

first stage of actual FreeCalypso backlight rework
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 26 Oct 2020 23:46:55 +0000
parents 46bab586c09b
children 00f4455e4c45
comparison
equal deleted inserted replaced
83:718ede6f6f1f 84:7160f0d005d2
677 mme = mmeCreate(0, MfwMmeSignal|MfwMmeBattery|MfwMmeBaState, (MfwCb)globalMme); 677 mme = mmeCreate(0, MfwMmeSignal|MfwMmeBattery|MfwMmeBaState, (MfwCb)globalMme);
678 #endif 678 #endif
679 #endif 679 #endif
680 #endif 680 #endif
681 681
682 /*Setup when we want the backlight to come on*/ 682 mme_backlightOnEvent();
683 // Nov 09, 2005 REF: DVT OMAPS00056873 xdeepadh
684 //On Isample boards the backlight is set off, since the bright LEDS are very disturbing.
685
686 for (i=0;i<BL_LAST_OPTION;i++)
687 #if (BOARD == 71)
688 mme_setBacklightEvent(i,BL_NO_LIGHT);
689 #else
690 mme_setBacklightEvent(i,BL_MAX_LIGHT);
691 #endif
692
693 #if (BOARD == 71)
694 mme_setBacklightEvent(BL_IDLE_TIMER,BL_NO_LIGHT);
695 #else
696 mme_setBacklightEvent(BL_IDLE_TIMER,BL_SET_IDLE);
697 #endif
698
699 mme_setBacklightEvent(BL_KEY_PRESS,BL_MAX_LIGHT);
700 mme_setBacklightEvent(BL_INCOMING_CALL,BL_MAX_LIGHT);
701 mme_setBacklightEvent(BL_EXIT,BL_NO_LIGHT);
702
703 /*and tell the backlight that the init event has happened */
704 mme_backlightEvent(BL_INIT);
705 683
706 //x0018858 24 Mar, 2005 MMI-FIX-11321 684 //x0018858 24 Mar, 2005 MMI-FIX-11321
707 //Added two functions to set the indication and CMER values. 685 //Added two functions to set the indication and CMER values.
708 //begin 686 //begin
709 sms_set_cind_values(&cindSettings); 687 sms_set_cind_values(&cindSettings);
781 /* 759 /*
782 * Only do anything when we are called at the beginning of 760 * Only do anything when we are called at the beginning of
783 * sigDistribute() in mfw_kbd.c, rather than at the end. 761 * sigDistribute() in mfw_kbd.c, rather than at the end.
784 */ 762 */
785 if (res_int != -1) 763 if (res_int != -1)
786 return; 764 return 0;
787 765
788 /* terminate the ringing in all situation (it doesnt matter where the user is */ 766 /* terminate the ringing in all situation (it doesnt matter where the user is */
789 if ( (e & KEY_HUP) && (e & KEY_MAKE) ) 767 if ( (e & KEY_HUP) && (e & KEY_MAKE) )
790 { 768 {
791 /* Apr 05, 2005 REF: ENH 29994 xdeepadh */ 769 /* Apr 05, 2005 REF: ENH 29994 xdeepadh */
827 } 805 }
828 } 806 }
829 807
830 HUPKeyOrigin = 0; 808 HUPKeyOrigin = 0;
831 809
810 /* FreeCalypso backlight handling */
811 if (e & KEY_MAKE) {
812 if (mme_backlightKeyPress())
813 return 1;
814 } else {
815 mme_backlightOnEvent();
816 }
832 817
833 #ifdef SIM_TOOLKIT 818 #ifdef SIM_TOOLKIT
834 /*SPR#2121 - DS - Only download event to SAT if the event has been registered 819 /*SPR#2121 - DS - Only download event to SAT if the event has been registered
835 * by the SAT Setup Event List command 820 * by the SAT Setup Event List command
836 */ 821 */
1234 1219
1235 /*MC CONQUEST 5999->6007,21/05/02 if CPHS reading didn't work on switch-on, try again*/ 1220 /*MC CONQUEST 5999->6007,21/05/02 if CPHS reading didn't work on switch-on, try again*/
1236 if (CphsPresent() == CPHS_ERR) 1221 if (CphsPresent() == CPHS_ERR)
1237 cphs_support_check(); 1222 cphs_support_check();
1238 1223
1239 1224 /* removed in FreeCalypso */
1240 mme_backlightEvent(BL_IDLE_TIMER); 1225 /* mme_backlightEvent(BL_IDLE_TIMER); */
1241 1226
1242 timStart(times); 1227 timStart(times);
1243 1228
1244 return 1; 1229 return 1;
1245 } 1230 }