feat: More flexible ADC inputs (#3870)

Co-authored-by: 3djc <lesitewebdejc@hotmail.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
This commit is contained in:
Raphael Coeffic
2023-11-02 11:07:53 +10:00
committed by GitHub
co-authored by 3djc Peter Feerick philmoz
parent f5593c44e8
commit b48e07026d
78 changed files with 1291 additions and 773 deletions
+3 -1
View File
@@ -86,7 +86,9 @@
#define MODEL_GVAR_MAX(idx) (CFN_GVAR_CST_MAX - g_model.gvars[idx].max)
// pots config
#define POT_CFG_BITS 4 // 4 bits per pot
#define POT_CFG_TYPE_BITS 3
#define POT_CFG_INV_BITS 1
#define POT_CFG_BITS (POT_CFG_TYPE_BITS + POT_CFG_INV_BITS)
#define POT_CFG_MASK ((1 << POT_CFG_BITS) - 1)
#define POT_CONFIG_POS(x) (POT_CFG_BITS * (x))
#define POT_CONFIG_MASK(x) (POT_CFG_MASK << POT_CONFIG_POS(x))