export board-specific macro for stm32 pins based on board yaml #3298
meta progress
This commit is contained in:
parent
1e1a71675e
commit
29851fe219
|
@ -290,6 +290,7 @@ INCDIR = \
|
|||
$(CHIBIOS)/os/hal/lib/peripherals/sensors \
|
||||
$(CONFDIR) \
|
||||
config/engines \
|
||||
config/boards \
|
||||
config \
|
||||
ext \
|
||||
ext_algo \
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include "pch.h"
|
||||
#include "fsio_impl.h"
|
||||
#include "mre_meta.h"
|
||||
|
||||
static void setInjectorPins() {
|
||||
engineConfiguration->injectionPins[0] = TLE8888_PIN_1;
|
||||
|
@ -133,22 +134,18 @@ static void setupDefaultSensorInputs() {
|
|||
// open question if it's great to have TPS in default TPS - the down-side is for
|
||||
// vehicles without TPS or for first start without TPS one would have to turn in off
|
||||
// to avoid cranking corrections based on wrong TPS data
|
||||
// tps = "20 - AN volt 5" PC3
|
||||
engineConfiguration->tps1_1AdcChannel = EFI_ADC_13;
|
||||
engineConfiguration->tps1_1AdcChannel = MRE_IN_TPS;
|
||||
engineConfiguration->tps2_1AdcChannel = EFI_ADC_NONE;
|
||||
|
||||
|
||||
// EFI_ADC_10: "27 - AN volt 1"
|
||||
engineConfiguration->map.sensor.hwChannel = EFI_ADC_10;
|
||||
engineConfiguration->map.sensor.hwChannel = MRE_IN_MAP;
|
||||
|
||||
// EFI_ADC_14: "32 - AN volt 6"
|
||||
engineConfiguration->afr.hwChannel = EFI_ADC_14;
|
||||
|
||||
// clt = "18 - AN temp 1"
|
||||
engineConfiguration->clt.adcChannel = EFI_ADC_0;
|
||||
engineConfiguration->clt.adcChannel = MRE_IN_CLT;
|
||||
|
||||
// iat = "23 - AN temp 2"
|
||||
engineConfiguration->iat.adcChannel = EFI_ADC_1;
|
||||
engineConfiguration->iat.adcChannel = MRE_IN_IAT;
|
||||
|
||||
setCommonNTCSensor(&engineConfiguration->auxTempSensor1, 2700);
|
||||
setCommonNTCSensor(&engineConfiguration->auxTempSensor2, 2700);
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
/*
|
||||
* @file mre_meta.h
|
||||
*
|
||||
* @date Oct 25, 2021
|
||||
* @author Andrey Belomutskiy, (c) 2012-2021
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// // clt = "18 - AN temp 1"
|
||||
#define MRE_IN_ANALOG_TEMP_1 EFI_ADC_0
|
||||
#define MRE_IN_CLT MRE_IN_ANALOG_TEMP_1
|
||||
|
||||
// "27 - AN volt 1"
|
||||
#define MRE_IN_ANALOG_VOLT_1 EFI_ADC_10
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* @file mre_meta.h
|
||||
*
|
||||
* @date Oct 25, 2021
|
||||
* @author Andrey Belomutskiy, (c) 2012-2021
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// clt = "18 - AN temp 1"
|
||||
#define MRE_IN_ANALOG_TEMP_1 EFI_ADC_0
|
||||
#define MRE_IN_CLT MRE_IN_ANALOG_TEMP_1
|
||||
|
||||
// iat = "23 - AN temp 2"
|
||||
#define MRE_IN_ANALOG_TEMP_2 EFI_ADC_1
|
||||
#define MRE_IN_IAT MRE_IN_ANALOG_TEMP_2
|
||||
|
||||
// map = "27 - AN volt 1"
|
||||
#define MRE_IN_ANALOG_VOLT_1 EFI_ADC_10
|
||||
#define MRE_IN_MAP MRE_IN_ANALOG_VOLT_1
|
||||
|
||||
// tps = "20 - AN volt 5" PC3
|
||||
#define MRE_IN_ANALOG_VOLT_5 EFI_ADC_13
|
||||
#define MRE_IN_TPS MRE_IN_ANALOG_VOLT_5
|
|
@ -59,6 +59,8 @@
|
|||
#include "proteus_meta.h"
|
||||
#endif
|
||||
|
||||
#include "mre_meta.h"
|
||||
|
||||
static const float injectorLagBins[VBAT_INJECTOR_CURVE_SIZE] = {
|
||||
6.0, 8.0, 10.0, 11.0,
|
||||
12.0, 13.0, 14.0, 15.0
|
||||
|
|
|
@ -204,6 +204,7 @@ INCDIR = . \
|
|||
$(PROJECT_DIR)/init \
|
||||
$(CONSOLE_INC) \
|
||||
$(PROJECT_DIR)/config/engines \
|
||||
$(PROJECT_DIR)/config/boards/ \
|
||||
$(PROJECT_DIR)/ext_algo \
|
||||
$(HW_LAYER_DRIVERS_INC) \
|
||||
$(HW_LAYER_INC) \
|
||||
|
|
|
@ -68,8 +68,7 @@ INCDIR += \
|
|||
$(ALLINC) \
|
||||
$(UTIL_INC) \
|
||||
$(PROJECT_DIR)/config/engines \
|
||||
$(PROJECT_DIR)/config/boards/proteus \
|
||||
$(PROJECT_DIR)/config/boards/microrusefi \
|
||||
$(PROJECT_DIR)/config/boards/ \
|
||||
$(CONTROLLERS_INC) \
|
||||
$(CONSOLE_INC) \
|
||||
$(DEVELOPMENT_DIR) \
|
||||
|
|
Loading…
Reference in New Issue