rusEFI
The most advanced open source ECU
Functions | Variables
board_configuration.cpp File Reference

Functions

static void setupDefaultSensorInputs ()
 
void setBoardConfigOverrides ()
 
void setBoardDefaultConfiguration ()
 Hardware board-specific default configuration (GPIO pins, ADC channels, SPI configs etc.) More...
 
int getBoardMetaDcOutputsCount ()
 
int getBoardMetaOutputsCount ()
 
int getBoardMetaLowSideOutputsCount ()
 
GpiogetBoardMetaOutputs ()
 

Variables

static Gpio OUTPUTS []
 
static Gpio SBC_OUTPUTS []
 

Function Documentation

◆ getBoardMetaDcOutputsCount()

int getBoardMetaDcOutputsCount ( )

Definition at line 77 of file board_configuration.cpp.

77  {
78  return 2;
79 }

◆ getBoardMetaLowSideOutputsCount()

int getBoardMetaLowSideOutputsCount ( )

Definition at line 125 of file board_configuration.cpp.

125  {
127  return getBoardMetaOutputsCount();
128  }
129  return getBoardMetaOutputsCount() - 1 - 6;
130 }
int getBoardMetaOutputsCount()
engine_configuration_s * engineConfiguration
Here is the call graph for this function:

◆ getBoardMetaOutputs()

Gpio* getBoardMetaOutputs ( )

Definition at line 132 of file board_configuration.cpp.

132  {
134  return SBC_OUTPUTS;
135  }
136  return OUTPUTS;
137 }
static Gpio OUTPUTS[]
static Gpio SBC_OUTPUTS[]

◆ getBoardMetaOutputsCount()

int getBoardMetaOutputsCount ( )

Definition at line 118 of file board_configuration.cpp.

118  {
120  return efi::size(SBC_OUTPUTS);
121  }
122  return efi::size(OUTPUTS);
123 }
composite packet size

◆ setBoardConfigOverrides()

void setBoardConfigOverrides ( )

Definition at line 29 of file board_configuration.cpp.

29  {
32 
35  engineConfiguration->sdCardCsPin = Gpio::H_SPI1_CS1;
36  engineConfiguration->sdCardSpiDevice = SPI_DEVICE_1;
37  engineConfiguration->spi1mosiPin = Gpio::A7; // not the usual H_SPI1_MOSI since that's CAN2RX
38  engineConfiguration->spi1misoPin = Gpio::H_SPI1_MISO;
39  engineConfiguration->spi1sckPin = Gpio::H_SPI1_SCK;
42 
45 
46 
47 }
void hellenMegaAccelerometerPreInitCS2Pin()
void setHellenVbatt()
void setHellenMegaEnPin(bool enableBoardOnStartUp)
void setDefaultHellenAtPullUps()
Definition: hellen_meta.h:318
Here is the call graph for this function:

◆ setBoardDefaultConfiguration()

void setBoardDefaultConfiguration ( )

Hardware board-specific default configuration (GPIO pins, ADC channels, SPI configs etc.)

Hardware board-specific default configuration (GPIO pins, ADC channels, SPI configs etc.)

Hardware board-specific default configuration (GPIO pins, ADC channels, SPI configs etc.)

See also setDefaultEngineConfiguration

!!!!!!!!!!!!!!!!!!

Jimmy best tune https://rusefi.com/online/view.php?msq=626 md_sanci latest tune https://rusefi.com/online/view.php?msq=630

Definition at line 49 of file board_configuration.cpp.

49  {
50  // GM stepper: DC2 positive#4/negative#5 to pins A/B
51  // DC1 positive#1/negative#2 to pin D/C
52  setupTLE9201IncludingStepper(/*PWM controlPin*/Gpio::MM100_OUT_PWM3, Gpio::MM100_OUT_PWM4, Gpio::MM100_SPI2_MISO);
53  setupTLE9201IncludingStepper(/*PWM controlPin*/Gpio::MM100_OUT_PWM5, Gpio::MM100_SPI2_MOSI, Gpio::MM100_USB1ID, 1);
54 
56 
57  engineConfiguration->mainRelayPin = Gpio::MM100_IGN7;
58  engineConfiguration->fuelPumpPin = Gpio::MM100_IGN8;
59 
60  engineConfiguration->injectionPins[0] = Gpio::MM100_COATED_INJ1;
61  engineConfiguration->injectionPins[1] = Gpio::MM100_INJ2;
62  engineConfiguration->injectionPins[2] = Gpio::MM100_INJ3;
63  engineConfiguration->injectionPins[3] = Gpio::MM100_INJ4;
64  engineConfiguration->injectionPins[4] = Gpio::MM100_INJ5;
65  engineConfiguration->injectionPins[5] = Gpio::MM100_INJ6;
66 
67  engineConfiguration->ignitionPins[0] = Gpio::MM100_IGN1;
68  engineConfiguration->ignitionPins[1] = Gpio::MM100_IGN2;
69  engineConfiguration->ignitionPins[2] = Gpio::MM100_IGN3;
70  engineConfiguration->ignitionPins[3] = Gpio::MM100_IGN4;
71  engineConfiguration->ignitionPins[4] = Gpio::MM100_IGN5;
72  engineConfiguration->ignitionPins[5] = Gpio::MM100_IGN6;
73 
75 }
void setupTLE9201IncludingStepper(Gpio controlPin, Gpio direction, Gpio disable, int dcIndex)
static void setupDefaultSensorInputs()
void setHellenMMbaro()
Definition: hellen_meta.h:325
Here is the call graph for this function:

◆ setupDefaultSensorInputs()

static void setupDefaultSensorInputs ( )
static

See https://rusefi.com/s/uaefi121

Author
Andrey Belomutskiy, (c) 2012-2023

Definition at line 12 of file board_configuration.cpp.

12  {
13  engineConfiguration->tps1_1AdcChannel = MM100_IN_TPS_ANALOG;
14  engineConfiguration->tps1_2AdcChannel = MM100_IN_AUX1_ANALOG;
15  engineConfiguration->map.sensor.hwChannel = MM100_IN_MAP1_ANALOG;
16 
17  setPPSInputs(MM100_IN_PPS_ANALOG, MM100_IN_AUX2_ANALOG);
18 
19  engineConfiguration->clt.adcChannel = MM100_IN_CLT_ANALOG;
20  engineConfiguration->iat.adcChannel = MM100_IN_IAT_ANALOG;
21 
22  engineConfiguration->triggerInputPins[0] = Gpio::MM100_UART8_TX; // VR2 max9924 is the safer default
23  engineConfiguration->camInputs[0] = Gpio::MM100_IN_D2; // HALL2
24  engineConfiguration->camInputs[1] = Gpio::MM100_IN_D3; // HALL3
25 
26  engineConfiguration->vehicleSpeedSensorInputPin = Gpio::MM100_IN_D1; // HALL1
27 }
void setPPSInputs(adc_channel_e pps1, adc_channel_e pps2)
brain_input_pin_e triggerInputPins[TRIGGER_INPUT_PIN_COUNT]

Referenced by setBoardDefaultConfiguration().

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

Variable Documentation

◆ OUTPUTS

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

Definition at line 81 of file board_configuration.cpp.

Referenced by getBoardMetaOutputs(), and getBoardMetaOutputsCount().

◆ SBC_OUTPUTS

Gpio SBC_OUTPUTS[]
static
Initial value:
= {
Gpio::MM100_COATED_INJ1,
Gpio::MM100_INJ2,
Gpio::MM100_INJ3,
Gpio::MM100_INJ4,
Gpio::MM100_INJ5,
Gpio::MM100_INJ6,
Gpio::MM100_SPI2_CS,
Gpio::MM100_COATED_SPI2_SCK,
Gpio::MM100_IGN8,
}

Definition at line 105 of file board_configuration.cpp.

Referenced by getBoardMetaOutputs(), and getBoardMetaOutputsCount().

Go to the source code of this file.