changeset 200:f51fb87f4ae1

mfw_mme backlight layer: add notimer option
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 29 Mar 2021 02:52:27 +0000
parents b7421cdea22b
children 360034896a82
files src/ui/mfw/mfw_mme.c src/ui/mfw/mfw_mme.h
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ui/mfw/mfw_mme.c	Mon Mar 29 02:23:38 2021 +0000
+++ b/src/ui/mfw/mfw_mme.c	Mon Mar 29 02:52:27 2021 +0000
@@ -173,7 +173,7 @@
 #define	LIGHT_LEVEL_LOW	50
 #define	LIGHT_LEVEL_MAX	255
 
-UBYTE mme_backlight_incall;
+UBYTE mme_backlight_incall, mme_backlight_notimer;
 static U8 current_backlight_level;
 
 static MfwHdr bltimIdleH;	/* backlight timer for idle state */
@@ -463,6 +463,8 @@
 	timStop(&bltimIdleH);
 	timStop(&bltimCallH);
 	mmeBackLight(LIGHT_LEVEL_MAX);
+	if (mme_backlight_notimer)
+		return;
 	if (mme_backlight_incall)
 		timStart(&bltimCallH);
 	else
--- a/src/ui/mfw/mfw_mme.h	Mon Mar 29 02:23:38 2021 +0000
+++ b/src/ui/mfw/mfw_mme.h	Mon Mar 29 02:52:27 2021 +0000
@@ -169,7 +169,7 @@
 
 void mme_backlightOnEvent (void);
 int mme_backlightKeyPress (void);
-extern UBYTE mme_backlight_incall;
+extern UBYTE mme_backlight_incall, mme_backlight_notimer;
 
 void mmeRxInfo (U8 intervalls, U16 level);
 void mmeBattInfo (U8 intervalls, U16 level);