FreeCalypso > hg > fc-tourmaline
comparison src/cs/drivers/drv_core/abb/abb.c @ 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 | 0ed36de51973 |
children |
comparison
equal
deleted
inserted
replaced
265:e57bfdadf49a | 266:160a5b3a076c |
---|---|
108 * needs to be nonzero; the intent is that this variable will be set by the | 108 * needs to be nonzero; the intent is that this variable will be set by the |
109 * code responsible for putting the LCD into its own powerdown mode. | 109 * code responsible for putting the LCD into its own powerdown mode. |
110 * This logic is included only for affected targets with LCDs. | 110 * This logic is included only for affected targets with LCDs. |
111 */ | 111 */ |
112 | 112 |
113 #ifdef CONFIG_TARGET_LUNA | 113 #ifdef ABB_SLEEP_RESTRICTION |
114 int ABB_sleep_allowed = 0; | 114 int ABB_sleep_allowed = 0; |
115 #endif | 115 #endif |
116 | 116 |
117 #if (ABB_SEMAPHORE_PROTECTION) | 117 #if (ABB_SEMAPHORE_PROTECTION) |
118 | 118 |
869 | 869 |
870 #elif (ANLG_FAM == 2) | 870 #elif (ANLG_FAM == 2) |
871 // Read VRPCSTS register value and extract status of meaningfull inputs. | 871 // Read VRPCSTS register value and extract status of meaningfull inputs. |
872 reg_val = ABB_ReadRegister(VRPCSTS) & 0x0070; | 872 reg_val = ABB_ReadRegister(VRPCSTS) & 0x0070; |
873 | 873 |
874 #ifdef CONFIG_TARGET_LUNA | 874 #ifdef ABB_SLEEP_RESTRICTION |
875 if (reg_val == 0x30 && ABB_sleep_allowed) | 875 if (reg_val == 0x30 && ABB_sleep_allowed) |
876 #else | 876 #else |
877 if (reg_val == 0x30) | 877 if (reg_val == 0x30) |
878 #endif | 878 #endif |
879 { | 879 { |