changeset 266:160a5b3a076c

new ABB_SLEEP_RESTRICTION definition in fc-target.h When we first introduced the mechanism to suppress ABB superdeep sleep on targets with LCDs powered from Iota VRIO, we made it conditional on CONFIG_TARGET_LUNA. This conditional is now being generalized: the feature in question is now conditionalized on the new ABB_SLEEP_RESTRICTION preprocessor symbol, to be defined in targets/*.h for those targets that need it. The new ABB_SLEEP_RESTRICTION definition is being added to targets/luna[12].h to keep the actual logic unchanged.
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 02 Jun 2021 02:12:14 +0000
parents e57bfdadf49a
children 10b3a6876273
files src/cs/drivers/drv_core/abb/abb.c targets/luna1.h targets/luna2.h
diffstat 3 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/drivers/drv_core/abb/abb.c	Mon May 17 07:18:36 2021 +0000
+++ b/src/cs/drivers/drv_core/abb/abb.c	Wed Jun 02 02:12:14 2021 +0000
@@ -110,7 +110,7 @@
  * This logic is included only for affected targets with LCDs.
  */
 
-#ifdef CONFIG_TARGET_LUNA
+#ifdef ABB_SLEEP_RESTRICTION
 int ABB_sleep_allowed = 0;
 #endif
 
@@ -871,7 +871,7 @@
       // Read VRPCSTS register value and extract status of meaningfull inputs.
       reg_val = ABB_ReadRegister(VRPCSTS) & 0x0070;
 
-    #ifdef CONFIG_TARGET_LUNA
+    #ifdef ABB_SLEEP_RESTRICTION
       if (reg_val == 0x30 && ABB_sleep_allowed)
     #else
       if (reg_val == 0x30)
--- a/targets/luna1.h	Mon May 17 07:18:36 2021 +0000
+++ b/targets/luna1.h	Wed Jun 02 02:12:14 2021 +0000
@@ -6,4 +6,5 @@
 #define	CONFIG_GPIO3_OUTPUT	1
 #define	GPIO1_SPEAKER_CTRL	0
 #define	UARTFAX_CLASSIC_DTR_DCD	0
+#define	ABB_SLEEP_RESTRICTION	1
 #define	TARGET_HAS_PWL		1
--- a/targets/luna2.h	Mon May 17 07:18:36 2021 +0000
+++ b/targets/luna2.h	Wed Jun 02 02:12:14 2021 +0000
@@ -4,4 +4,5 @@
 #define	CONFIG_GPIO1_HIGH	1
 #define	GPIO1_SPEAKER_CTRL	0
 #define	UARTFAX_CLASSIC_DTR_DCD	1
+#define	ABB_SLEEP_RESTRICTION	1
 #define	TARGET_HAS_PWL		1