fixing build & refactoring
This commit is contained in:
parent
f2151638a3
commit
ff641d81e2
|
@ -38,9 +38,9 @@ int main(void) {
|
|||
halInit();
|
||||
chSysInit();
|
||||
// set base pin configuration based on the board
|
||||
setDefaultBasePins(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
setDefaultBasePins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
// set UART pads configuration based on the board
|
||||
setDefaultSerialParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
setDefaultSerialParameters(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
/* at the moment SD card is not needed by bootloader
|
||||
// set SD card configuration also
|
||||
setDefaultSdCardParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
|
|
@ -244,9 +244,9 @@ void setFrankensoBoardTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
// ETB_BENCH_ENGINE
|
||||
// set engine_type 58
|
||||
void setEtbTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
setDefaultBasePins();
|
||||
setDefaultBasePins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
// TODO: HOW?! IS THIS HELPING USB SERIAL?!
|
||||
setDefaultSerialParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
setDefaultSerialParameters(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
// VAG test ETB
|
||||
// set tps_min 54
|
||||
engineConfiguration->tpsMin = 54;
|
||||
|
@ -293,9 +293,9 @@ void setEtbTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
// TLE8888_BENCH_ENGINE
|
||||
// set engine_type 59
|
||||
void setTle8888TestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
setDefaultBasePins();
|
||||
setDefaultBasePins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
// TODO: HOW?! IS THIS HELPING USB SERIAL?!
|
||||
setDefaultSerialParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
setDefaultSerialParameters(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
engineConfiguration->specs.cylindersCount = 8;
|
||||
engineConfiguration->specs.firingOrder = FO_1_8_7_2_6_5_4_3;
|
||||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
||||
|
|
|
@ -440,7 +440,7 @@ void prepareVoidConfiguration(engine_configuration_s *engineConfiguration) {
|
|||
boardConfiguration->is_enabled_spi_3 = boardConfiguration->is_enabled_spi_4 = false;
|
||||
}
|
||||
|
||||
void setDefaultBasePins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
void setDefaultBasePins(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
#ifdef EFI_FATAL_ERROR_PIN
|
||||
engineConfiguration->fatalErrorPin = EFI_FATAL_ERROR_PIN;
|
||||
#else
|
||||
|
@ -463,7 +463,7 @@ void setDefaultBasePins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
}
|
||||
|
||||
// needed also by bootloader code
|
||||
void setDefaultSerialParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
void setDefaultSerialParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
boardConfiguration->useSerialPort = true;
|
||||
engineConfiguration->binarySerialTxPin = GPIOC_10;
|
||||
engineConfiguration->binarySerialRxPin = GPIOC_11;
|
||||
|
@ -480,7 +480,7 @@ void setDefaultSerialParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
|
||||
// needed also by bootloader code
|
||||
// at the moment bootloader does NOT really need SD card, this is a step towards future bootloader SD card usage
|
||||
void setDefaultSdCardParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
void setDefaultSdCardParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
boardConfiguration->is_enabled_spi_3 = true;
|
||||
engineConfiguration->sdCardSpiDevice = SPI_DEVICE_3;
|
||||
boardConfiguration->sdCardCsPin = GPIOD_4;
|
||||
|
@ -1074,9 +1074,9 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
*/
|
||||
void setDefaultBoardConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
// set initial pin groups
|
||||
setDefaultBasePins(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
setDefaultBasePins(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
setDefaultSerialParameters(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
setDefaultSerialParameters(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
setCanDefaults(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
|
|
|
@ -67,9 +67,9 @@ void setConstantDwell(floatms_t dwellMs DECLARE_ENGINE_PARAMETER_SUFFIX);
|
|||
void printFloatArray(const char *prefix, float array[], int size);
|
||||
|
||||
// needed by bootloader
|
||||
void setDefaultBasePins(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void setDefaultSerialParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void setDefaultSdCardParameters(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void setDefaultBasePins(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setDefaultSerialParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
void setDefaultSdCardParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
void rememberCurrentConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void incrementGlobalConfigurationVersion(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
|
Loading…
Reference in New Issue