input mode control and other pin mode control #767

TODO
This commit is contained in:
rusefi 2019-04-20 10:59:07 -04:00
parent 4e891de0d1
commit 56511da9e1
2 changed files with 2 additions and 0 deletions

View File

@ -102,6 +102,7 @@ void stopJoystickPins() {
}
void startJoystickPins() {
// todo: extract 'configurePalInputPin() method?
efiSetPadMode("joy center", CONFIGB(joystickCenterPin), PAL_MODE_INPUT_PULLUP);
efiSetPadMode("joy A", CONFIGB(joystickAPin), PAL_MODE_INPUT_PULLUP);
// not used so far efiSetPadMode("joy B", CONFIGB(joystickBPin), PAL_MODE_INPUT_PULLUP);

View File

@ -104,6 +104,7 @@ static int turnOnTriggerInputPin(const char *msg, brain_pin_e brainPin, bool is_
scheduleMsg(logger, "turnOnTriggerInputPin(PAL) %s %s", msg, hwPortname(brainPin));
pal_line = PAL_LINE(getHwPort("trg", brainPin), getHwPin("trg", brainPin));
// todo efiSetPadMode(msg, brainPin, mode); or reuse joystick code? configurePalInputPin?
brain_pin_markUsed(brainPin, msg);
palEnableLineEvent(pal_line, PAL_EVENT_MODE_BOTH_EDGES);