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;
|
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) {
|
void OutputPin::setValue(int logicValue) {
|
||||||
#if ENABLE_PERF_TRACE
|
#if ENABLE_PERF_TRACE
|
||||||
// todo: https://github.com/rusefi/rusefi/issues/1638
|
// 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");
|
efiAssertVoid(CUSTOM_ERR_6621, modePtr!=NULL, "pin mode not initialized");
|
||||||
pin_output_mode_e mode = *modePtr;
|
pin_output_mode_e mode = *modePtr;
|
||||||
efiAssertVoid(CUSTOM_ERR_6622, mode <= OM_OPENDRAIN_INVERTED, "invalid pin_output_mode_e");
|
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 (BOARD_EXT_GPIOCHIPS > 0)
|
||||||
if (!this->ext) {
|
if (!this->ext) {
|
||||||
/* onchip pin */
|
setOnchipValue(electricalValue, logicValue);
|
||||||
if (port != GPIO_NULL) {
|
|
||||||
setPinValue(this, eValue, logicValue);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
/* external pin */
|
/* external pin */
|
||||||
gpiochips_writePad(this->brainPin, logicValue);
|
gpiochips_writePad(this->brainPin, logicValue);
|
||||||
|
@ -382,12 +388,7 @@ void OutputPin::setValue(int logicValue) {
|
||||||
currentLogicValue = logicValue;
|
currentLogicValue = logicValue;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (port != GPIO_NULL) {
|
setOnchipValue(electricalValue, logicValue);
|
||||||
setPinValue(this, eValue, logicValue);
|
|
||||||
} else {
|
|
||||||
// even without physical pin sometimes it's nice to track logic pin value
|
|
||||||
currentLogicValue = logicValue;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else /* EFI_PROD_CODE */
|
#else /* EFI_PROD_CODE */
|
||||||
|
|
|
@ -77,6 +77,7 @@ public:
|
||||||
private:
|
private:
|
||||||
// todo: inline this method?
|
// todo: inline this method?
|
||||||
void setDefaultPinState(const pin_output_mode_e *defaultState);
|
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
|
// 4 byte pointer is a bit of a memory waste here
|
||||||
const pin_output_mode_e *modePtr;
|
const pin_output_mode_e *modePtr;
|
||||||
|
|
Loading…
Reference in New Issue