changeset 137:1974d7cacf84

src/condat2/com/src/driver/light.c: C139 LCD backlight control
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 08 Oct 2016 05:15:48 +0000
parents 0b3338d36367
children 385841ccb7f8
files src/condat2/com/src/driver/light.c
diffstat 1 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/condat2/com/src/driver/light.c	Sat Oct 08 05:08:37 2016 +0000
+++ b/src/condat2/com/src/driver/light.c	Sat Oct 08 05:15:48 2016 +0000
@@ -55,6 +55,9 @@
 #include "light.h"
 
 #endif
+
+#include "fc-target.cfg"
+
 /*==== EXPORT =====================================================*/
 
 /*==== VARIABLES ==================================================*/
@@ -251,9 +254,12 @@
 {
     if (backLightState == BACKLIGHT_OFF)
     {
-//#ifdef  DSAMPLE_COLOUR
+      #ifdef CONFIG_TARGET_C139
+        AI_SetBit(1);
+      #endif
+      //#ifdef  DSAMPLE_COLOUR
         lls_switch_on(LLS_BACKLIGHT); //Switch backlight on 
-//#endif
+      //#endif
     }
     backLightState = BACKLIGHT_ON;
 }
@@ -273,10 +279,13 @@
     if ((backLightState == BACKLIGHT_ON) ||
        (backLightState == BACKLIGHT_IDLE1))
     {
-        backLightState = BACKLIGHT_OFF;
-//#ifdef  DSAMPLE_COLOUR
+      backLightState = BACKLIGHT_OFF;
+      #ifdef CONFIG_TARGET_C139
+        AI_ResetBit(1);
+      #endif
+      //#ifdef  DSAMPLE_COLOUR
         lls_switch_off(LLS_BACKLIGHT); //Switch backlight on    
-//#endif
+      //#endif
     }
 }
 /*******************************************************************************