mirror of https://github.com/rusefi/rusefi-1.git
refactoring - reducing complexity
This commit is contained in:
parent
7aa92862e8
commit
5a5672a00d
|
@ -6,12 +6,9 @@
|
|||
*/
|
||||
|
||||
#include "main.h"
|
||||
#if EFI_GPIO
|
||||
#if EFI_GPIO || defined(__DOXYGEN__)
|
||||
#include "efiGpio.h"
|
||||
#include "io_pins.h"
|
||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||
#include "gpio_helper.h"
|
||||
#endif
|
||||
|
||||
pin_output_mode_e OUTPUT_MODE_DEFAULT = OM_DEFAULT;
|
||||
|
||||
|
@ -132,11 +129,9 @@ void OutputPin::unregister() {
|
|||
}
|
||||
|
||||
void OutputPin::setDefaultPinState(pin_output_mode_e *outputMode) {
|
||||
#if EFI_GPIO || defined(__DOXYGEN__)
|
||||
pin_output_mode_e mode = *outputMode;
|
||||
assertOMode(mode);
|
||||
this->modePtr = outputMode;
|
||||
#endif
|
||||
setValue(false); // initial state
|
||||
}
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ public:
|
|||
#else /* EFI_PROD_CODE */
|
||||
#define doSetOutputPinValue2(output, logicValue) { \
|
||||
pin_output_mode_e mode = OM_DEFAULT; \
|
||||
int eValue = getElectricalValue(logicValue, mode); \
|
||||
/* int eValue = getElectricalValue(logicValue, mode); */ \
|
||||
setPinValue(output, eValue, logicValue); \
|
||||
}
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
/*
|
||||
* @file gpio_helper.h
|
||||
* @brief General I/O helper
|
||||
*
|
||||
* @date Aug 25, 2013
|
||||
* @author Andrey Belomutskiy, (c) 2012-2017
|
||||
*/
|
||||
|
||||
#ifndef GPIO_HELPER_H_
|
||||
#define GPIO_HELPER_H_
|
||||
|
||||
#include "efiGpio.h"
|
||||
|
||||
|
||||
#endif /* GPIO_HELPER_H_ */
|
Loading…
Reference in New Issue