Switch driver, key/trim driver
This commit is contained in:
committed by
Malte Langermann
parent
7dcb4b3d9a
commit
276f10e7bb
@@ -46,22 +46,22 @@ __weak SwitchHwPos boardSwitchGetPosition(SwitchCategory cat, uint8_t idx)
|
||||
return stm32_switch_get_position(sw);
|
||||
}
|
||||
|
||||
const char* boardSwitchGetName(SwitchCategory cat, uint8_t idx)
|
||||
__weak const char* boardSwitchGetName(SwitchCategory cat, uint8_t idx)
|
||||
{
|
||||
return _switch_offsets[cat][idx].name;
|
||||
}
|
||||
|
||||
SwitchHwType boardSwitchGetType(SwitchCategory cat, uint8_t idx)
|
||||
__weak SwitchHwType boardSwitchGetType(SwitchCategory cat, uint8_t idx)
|
||||
{
|
||||
return _switch_offsets[cat][idx].type;
|
||||
}
|
||||
|
||||
uint8_t boardGetMaxSwitches() { return n_switches; }
|
||||
uint8_t boardGetMaxFctSwitches() { return n_fct_switches; }
|
||||
__weak uint8_t boardGetMaxSwitches() { return n_switches; }
|
||||
__weak uint8_t boardGetMaxFctSwitches() { return n_fct_switches; }
|
||||
|
||||
swconfig_t boardSwitchGetDefaultConfig() { return _switch_default_config; }
|
||||
__weak swconfig_t boardSwitchGetDefaultConfig() { return _switch_default_config; }
|
||||
|
||||
switch_display_pos_t switchGetDisplayPosition(uint8_t idx)
|
||||
__weak switch_display_pos_t switchGetDisplayPosition(uint8_t idx)
|
||||
{
|
||||
// TODO: find a solution for FLEX switches so they can be displayed on main view
|
||||
if (idx >= DIM(_switch_display)) return {0, 0};
|
||||
|
||||
Reference in New Issue
Block a user