feat: stick inversion (#6394)

Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
This commit is contained in:
3djc
2025-07-25 13:02:16 +10:00
committed by GitHub
co-authored by philmoz
parent d3263df782
commit 6bb65dfa9c
55 changed files with 388 additions and 208 deletions
+10
View File
@@ -1352,6 +1352,16 @@ bool isFlexSwitchSourceValid(int source)
return true;
}
bool getStickInversion(int index)
{
return bfGet<uint8_t>(g_eeGeneral.stickInvert, index, STICK_CFG_INV_BITS);
}
void setStickInversion(int index, bool value)
{
g_eeGeneral.stickInvert = bfSet<uint8_t>(g_eeGeneral.stickInvert, value, index, STICK_CFG_INV_BITS);
}
bool getPotInversion(int index)
{
return bfGet<potconfig_t>(g_eeGeneral.potsConfig, (POT_CFG_BITS * index) + POT_CFG_TYPE_BITS, POT_CFG_INV_BITS);