parent
21d0340541
commit
a5fc4550d3
|
@ -342,12 +342,6 @@ static BaseBlockDevice* initializeMmcBlockDevice() {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!engineConfiguration->isSdCardEnabled ||
|
|
||||||
engineConfiguration->sdCardSpiDevice == SPI_NONE ||
|
|
||||||
!isBrainPinValid(engineConfiguration->sdCardCsPin)) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Configures and activates the MMC peripheral.
|
// Configures and activates the MMC peripheral.
|
||||||
mmcSpiDevice = engineConfiguration->sdCardSpiDevice;
|
mmcSpiDevice = engineConfiguration->sdCardSpiDevice;
|
||||||
|
|
||||||
|
@ -390,10 +384,6 @@ static const SDCConfig sdcConfig = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static BaseBlockDevice* initializeMmcBlockDevice() {
|
static BaseBlockDevice* initializeMmcBlockDevice() {
|
||||||
if (!engineConfiguration->isSdCardEnabled) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
sdcStart(&EFI_SDC_DEVICE, &sdcConfig);
|
sdcStart(&EFI_SDC_DEVICE, &sdcConfig);
|
||||||
sdStatus = SD_STATE_CONNECTING;
|
sdStatus = SD_STATE_CONNECTING;
|
||||||
if (blkConnect(&EFI_SDC_DEVICE) != HAL_SUCCESS) {
|
if (blkConnect(&EFI_SDC_DEVICE) != HAL_SUCCESS) {
|
||||||
|
@ -637,7 +627,17 @@ void initEarlyMmcCard() {
|
||||||
#endif // EFI_PROD_CODE
|
#endif // EFI_PROD_CODE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool isSdCardEnabled() {
|
||||||
|
return engineConfiguration->isSdCardEnabled &&
|
||||||
|
engineConfiguration->sdCardSpiDevice != SPI_NONE &&
|
||||||
|
isBrainPinValid(engineConfiguration->sdCardCsPin);
|
||||||
|
}
|
||||||
|
|
||||||
void initMmcCard() {
|
void initMmcCard() {
|
||||||
|
if (isSdCardEnabled()) {
|
||||||
|
// do not even bother starting the thread if SD card is not enabled & configured on start-up
|
||||||
|
return;
|
||||||
|
}
|
||||||
chThdCreateStatic(mmcThreadStack, sizeof(mmcThreadStack), PRIO_MMC, (tfunc_t)(void*) MMCmonThread, NULL);
|
chThdCreateStatic(mmcThreadStack, sizeof(mmcThreadStack), PRIO_MMC, (tfunc_t)(void*) MMCmonThread, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -295,6 +295,9 @@ enable2ndByteCanID = false
|
||||||
maintainConstantValue = throttlePedalWOTVoltage, { (calibrationMode == @@TsCalMode_PedalMax@@ ) ? calibrationValue : throttlePedalWOTVoltage }
|
maintainConstantValue = throttlePedalWOTVoltage, { (calibrationMode == @@TsCalMode_PedalMax@@ ) ? calibrationValue : throttlePedalWOTVoltage }
|
||||||
maintainConstantValue = throttlePedalSecondaryWOTVoltage, { (calibrationMode == @@TsCalMode_PedalMax@@ ) ? calibrationValue2 : throttlePedalSecondaryWOTVoltage }
|
maintainConstantValue = throttlePedalSecondaryWOTVoltage, { (calibrationMode == @@TsCalMode_PedalMax@@ ) ? calibrationValue2 : throttlePedalSecondaryWOTVoltage }
|
||||||
|
|
||||||
|
requiresPowerCycle = isSdCardEnabled
|
||||||
|
requiresPowerCycle = sdCardSpiDevice
|
||||||
|
requiresPowerCycle = sdCardCsPin
|
||||||
requiresPowerCycle = boardUseCanTerminator
|
requiresPowerCycle = boardUseCanTerminator
|
||||||
requiresPowerCycle = injectorCompensationMode
|
requiresPowerCycle = injectorCompensationMode
|
||||||
requiresPowerCycle = lps25BaroSensorScl
|
requiresPowerCycle = lps25BaroSensorScl
|
||||||
|
|
Loading…
Reference in New Issue