Default switchs / pots / sliders configuration moved to the HAL (#6514)

Default switchs / pots / sliders configuration moved to the HAL
This commit is contained in:
Bertrand Songis
2019-06-18 15:47:38 +02:00
committed by GitHub
parent 6ab73f3ece
commit 0ec02f096c
9 changed files with 93 additions and 79 deletions
-16
View File
@@ -80,22 +80,6 @@
#define MODEL_GVAR_MAX(idx) (CFN_GVAR_CST_MAX - g_model.gvars[idx].max)
#if defined(PCBTARANIS) || defined(PCBHORUS)
enum SwitchConfig {
SWITCH_NONE,
SWITCH_TOGGLE,
SWITCH_2POS,
SWITCH_3POS,
};
enum PotConfig {
POT_NONE,
POT_WITH_DETENT,
POT_MULTIPOS_SWITCH,
POT_WITHOUT_DETENT
};
enum SliderConfig {
SLIDER_NONE,
SLIDER_WITH_DETENT,
};
#define SWITCH_CONFIG(x) (bfGet<uint32_t>(g_eeGeneral.switchConfig, 2*(x), 2))
#define SWITCH_EXISTS(x) (SWITCH_CONFIG(x) != SWITCH_NONE)
#define IS_CONFIG_3POS(x) (SWITCH_CONFIG(x) == SWITCH_3POS)