HW CI has failed 11 times since Oct 2 #1849
This commit is contained in:
parent
dce24274a2
commit
dd7dd3b8eb
|
@ -357,6 +357,15 @@ bool OutputPin::getAndSet(int logicValue) {
|
|||
return oldValue;
|
||||
}
|
||||
|
||||
void OutputPin::setOnchipValue(int electricalValue, int logicValue) {
|
||||
if (port != GPIO_NULL) {
|
||||
setPinValue(this, electricalValue, logicValue);
|
||||
} else {
|
||||
// even without physical pin sometimes it's nice to track logic pin value
|
||||
currentLogicValue = logicValue;
|
||||
}
|
||||
}
|
||||
|
||||
void OutputPin::setValue(int logicValue) {
|
||||
#if ENABLE_PERF_TRACE
|
||||
// todo: https://github.com/rusefi/rusefi/issues/1638
|
||||
|
@ -367,14 +376,11 @@ void OutputPin::setValue(int logicValue) {
|
|||
efiAssertVoid(CUSTOM_ERR_6621, modePtr!=NULL, "pin mode not initialized");
|
||||
pin_output_mode_e mode = *modePtr;
|
||||
efiAssertVoid(CUSTOM_ERR_6622, mode <= OM_OPENDRAIN_INVERTED, "invalid pin_output_mode_e");
|
||||
int eValue = getElectricalValue(logicValue, mode);
|
||||
int electricalValue = getElectricalValue(logicValue, mode);
|
||||
|
||||
#if (BOARD_EXT_GPIOCHIPS > 0)
|
||||
if (!this->ext) {
|
||||
/* onchip pin */
|
||||
if (port != GPIO_NULL) {
|
||||
setPinValue(this, eValue, logicValue);
|
||||
}
|
||||
setOnchipValue(electricalValue, logicValue);
|
||||
} else {
|
||||
/* external pin */
|
||||
gpiochips_writePad(this->brainPin, logicValue);
|
||||
|
@ -382,12 +388,7 @@ void OutputPin::setValue(int logicValue) {
|
|||
currentLogicValue = logicValue;
|
||||
}
|
||||
#else
|
||||
if (port != GPIO_NULL) {
|
||||
setPinValue(this, eValue, logicValue);
|
||||
} else {
|
||||
// even without physical pin sometimes it's nice to track logic pin value
|
||||
currentLogicValue = logicValue;
|
||||
}
|
||||
setOnchipValue(electricalValue, logicValue);
|
||||
#endif
|
||||
|
||||
#else /* EFI_PROD_CODE */
|
||||
|
|
|
@ -77,6 +77,7 @@ public:
|
|||
private:
|
||||
// todo: inline this method?
|
||||
void setDefaultPinState(const pin_output_mode_e *defaultState);
|
||||
void setOnchipValue(int electricalValue, int logicValue);
|
||||
|
||||
// 4 byte pointer is a bit of a memory waste here
|
||||
const pin_output_mode_e *modePtr;
|
||||
|
|
Loading…
Reference in New Issue