fix(pa01): custom switches not working (#6790)

Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
philmoz
2025-11-15 11:13:10 +10:00
committed by GitHub
co-authored by philmoz Peter Feerick
parent 85f6d39d65
commit 48b10017f2
2 changed files with 23 additions and 3 deletions
+11
View File
@@ -88,3 +88,14 @@ uint16_t bsp_input_get()
bsp_input_read();
return inputState;
}
SwitchHwPos boardSwitchGetPosition(uint8_t idx)
{
if (idx < 6) {
extern const stm32_switch_t* boardGetSwitchDef(uint8_t idx);
const stm32_switch_t* sw = boardGetSwitchDef(idx);
return stm32_switch_get_position(sw);
}
return getFctKeyState(idx - 6) ? SWITCH_HW_DOWN : SWITCH_HW_UP;
}