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:
co-authored by
3djc
Peter Feerick
philmoz
parent
f5593c44e8
commit
b48e07026d
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user