extiTriggerTurnOnInputPin: respect efiExtiEnablePin() return value
This commit is contained in:
parent
605b9c6db7
commit
83d6d9e7d8
|
@ -58,6 +58,10 @@ int extiTriggerTurnOnInputPin(const char *msg, int index, bool isTriggerShaft) {
|
|||
|
||||
efiPrintf("extiTriggerTurnOnInputPin %s %s", msg, hwPortname(brainPin));
|
||||
|
||||
if (efiExtiEnablePin(msg, brainPin, PAL_EVENT_MODE_BOTH_EDGES,
|
||||
isTriggerShaft ? shaft_callback : cam_callback, (void *)index) < 0) {
|
||||
return -1;
|
||||
}
|
||||
/* TODO:
|
||||
* * do not set to both edges if we need only one
|
||||
* * simplify callback in case of one edge */
|
||||
|
@ -67,7 +71,6 @@ int extiTriggerTurnOnInputPin(const char *msg, int index, bool isTriggerShaft) {
|
|||
} else {
|
||||
camLines[index] = pal_line;
|
||||
}
|
||||
efiExtiEnablePin(msg, brainPin, PAL_EVENT_MODE_BOTH_EDGES, isTriggerShaft ? shaft_callback : cam_callback, (void *)index);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue