# HG changeset patch # User Mychaela Falconia # Date 1622599934 0 # Node ID 160a5b3a076cbde7ca4827c08b044931f88da04c # Parent e57bfdadf49abda6e3d2b22bf2397568b5068213 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. diff -r e57bfdadf49a -r 160a5b3a076c src/cs/drivers/drv_core/abb/abb.c --- 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) diff -r e57bfdadf49a -r 160a5b3a076c targets/luna1.h --- 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 diff -r e57bfdadf49a -r 160a5b3a076c targets/luna2.h --- 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