changeset 218:77b980f09bd9

Condat backlight driver switched to use the new R2D on/off API
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 24 Apr 2021 23:47:53 +0000
parents 6541e43f88e5
children d00662aa64d8
files src/condat/com/src/driver/light.c
diffstat 1 files changed, 1 insertions(+), 67 deletions(-) [+]
line wrap: on
line diff
--- a/src/condat/com/src/driver/light.c	Sat Apr 24 23:38:18 2021 +0000
+++ b/src/condat/com/src/driver/light.c	Sat Apr 24 23:47:53 2021 +0000
@@ -56,9 +56,8 @@
 
 #endif
 
-#include "main/sys_types.h"
 #include "fc-target.h"
-#include "armio.h"
+#include "r2d/r2d_blrr_api.h"
 #include "lls/lls_api.h"
 
 /*==== EXPORT =====================================================*/
@@ -69,7 +68,6 @@
 /* forward declaration for static functions */
 static void keypad_bl_on(void);
 static void keypad_bl_off(void);
-static void blrr_display_ctrl(UBYTE set_state);
 
 /*==== CONSTANTS ==================================================*/
 /*
@@ -91,11 +89,6 @@
 {
   backlight_status = LIGHT_STATUS_OFF;
 
-#ifdef CONFIG_TARGET_LUNA
-  /* PWL module clock enable */
-  *(volatile SYS_UWORD8 *)0xFFFE8001 = 0x01;
-#endif
-
   return DRV_OK;
 }
 
@@ -216,62 +209,3 @@
 }
 
 #endif
-
-/*******************************************************************************
-
-BLRR display (backlight required for readability) on/off control;
-the plan is to have this control eventually moved to R2D task.
-
-*******************************************************************************/
-
-#ifdef CONFIG_TARGET_LUNA
-
-static void blrr_display_ctrl(UBYTE set_state)
-{
-	UBYTE on_off;
-
-	/* PWL indication for development */
-	switch (set_state) {
-	case LIGHT_STATUS_OFF:
-		*(volatile SYS_UWORD8 *)0xFFFE8000 = 0;
-		on_off = 0;
-		break;
-	case LIGHT_STATUS_ON:
-		*(volatile SYS_UWORD8 *)0xFFFE8000 = 255;
-		on_off = 1;
-		break;
-	case LIGHT_STATUS_INCALL:
-		*(volatile SYS_UWORD8 *)0xFFFE8000 = 16;
-		on_off = 1;
-		break;
-	case LIGHT_STATUS_CHG_BOOT:
-		*(volatile SYS_UWORD8 *)0xFFFE8000 = 64;
-		on_off = 1;
-		break;
-	default:
-		return;		/* error, but we are a void function */
-	}
-	/* physical backlight on/off */
-	if (on_off)
-		AI_SetBit(9);
-	else
-		AI_ResetBit(9);
-}
-
-#elif defined(CONFIG_TARGET_C139)
-
-static void blrr_display_ctrl(UBYTE set_state)
-{
-	if (set_state != LIGHT_STATUS_OFF)
-		AI_SetBit(1);
-	else
-		AI_ResetBit(1);
-}
-
-#else
-
-static void blrr_display_ctrl(UBYTE set_state)
-{
-}
-
-#endif