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

This commit is contained in:
rusefi 2020-12-22 20:42:30 -05:00
parent 25f7c9cc7d
commit 1e4ae3868c
1 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,12 @@ void efiExtiEnablePin(const char *msg, brain_pin_e brainPin, uint32_t mode, palc
if (port == NULL)
return;
bool wasUsed = brain_pin_markUsed(brainPin, "EXTI input");
if (wasUsed) {
// error condition we shall bail
return;
}
int index = getHwPin(msg, brainPin);
/* is this index already used? */
@ -60,6 +66,7 @@ void efiExtiDisablePin(brain_pin_e brainPin)
ioportid_t port = getHwPort("exti", brainPin);
if (port == NULL)
return;
brain_pin_markUnused(brainPin);
int index = getHwPin("exti", brainPin);