diff --git a/firmware/hw_layer/digital_input_exti.cpp b/firmware/hw_layer/digital_input_exti.cpp index 72b84f4420..a6df84c4da 100644 --- a/firmware/hw_layer/digital_input_exti.cpp +++ b/firmware/hw_layer/digital_input_exti.cpp @@ -23,23 +23,23 @@ static ioportmask_t ext_used = 0; // EXT is not able to give you the front direction but you could read the pin in the callback. -int efiExtiEnablePin(const char *msg, brain_pin_e brainPin, uint32_t mode, palcallback_t cb, void *cb_data) { +void efiExtiEnablePin(const char *msg, brain_pin_e brainPin, uint32_t mode, palcallback_t cb, void *cb_data) { /* paranoid check, in case of GPIO_UNASSIGNED getHwPort will return NULL * and we will fail on next check */ if (brainPin == GPIO_UNASSIGNED) - return -1; + return; ioportid_t port = getHwPort(msg, brainPin); if (port == NULL) - return -1; + return; int index = getHwPin(msg, brainPin); /* is this index already used? */ if (ext_used & PAL_PORT_BIT(index)) { firmwareError(CUSTOM_ERR_PIN_ALREADY_USED_2, "%s: pin %d: exti index already used", msg, brainPin); - return -1; + return; } ioline_t line = PAL_LINE(port, index); @@ -48,8 +48,6 @@ int efiExtiEnablePin(const char *msg, brain_pin_e brainPin, uint32_t mode, palca /* mark used */ ext_used |= PAL_PORT_BIT(index); - - return 0; } void efiExtiDisablePin(brain_pin_e brainPin) diff --git a/firmware/hw_layer/digital_input_exti.h b/firmware/hw_layer/digital_input_exti.h index 8ad517d805..6ac0de9967 100644 --- a/firmware/hw_layer/digital_input_exti.h +++ b/firmware/hw_layer/digital_input_exti.h @@ -8,6 +8,6 @@ #include "digital_input.h" #if HAL_USE_PAL -int efiExtiEnablePin(const char *msg, brain_pin_e pin, uint32_t mode, palcallback_t cb, void *cb_data); +void efiExtiEnablePin(const char *msg, brain_pin_e pin, uint32_t mode, palcallback_t cb, void *cb_data); void efiExtiDisablePin(brain_pin_e brainPin); #endif /* HAL_USE_PAL */