rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions | Variables
board_configuration.cpp File Reference

Functions

static void setInjectorPins ()
 
static void setIgnitionPins ()
 
static void setupDefaultSensorInputs ()
 
static void super_uaefi_boardConfigOverrides ()
 
bool validateBoardConfig ()
 
static void setDefaultETBPins ()
 
static void super_uaefi_boardDefaultConfiguration ()
 Board-specific configuration defaults.
 
int getBoardMetaOutputsCount ()
 
int getBoardMetaLowSideOutputsCount ()
 
GpiogetBoardMetaOutputs ()
 
int getBoardMetaDcOutputsCount ()
 
void setup_custom_board_overrides ()
 

Variables

static Gpio OUTPUTS []
 

Function Documentation

◆ getBoardMetaDcOutputsCount()

int getBoardMetaDcOutputsCount ( )

Definition at line 164 of file board_configuration.cpp.

164 {
165 return 2;
166}

◆ getBoardMetaLowSideOutputsCount()

int getBoardMetaLowSideOutputsCount ( )

Definition at line 156 of file board_configuration.cpp.

156 {
157 return getBoardMetaOutputsCount() - 7;
158}
int getBoardMetaOutputsCount()
Here is the call graph for this function:

◆ getBoardMetaOutputs()

Gpio * getBoardMetaOutputs ( )

Definition at line 160 of file board_configuration.cpp.

160 {
161 return OUTPUTS;
162}
static Gpio OUTPUTS[]

◆ getBoardMetaOutputsCount()

int getBoardMetaOutputsCount ( )

Definition at line 152 of file board_configuration.cpp.

152 {
153 return efi::size(OUTPUTS);
154}

◆ setDefaultETBPins()

static void setDefaultETBPins ( )
static

Definition at line 67 of file board_configuration.cpp.

67 {
68 // users would want to override those if using H-bridges for stepper idle control
69 setupTLE9201IncludingStepper(/*PWM controlPin*/Gpio::MM100_OUT_PWM3, Gpio::MM100_OUT_PWM4, Gpio::MM100_SPI2_MISO);
70 setupTLE9201IncludingStepper(/*PWM controlPin*/Gpio::MM100_OUT_PWM5, Gpio::MM100_SPI2_MOSI, Gpio::MM100_USB1ID, 1);
71}
void setupTLE9201IncludingStepper(Gpio controlPin, Gpio direction, Gpio disable, int dcIndex)
Here is the call graph for this function:

◆ setIgnitionPins()

static void setIgnitionPins ( )
static

Definition at line 23 of file board_configuration.cpp.

23 {
24 engineConfiguration->ignitionPins[0] = Gpio::MM100_IGN1;
25 engineConfiguration->ignitionPins[1] = Gpio::MM100_IGN2;
26 engineConfiguration->ignitionPins[2] = Gpio::MM100_IGN3;
27 engineConfiguration->ignitionPins[3] = Gpio::MM100_IGN4;
28 engineConfiguration->ignitionPins[4] = Gpio::MM100_IGN5;
29 engineConfiguration->ignitionPins[5] = Gpio::MM100_IGN6;
30}
static constexpr engine_configuration_s * engineConfiguration

◆ setInjectorPins()

static void setInjectorPins ( )
static

See https://rusefi.com/s/super-uaefi

Author
Andrey Belomutskiy, (c) 2012-2023

Definition at line 14 of file board_configuration.cpp.

14 {
15 engineConfiguration->injectionPins[0] = Gpio::MM100_INJ1;
16 engineConfiguration->injectionPins[1] = Gpio::MM100_INJ2;
17 engineConfiguration->injectionPins[2] = Gpio::MM100_INJ3;
18 engineConfiguration->injectionPins[3] = Gpio::MM100_INJ4;
19 engineConfiguration->injectionPins[4] = Gpio::MM100_INJ5;
20 engineConfiguration->injectionPins[5] = Gpio::MM100_INJ6;
21}

◆ setup_custom_board_overrides()

void setup_custom_board_overrides ( )

Definition at line 168 of file board_configuration.cpp.

168 {
171}
std::optional< setup_custom_board_overrides_type > custom_board_ConfigOverrides
std::optional< setup_custom_board_overrides_type > custom_board_DefaultConfiguration
static void super_uaefi_boardConfigOverrides()
static void super_uaefi_boardDefaultConfiguration()
Board-specific configuration defaults.
Here is the call graph for this function:

◆ setupDefaultSensorInputs()

static void setupDefaultSensorInputs ( )
static

Definition at line 32 of file board_configuration.cpp.

32 {
33 engineConfiguration->tps1_1AdcChannel = MM100_IN_TPS_ANALOG;
34 engineConfiguration->tps1_2AdcChannel = MM100_IN_AUX1_ANALOG;
35// engineConfiguration->map.sensor.hwChannel = PIN_D9;
36
37 setPPSInputs(MM100_IN_PPS_ANALOG, MM100_IN_AUX2_ANALOG);
38
39 engineConfiguration->clt.adcChannel = MM100_IN_CLT_ANALOG;
40 engineConfiguration->iat.adcChannel = MM100_IN_IAT_ANALOG;
41
42 engineConfiguration->triggerInputPins[0] = Gpio::MM100_UART8_TX; // VR2 max9924 is the safer default
43 engineConfiguration->camInputs[0] = Gpio::MM100_IN_D1; // HALL1
44 engineConfiguration->camInputs[1] = Gpio::MM100_IN_D2; // HALL2
45
47}
void setPPSInputs(adc_channel_e pps1, adc_channel_e pps2)
brain_input_pin_e triggerInputPins[TRIGGER_INPUT_PIN_COUNT]
Here is the call graph for this function:

◆ super_uaefi_boardConfigOverrides()

static void super_uaefi_boardConfigOverrides ( )
static

Definition at line 49 of file board_configuration.cpp.

49 {
52
54
55 engineConfiguration->vrThreshold[0].pin = Gpio::MM100_OUT_PWM6;
56
58
60
61}
void hellenMegaSdWithAccelerometer()
void setHellenCan()
void setHellenVbatt()
void setHellenMegaEnPin(bool enableBoardOnStartUp)
void setDefaultHellenAtPullUps(float pullup=HELLEN_DEFAULT_AT_PULLUP)

Referenced by setup_custom_board_overrides().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ super_uaefi_boardDefaultConfiguration()

static void super_uaefi_boardDefaultConfiguration ( )
static

Board-specific configuration defaults.

See also setDefaultEngineConfiguration

Definition at line 79 of file board_configuration.cpp.

79 {
83
85
88
90
91 engineConfiguration->canTxPin = Gpio::MM100_CAN_TX;
92 engineConfiguration->canRxPin = Gpio::MM100_CAN_RX;
93
94 engineConfiguration->mainRelayPin = Gpio::MM100_IGN7;
95 engineConfiguration->fanPin = Gpio::MM100_IGN8;
96 engineConfiguration->fuelPumpPin = Gpio::MM100_OUT_PWM2;
97
98 // SPI3 for on-board EGT
100 // MOSI not needed, we have one-way communication here
105
106 // "required" hardware is done - set some reasonable defaults
109
110 engineConfiguration->etbFunctions[0] = DC_Throttle1;
111
112 // Some sensible defaults for other options
114
115 setAlgorithm(engine_load_mode_e::LM_SPEED_DENSITY);
116
117 engineConfiguration->injectorCompensationMode = ICM_FixedRailPressure;
118
119#ifndef EFI_BOOTLOADER
120 setCommonNTCSensor(&engineConfiguration->clt, HELLEN_DEFAULT_AT_PULLUP);
121 setCommonNTCSensor(&engineConfiguration->iat, HELLEN_DEFAULT_AT_PULLUP);
122#endif // EFI_BOOTLOADER
123
124 setTPS1Calibration(100, 650);
125 hellenWbo();
126}
void setTPS1Calibration(uint16_t tpsMin, uint16_t tpsMax)
void setCrankOperationMode()
void setAlgorithm(engine_load_mode_e algo)
static void setupDefaultSensorInputs()
static void setIgnitionPins()
static void setInjectorPins()
static void setDefaultETBPins()
void hellenWbo()
void setHellenMMbaro()
void setCommonNTCSensor(ThermistorConf *thermistorConf, float pullup)

Referenced by setup_custom_board_overrides().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ validateBoardConfig()

bool validateBoardConfig ( )

Definition at line 63 of file board_configuration.cpp.

63 {
64 return true;
65}

Variable Documentation

◆ OUTPUTS

Gpio OUTPUTS[]
static
Initial value:
= {
Gpio::MM100_INJ1,
Gpio::MM100_INJ2,
Gpio::MM100_INJ3,
Gpio::MM100_INJ4,
Gpio::MM100_INJ5,
Gpio::MM100_INJ6,
Gpio::MM100_SPI2_CS,
Gpio::MM100_SPI2_SCK,
Gpio::MM100_INJ7,
Gpio::MM100_INJ8,
Gpio::MM100_OUT_PWM1,
Gpio::MM100_OUT_PWM2,
Gpio::MM100_IGN7,
Gpio::MM100_IGN8,
Gpio::MM100_IGN1,
Gpio::MM100_IGN2,
Gpio::MM100_IGN3,
Gpio::MM100_IGN4,
Gpio::MM100_IGN5,
Gpio::MM100_IGN6,
Gpio::MM100_LED2_GREEN,
}

Definition at line 128 of file board_configuration.cpp.

128 {
129 Gpio::MM100_INJ1, // 13B INJ_1
130 Gpio::MM100_INJ2, // 12B INJ_2
131 Gpio::MM100_INJ3, // 11B INJ_3
132 Gpio::MM100_INJ4, // 10B INJ_4
133 Gpio::MM100_INJ5, // 9B INJ_5
134 Gpio::MM100_INJ6, // 8B INJ_6
135 Gpio::MM100_SPI2_CS, // 19B INJ_7
136 Gpio::MM100_SPI2_SCK, // 18B INJ_8
137 Gpio::MM100_INJ7, // 20B LS1
138 Gpio::MM100_INJ8, // 21B LS2
139 Gpio::MM100_OUT_PWM1, // 22B LS3
140 Gpio::MM100_OUT_PWM2, // 31C LS4
141 Gpio::MM100_IGN7, // 30C LS5_HOT
142 Gpio::MM100_IGN8, // 29C LS6_HOT
143 Gpio::MM100_IGN1, // Coil 1
144 Gpio::MM100_IGN2, // Coil 2
145 Gpio::MM100_IGN3, // Coil 3
146 Gpio::MM100_IGN4, // Coil 4
147 Gpio::MM100_IGN5, // Coil 5
148 Gpio::MM100_IGN6, // Coil 6
149 Gpio::MM100_LED2_GREEN, // 20D High Side Output
150};

Go to the source code of this file.