refactoring - reducing complexity

This commit is contained in:
rusefi 2017-04-21 12:42:38 -04:00
parent 7aa92862e8
commit 5a5672a00d
3 changed files with 2 additions and 22 deletions

View File

@ -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
}

View File

@ -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 */

View File

@ -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_ */