diff --git a/firmware/hw_layer/pin_repository.cpp b/firmware/hw_layer/pin_repository.cpp index 365660c70c..3b15f93741 100644 --- a/firmware/hw_layer/pin_repository.cpp +++ b/firmware/hw_layer/pin_repository.cpp @@ -36,8 +36,7 @@ bool isBrainPinValid(brain_pin_e brainPin) return true; } -static int brainPin_to_index(brain_pin_e brainPin) -{ +int brainPin_to_index(brain_pin_e brainPin) { unsigned int i; if (brainPin < GPIOA_0) diff --git a/firmware/hw_layer/pin_repository.h b/firmware/hw_layer/pin_repository.h index 5af272cb41..68ef531122 100644 --- a/firmware/hw_layer/pin_repository.h +++ b/firmware/hw_layer/pin_repository.h @@ -54,6 +54,7 @@ EXTERNC void gpio_pin_markUnused(ioportid_t port, ioportmask_t pin); int getPortPinIndex(ioportid_t port, ioportmask_t pin); ioportid_t getBrainPinPort(brain_pin_e brainPin); int getBrainPinIndex(brain_pin_e brainPin); +int brainPin_to_index(brain_pin_e brainPin); unsigned int getBrainPinOnchipNum(void); unsigned int getBrainPinTotalNum(void); diff --git a/unit_tests/engine_test_helper.cpp b/unit_tests/engine_test_helper.cpp index ce4d518efc..8091d46692 100644 --- a/unit_tests/engine_test_helper.cpp +++ b/unit_tests/engine_test_helper.cpp @@ -17,6 +17,7 @@ #include "sensor.h" #include "tooth_logger.h" #include "logicdata.h" +#include "hardware.h" #if EFI_ENGINE_SNIFFER #include "engine_sniffer.h" @@ -111,6 +112,8 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType, configuration_callb engine->mockAirmassModel = &mockAirmass; memset(mockPinStates, 0, sizeof(mockPinStates)); + + initHardware(PASS_ENGINE_PARAMETER_SIGNATURE); } EngineTestHelper::~EngineTestHelper() {