parent
4e891de0d1
commit
56511da9e1
|
@ -102,6 +102,7 @@ void stopJoystickPins() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void startJoystickPins() {
|
void startJoystickPins() {
|
||||||
|
// todo: extract 'configurePalInputPin() method?
|
||||||
efiSetPadMode("joy center", CONFIGB(joystickCenterPin), PAL_MODE_INPUT_PULLUP);
|
efiSetPadMode("joy center", CONFIGB(joystickCenterPin), PAL_MODE_INPUT_PULLUP);
|
||||||
efiSetPadMode("joy A", CONFIGB(joystickAPin), 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);
|
// not used so far efiSetPadMode("joy B", CONFIGB(joystickBPin), PAL_MODE_INPUT_PULLUP);
|
||||||
|
|
|
@ -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));
|
scheduleMsg(logger, "turnOnTriggerInputPin(PAL) %s %s", msg, hwPortname(brainPin));
|
||||||
|
|
||||||
pal_line = PAL_LINE(getHwPort("trg", brainPin), getHwPin("trg", 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);
|
brain_pin_markUsed(brainPin, msg);
|
||||||
|
|
||||||
palEnableLineEvent(pal_line, PAL_EVENT_MODE_BOTH_EDGES);
|
palEnableLineEvent(pal_line, PAL_EVENT_MODE_BOTH_EDGES);
|
||||||
|
|
Loading…
Reference in New Issue