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

Functions

Gpio getCommsLedPin ()
 
Gpio getRunningLedPin ()
 
Gpio getWarningLedPin ()
 
static void setInjectorPins ()
 
static void setIgnitionPins ()
 
static void setupDefaultSensorInputs ()
 
static void super_uaefi_boardConfigOverrides ()
 
bool validateBoardConfig ()
 
void setUaefiDefaultETBPins ()
 
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 176 of file board_configuration.cpp.

176 {
177 return 2;
178}

◆ getBoardMetaLowSideOutputsCount()

int getBoardMetaLowSideOutputsCount ( )

Definition at line 168 of file board_configuration.cpp.

168 {
169 return getBoardMetaOutputsCount() - 7;
170}
int getBoardMetaOutputsCount()
Here is the call graph for this function:

◆ getBoardMetaOutputs()

Gpio * getBoardMetaOutputs ( )

Definition at line 172 of file board_configuration.cpp.

172 {
173 return OUTPUTS;
174}
static Gpio OUTPUTS[]

◆ getBoardMetaOutputsCount()

int getBoardMetaOutputsCount ( )

Definition at line 164 of file board_configuration.cpp.

164 {
165 return efi::size(OUTPUTS);
166}

◆ getCommsLedPin()

Gpio getCommsLedPin ( )

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

Author
Andrey Belomutskiy, (c) 2012-2023

Definition at line 13 of file board_configuration.cpp.

13 {
14 return Gpio::MM100_LED3_BLUE;
15}

◆ getRunningLedPin()

Gpio getRunningLedPin ( )

Definition at line 17 of file board_configuration.cpp.

17 {
18 // this one is used to drive 20D - High side output
19 return Gpio::Unassigned;
20}
@ Unassigned

◆ getWarningLedPin()

Gpio getWarningLedPin ( )

Definition at line 22 of file board_configuration.cpp.

22 {
23 return Gpio::MM100_LED4_YELLOW;
24}

◆ setIgnitionPins()

static void setIgnitionPins ( )
static

Definition at line 35 of file board_configuration.cpp.

35 {
36 engineConfiguration->ignitionPins[0] = Gpio::MM100_IGN1;
37 engineConfiguration->ignitionPins[1] = Gpio::MM100_IGN2;
38 engineConfiguration->ignitionPins[2] = Gpio::MM100_IGN3;
39 engineConfiguration->ignitionPins[3] = Gpio::MM100_IGN4;
40 engineConfiguration->ignitionPins[4] = Gpio::MM100_IGN5;
41 engineConfiguration->ignitionPins[5] = Gpio::MM100_IGN6;
42}
static constexpr engine_configuration_s * engineConfiguration

◆ setInjectorPins()

static void setInjectorPins ( )
static

Definition at line 26 of file board_configuration.cpp.

26 {
27 engineConfiguration->injectionPins[0] = Gpio::MM100_INJ1;
28 engineConfiguration->injectionPins[1] = Gpio::MM100_INJ2;
29 engineConfiguration->injectionPins[2] = Gpio::MM100_INJ3;
30 engineConfiguration->injectionPins[3] = Gpio::MM100_INJ4;
31 engineConfiguration->injectionPins[4] = Gpio::MM100_INJ5;
32 engineConfiguration->injectionPins[5] = Gpio::MM100_INJ6;
33}

◆ setUaefiDefaultETBPins()

void setUaefiDefaultETBPins ( )

Definition at line 79 of file board_configuration.cpp.

79 {
80 // users would want to override those if using H-bridges for stepper idle control
81 setupTLE9201IncludingStepper(/*PWM controlPin*/Gpio::MM100_OUT_PWM3, Gpio::MM100_OUT_PWM4, Gpio::MM100_SPI2_MISO);
82 setupTLE9201IncludingStepper(/*PWM controlPin*/Gpio::MM100_OUT_PWM5, Gpio::MM100_SPI2_MOSI, Gpio::MM100_USB1ID, 1);
83}
void setupTLE9201IncludingStepper(Gpio controlPin, Gpio direction, Gpio disable, int dcIndex)

Referenced by setStepperHw(), super_uaefi_boardDefaultConfiguration(), and uaefi_boardDefaultConfiguration().

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

◆ setup_custom_board_overrides()

void setup_custom_board_overrides ( )

Definition at line 180 of file board_configuration.cpp.

180 {
183}
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 44 of file board_configuration.cpp.

44 {
45 engineConfiguration->tps1_1AdcChannel = MM100_IN_TPS_ANALOG;
46 engineConfiguration->tps1_2AdcChannel = MM100_IN_AUX1_ANALOG;
47// engineConfiguration->map.sensor.hwChannel = PIN_D9;
48
49 setPPSInputs(MM100_IN_PPS_ANALOG, MM100_IN_AUX2_ANALOG);
50
51 engineConfiguration->clt.adcChannel = MM100_IN_CLT_ANALOG;
52 engineConfiguration->iat.adcChannel = MM100_IN_IAT_ANALOG;
53
54 engineConfiguration->triggerInputPins[0] = Gpio::MM100_UART8_TX; // VR2 max9924 is the safer default
55 engineConfiguration->camInputs[0] = Gpio::MM100_IN_D1; // HALL1
56 engineConfiguration->camInputs[1] = Gpio::MM100_IN_D2; // HALL2
57
59}
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 61 of file board_configuration.cpp.

61 {
64
66
67 engineConfiguration->vrThreshold[0].pin = Gpio::MM100_OUT_PWM6;
68
70
72
73}
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.

Definition at line 91 of file board_configuration.cpp.

91 {
95
97
100
102
103 engineConfiguration->canTxPin = Gpio::MM100_CAN_TX;
104 engineConfiguration->canRxPin = Gpio::MM100_CAN_RX;
105
106 engineConfiguration->mainRelayPin = Gpio::MM100_IGN7;
107 engineConfiguration->fanPin = Gpio::MM100_IGN8;
108 engineConfiguration->fuelPumpPin = Gpio::MM100_OUT_PWM2;
109
110 // SPI3 for on-board EGT
112 // MOSI not needed, we have one-way communication here
117
118 // "required" hardware is done - set some reasonable defaults
121
122 engineConfiguration->etbFunctions[0] = DC_Throttle1;
123
124 // Some sensible defaults for other options
126
127 setAlgorithm(engine_load_mode_e::LM_SPEED_DENSITY);
128
129 engineConfiguration->injectorCompensationMode = ICM_FixedRailPressure;
130
131#ifndef EFI_BOOTLOADER
132 setCommonNTCSensor(&engineConfiguration->clt, HELLEN_DEFAULT_AT_PULLUP);
133 setCommonNTCSensor(&engineConfiguration->iat, HELLEN_DEFAULT_AT_PULLUP);
134#endif // EFI_BOOTLOADER
135
136 setTPS1Calibration(100, 650);
137 hellenWbo();
138}
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()
void setUaefiDefaultETBPins()
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 75 of file board_configuration.cpp.

75 {
76 return true;
77}

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 140 of file board_configuration.cpp.

140 {
141 Gpio::MM100_INJ1, // 13B INJ_1
142 Gpio::MM100_INJ2, // 12B INJ_2
143 Gpio::MM100_INJ3, // 11B INJ_3
144 Gpio::MM100_INJ4, // 10B INJ_4
145 Gpio::MM100_INJ5, // 9B INJ_5
146 Gpio::MM100_INJ6, // 8B INJ_6
147 Gpio::MM100_SPI2_CS, // 19B INJ_7
148 Gpio::MM100_SPI2_SCK, // 18B INJ_8
149 Gpio::MM100_INJ7, // 20B LS1
150 Gpio::MM100_INJ8, // 21B LS2
151 Gpio::MM100_OUT_PWM1, // 22B LS3
152 Gpio::MM100_OUT_PWM2, // 31C LS4
153 Gpio::MM100_IGN7, // 30C LS5_HOT
154 Gpio::MM100_IGN8, // 29C LS6_HOT
155 Gpio::MM100_IGN1, // Coil 1
156 Gpio::MM100_IGN2, // Coil 2
157 Gpio::MM100_IGN3, // Coil 3
158 Gpio::MM100_IGN4, // Coil 4
159 Gpio::MM100_IGN5, // Coil 5
160 Gpio::MM100_IGN6, // Coil 6
161 Gpio::MM100_LED2_GREEN, // 20D High Side Output
162};

Go to the source code of this file.