From e201033eae3788ebdb37edd01daec9b0be2bb5de Mon Sep 17 00:00:00 2001 From: rusefi Date: Fri, 21 Apr 2017 12:06:32 -0400 Subject: [PATCH] refactoring - reducing complexity --- firmware/controllers/system/efiGpio.h | 6 +++++- firmware/development/rfi_perftest.cpp | 2 +- firmware/hw_layer/board_test.cpp | 2 +- firmware/hw_layer/gpio_helper.h | 2 -- firmware/hw_layer/io_pins.cpp | 1 - firmware/hw_layer/pwm_generator.h | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/firmware/controllers/system/efiGpio.h b/firmware/controllers/system/efiGpio.h index cac1ec6dc4..73f4ab7ec8 100644 --- a/firmware/controllers/system/efiGpio.h +++ b/firmware/controllers/system/efiGpio.h @@ -176,9 +176,13 @@ public: } #endif -void outputPinRegisterExt2(const char *msg, OutputPin *output, brain_pin_e brainPin, pin_output_mode_e *outputMode); void turnPinHigh(NamedOutputPin *output); void turnPinLow(NamedOutputPin *output); +void initOutputPin(const char *msg, OutputPin *outputPin, ioportid_t port, uint32_t pinNumber); +void initOutputPinExt(const char *msg, OutputPin *outputPin, ioportid_t port, uint32_t pinNumber, iomode_t mode); + +void outputPinRegisterExt2(const char *msg, OutputPin *output, brain_pin_e brainPin, pin_output_mode_e *outputMode); + #endif /* EFIGPIO_H_ */ diff --git a/firmware/development/rfi_perftest.cpp b/firmware/development/rfi_perftest.cpp index 251104a8cf..01ed3216cb 100644 --- a/firmware/development/rfi_perftest.cpp +++ b/firmware/development/rfi_perftest.cpp @@ -12,7 +12,7 @@ #include "eficonsole.h" #include "time.h" #include "engine_math.h" -#include "gpio_helper.h" +#include "efiGpio.h" #include "efilib2.h" #include "console_io.h" #include "engine.h" diff --git a/firmware/hw_layer/board_test.cpp b/firmware/hw_layer/board_test.cpp index ad9c94054a..5620aaa7f6 100644 --- a/firmware/hw_layer/board_test.cpp +++ b/firmware/hw_layer/board_test.cpp @@ -25,7 +25,7 @@ #include "board_test.h" #include "rusefi_enums.h" #include "pin_repository.h" -#include "gpio_helper.h" +#include "efiGpio.h" #include "adc_inputs.h" #include "AdcConfiguration.h" diff --git a/firmware/hw_layer/gpio_helper.h b/firmware/hw_layer/gpio_helper.h index d8314cff70..7c43121351 100644 --- a/firmware/hw_layer/gpio_helper.h +++ b/firmware/hw_layer/gpio_helper.h @@ -11,7 +11,5 @@ #include "efiGpio.h" -void initOutputPin(const char *msg, OutputPin *outputPin, ioportid_t port, uint32_t pinNumber); -void initOutputPinExt(const char *msg, OutputPin *outputPin, ioportid_t port, uint32_t pinNumber, iomode_t mode); #endif /* GPIO_HELPER_H_ */ diff --git a/firmware/hw_layer/io_pins.cpp b/firmware/hw_layer/io_pins.cpp index 08718fe124..999a08cb49 100644 --- a/firmware/hw_layer/io_pins.cpp +++ b/firmware/hw_layer/io_pins.cpp @@ -12,7 +12,6 @@ #include "efiGpio.h" #include "pin_repository.h" -#include "gpio_helper.h" #include "status_loop.h" #include "engine_configuration.h" #include "console_io.h" diff --git a/firmware/hw_layer/pwm_generator.h b/firmware/hw_layer/pwm_generator.h index f010e5498e..73720beca5 100644 --- a/firmware/hw_layer/pwm_generator.h +++ b/firmware/hw_layer/pwm_generator.h @@ -13,7 +13,7 @@ #define DEBUG_PWM FALSE -#include "gpio_helper.h" +#include "efiGpio.h" void initPwmGenerator(void);