trigger and start button pins not displayed by "pins" command #2084

This commit is contained in:
rusefi 2020-12-22 21:05:49 -05:00
parent f62bcca7ea
commit 42c1fb7b5e
1 changed files with 7 additions and 5 deletions

View File

@ -95,6 +95,7 @@ static bool isJoystickEnabled() {
}
void stopJoystickPins() {
// todo: should be 'efiExtiDisablePin' or smth?
efiSetPadUnused(activeConfiguration.joystickCenterPin);
efiSetPadUnused(activeConfiguration.joystickAPin);
efiSetPadUnused(activeConfiguration.joystickDPin);
@ -102,11 +103,12 @@ void stopJoystickPins() {
void startJoystickPins() {
// todo: extract 'configurePalInputPin() method?
efiSetPadMode("joy center", CONFIG(joystickCenterPin), PAL_MODE_INPUT_PULLUP);
efiSetPadMode("joy A", CONFIG(joystickAPin), PAL_MODE_INPUT_PULLUP);
// not used so far efiSetPadMode("joy B", CONFIG(joystickBPin), PAL_MODE_INPUT_PULLUP);
// not used so far efiSetPadMode("joy C", CONFIG(joystickCPin), PAL_MODE_INPUT_PULLUP);
efiSetPadMode("joy D", CONFIG(joystickDPin), PAL_MODE_INPUT_PULLUP);
// input capture driver would claim pin ownership so we are not using 'efiSetPadMode' here
palSetPadMode("joy center", CONFIG(joystickCenterPin), PAL_MODE_INPUT_PULLUP);
palSetPadMode("joy A", CONFIG(joystickAPin), PAL_MODE_INPUT_PULLUP);
// not used so far palSetPadMode("joy B", CONFIG(joystickBPin), PAL_MODE_INPUT_PULLUP);
// not used so far palSetPadMode("joy C", CONFIG(joystickCPin), PAL_MODE_INPUT_PULLUP);
palSetPadMode("joy D", CONFIG(joystickDPin), PAL_MODE_INPUT_PULLUP);
}
void initJoystick(Logging *shared) {