More portability (GPIO_F/G + auto_generated_enums) (#876)

* GPIO ports F and G are not everywhere

* auto_generated_enums path flexibility
This commit is contained in:
andreika-git 2019-07-09 12:29:03 +03:00 committed by rusefi
parent f906098718
commit 56fb8531a4
4 changed files with 18 additions and 2 deletions

View File

@ -343,12 +343,14 @@ void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->tle8888_cs = GPIOD_5;
engineConfiguration->directSelfStimulation = true;
#if STM32_HAS_GPIOG
boardConfiguration->ignitionPins[0] = GPIOG_3;
boardConfiguration->ignitionPins[1] = GPIOG_4;
boardConfiguration->ignitionPins[2] = GPIOG_5;
boardConfiguration->ignitionPins[3] = GPIOG_6;
boardConfiguration->ignitionPins[4] = GPIOG_7;
boardConfiguration->ignitionPins[5] = GPIOG_8;
#endif /* STM32_HAS_GPIOG */
boardConfiguration->ignitionPins[6] = GPIOC_6;
boardConfiguration->ignitionPins[7] = GPIOC_7;
@ -368,13 +370,15 @@ void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
// IN1 PF15
// IN2 PF14
// SF PF11
#if STM32_HAS_GPIOF
#if EFI_FSIO
setFsio(12, GPIOF_12, "0" PASS_CONFIG_PARAMETER_SUFFIX);
setFsio(14, GPIOF_13, "1" PASS_CONFIG_PARAMETER_SUFFIX);
#endif
CONFIG(etb1_use_two_wires) = true;
CONFIGB(etb1.directionPin1) = GPIOF_15;
CONFIGB(etb1.directionPin2) = GPIOF_14;
#endif /* STM32_HAS_GPIOF */
CONFIG(etb1_use_two_wires) = true;
boardConfiguration->isHip9011Enabled = false;
// ETB #2

View File

@ -110,8 +110,12 @@ void vag_18_Turbo(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
boardConfiguration->clutchDownPin = GPIOD_11;
engineConfiguration->brakePedalPin = GPIOE_10;
engineConfiguration->camInput = GPIOA_2;
#if STM32_HAS_GPIOG
boardConfiguration->triggerInputPins[0] = GPIOG_7;
#endif /* STM32_HAS_GPIOF */
#if STM32_HAS_GPIOF
boardConfiguration->vehicleSpeedSensorInputPin = GPIOF_14;
#endif /* STM32_HAS_GPIOF */
boardConfiguration->tachOutputPin = TLE8888_PIN_16;
@ -128,14 +132,18 @@ void vag_18_Turbo(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
//ETB Settings
#if EFI_FSIO
#if STM32_HAS_GPIOF
setFsio (12, GPIOF_12, "0" PASS_CONFIG_PARAMETER_SUFFIX);
setFsio (14, GPIOF_13, "1" PASS_CONFIG_PARAMETER_SUFFIX);
#endif /* STM32_HAS_GPIOF */
setFsioExt (3, GPIOE_0, "0.15 90 coolant 120 min max 90 - 30 / 0.8 * +", 25 PASS_CONFIG_PARAMETER_SUFFIX);
#endif
engineConfiguration->auxPidFrequency[3] = 25;
CONFIG(etb1_use_two_wires) = true;
#if STM32_HAS_GPIOF
CONFIGB(etb1.directionPin1) = GPIOF_15;
CONFIGB(etb1.directionPin2) = GPIOF_14;
#endif /* STM32_HAS_GPIOF */
boardConfiguration->isHip9011Enabled = false;
#if EFI_FSIO

View File

@ -6,7 +6,7 @@ CONTROLLERS_ALGO_SRC = $(PROJECT_DIR)/controllers/algo/map_adjuster.c \
CONTROLLERS_ALGO_SRC_CPP = $(PROJECT_DIR)/controllers/algo/advance_map.cpp \
$(PROJECT_DIR)/controllers/algo/malfunction_central.cpp \
$(PROJECT_DIR)/controllers/algo/auto_generated_enums.cpp \
$(GENERATED_ENUMS_DIR)/auto_generated_enums.cpp \
$(PROJECT_DIR)/controllers/algo/fuel_math.cpp \
$(PROJECT_DIR)/controllers/algo/accel_enrichment.cpp \
$(PROJECT_DIR)/controllers/algo/engine_configuration.cpp \

View File

@ -44,3 +44,7 @@ endif
ifeq ($(CPU_PLATFORM_DIR),)
CPU_PLATFORM_DIR = $(CHIBIOS)/os/hal/ports/STM32/$(CPU_PLATFORM)
endif
ifeq ($(GENERATED_ENUMS_DIR),)
GENERATED_ENUMS_DIR = $(PROJECT_DIR)/controllers/algo
endif