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 alphax_silver_revA_boardConfigOverrides ()
 
static void alphax_silver_revA_boardDefaultConfiguration ()
 
static void board_init_ext_gpios ()
 
static void alphax_silver_revA_boardInitHardware ()
 Board-specific initialization code.
 
void boardOnConfigurationChange (engine_configuration_s *)
 
int getBoardMetaOutputsCount ()
 
int getBoardMetaLowSideOutputsCount ()
 
GpiogetBoardMetaOutputs ()
 
void setup_custom_board_overrides ()
 

Variables

static OutputPin alphaTempPullUp
 
static OutputPin alphaTachSelPullUp
 
static OutputPin alphaHall1PullUp
 
static OutputPin alphaHall2PullUp
 
static OutputPin alphaHall3PullUp
 
static OutputPin alphaHall4PullUp
 
static const tle9104_config tle9104_cfg [BOARD_TLE9104_COUNT]
 
static Gpio OUTPUTS []
 

Function Documentation

◆ alphax_silver_revA_boardConfigOverrides()

static void alphax_silver_revA_boardConfigOverrides ( )
static

Definition at line 44 of file board_configuration.cpp.

44 {
45 /* Force PWR_EN as TLE9104s are powered from +5VA */
47
50
51 /* Two TLE9104 */
53 engineConfiguration->vrThreshold[0].pin = Gpio::MM100_OUT_PWM2;
54}
static constexpr engine_configuration_s * engineConfiguration
void setHellenCan()
void hellenMegaModule()
void setHellenMegaEnPin(bool enableBoardOnStartUp)
static void enableHellenSpi3()

Referenced by setup_custom_board_overrides().

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

◆ alphax_silver_revA_boardDefaultConfiguration()

static void alphax_silver_revA_boardDefaultConfiguration ( )
static

Definition at line 56 of file board_configuration.cpp.

56 {
61 setInline4();
62}
void setInline4()
static void setupDefaultSensorInputs()
static void setIgnitionPins()
static void setInjectorPins()
void setHellenMMbaro()

Referenced by setup_custom_board_overrides().

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

◆ alphax_silver_revA_boardInitHardware()

static void alphax_silver_revA_boardInitHardware ( )
static

Board-specific initialization code.

Definition at line 167 of file board_configuration.cpp.

167 {
168 alphaTempPullUp.initPin("a-temp", Gpio::MM100_IGN8); // E6
169 alphaTachSelPullUp.initPin("Tach PullUp", Gpio::MM100_OUT_PWM1);
170 alphaHall1PullUp.initPin("hall1 PullUp", Gpio::MM100_OUT_PWM3);
171 alphaHall2PullUp.initPin("hall2 PullUp", Gpio::MM100_OUT_PWM4);
172 alphaHall3PullUp.initPin("hall3 PullUp", Gpio::MM100_OUT_PWM5);
173 alphaHall4PullUp.initPin("hall4 PullUp", Gpio::MM100_OUT_PWM6);
175}
void initPin(const char *msg, brain_pin_e brainPin, pin_output_mode_e outputMode, bool forceInitWithFatalError=false)
Definition efi_gpio.cpp:711
static OutputPin alphaTempPullUp
static OutputPin alphaHall1PullUp
static void board_init_ext_gpios()
static OutputPin alphaHall4PullUp
static OutputPin alphaTachSelPullUp
static OutputPin alphaHall3PullUp
static OutputPin alphaHall2PullUp

Referenced by setup_custom_board_overrides().

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

◆ board_init_ext_gpios()

static void board_init_ext_gpios ( )
static

Definition at line 138 of file board_configuration.cpp.

138 {
139 {
140 /* Waste of RAM, switch to palSetPadMode() and palSetPort() */
141 static OutputPin TleCs0;
142 TleCs0.initPin("TLE9104 CS0", Gpio::A15);
143 TleCs0.setValue(1);
144 }
145 {
146 static OutputPin TleCs1;
147 TleCs1.initPin("TLE9104 CS1", Gpio::B12);
148 TleCs1.setValue(1);
149 }
150
151 {
152 static OutputPin TleReset;
153 TleReset.initPin("TLE9104 Reset", Gpio::B14);
154 TleReset.setValue(1);
155
156 static OutputPin TleEn;
157 TleEn.initPin("TLE9104 En", Gpio::B15);
158 TleEn.setValue(1);
159 }
160
162}
Single output pin reference and state.
Definition efi_output.h:49
void setValue(const char *msg, int logicValue, bool isForce=false)
Definition efi_gpio.cpp:604
static const tle9104_config tle9104_cfg[BOARD_TLE9104_COUNT]
void initAll9104(const tle9104_config *configs)
Definition tle9104.cpp:568
Here is the call graph for this function:

◆ boardOnConfigurationChange()

void boardOnConfigurationChange ( engine_configuration_s previousConfiguration)

◆ getBoardMetaLowSideOutputsCount()

int getBoardMetaLowSideOutputsCount ( )

Definition at line 205 of file board_configuration.cpp.

205 {
206 return getBoardMetaOutputsCount() - 4;
207}
int getBoardMetaOutputsCount()
Here is the call graph for this function:

◆ getBoardMetaOutputs()

Gpio * getBoardMetaOutputs ( )

Definition at line 209 of file board_configuration.cpp.

209 {
210 return OUTPUTS;
211}
static Gpio OUTPUTS[]

◆ getBoardMetaOutputsCount()

int getBoardMetaOutputsCount ( )

Definition at line 201 of file board_configuration.cpp.

201 {
202 return efi::size(OUTPUTS);
203}

◆ setIgnitionPins()

static void setIgnitionPins ( )
static

Definition at line 24 of file board_configuration.cpp.

24 {
25 engineConfiguration->ignitionPins[0] = Gpio::MM100_IGN1;
26 engineConfiguration->ignitionPins[1] = Gpio::MM100_IGN2;
27 engineConfiguration->ignitionPins[2] = Gpio::MM100_IGN3;
28 engineConfiguration->ignitionPins[3] = Gpio::MM100_IGN4;
29}

◆ setInjectorPins()

static void setInjectorPins ( )
static

◆ setup_custom_board_overrides()

void setup_custom_board_overrides ( )

Definition at line 213 of file board_configuration.cpp.

213 {
217}
std::optional< setup_custom_board_overrides_type > custom_board_InitHardware
Definition hardware.cpp:77
std::optional< setup_custom_board_overrides_type > custom_board_ConfigOverrides
std::optional< setup_custom_board_overrides_type > custom_board_DefaultConfiguration
static void alphax_silver_revA_boardDefaultConfiguration()
static void alphax_silver_revA_boardConfigOverrides()
static void alphax_silver_revA_boardInitHardware()
Board-specific initialization code.
Here is the call graph for this function:

◆ setupDefaultSensorInputs()

static void setupDefaultSensorInputs ( )
static

Definition at line 31 of file board_configuration.cpp.

Variable Documentation

◆ alphaHall1PullUp

OutputPin alphaHall1PullUp
static

Definition at line 12 of file board_configuration.cpp.

◆ alphaHall2PullUp

OutputPin alphaHall2PullUp
static

Definition at line 13 of file board_configuration.cpp.

◆ alphaHall3PullUp

OutputPin alphaHall3PullUp
static

Definition at line 14 of file board_configuration.cpp.

◆ alphaHall4PullUp

OutputPin alphaHall4PullUp
static

Definition at line 15 of file board_configuration.cpp.

◆ alphaTachSelPullUp

OutputPin alphaTachSelPullUp
static

Definition at line 11 of file board_configuration.cpp.

◆ alphaTempPullUp

OutputPin alphaTempPullUp
static

Definition at line 10 of file board_configuration.cpp.

◆ OUTPUTS

Gpio OUTPUTS[]
static
Initial value:

Definition at line 186 of file board_configuration.cpp.

186 {
187 Gpio::TLE9104_0_OUT_3, // 1A - Injector 4
188 Gpio::TLE9104_0_OUT_2, // 2A - Injector 3
189 Gpio::TLE9104_0_OUT_1, // 3A - Injector 2
190 Gpio::TLE9104_0_OUT_0, // 4A - Injector 1
191 Gpio::TLE9104_1_OUT_1, // 5A Fuel Pump Relay
192 Gpio::TLE9104_1_OUT_2, // 6A Idle Output
193 Gpio::TLE9104_1_OUT_3, // 28A Fan Relay
194 Gpio::TLE9104_1_OUT_0, // 14A Tach Output
195 Gpio::MM100_IGN1,
196 Gpio::MM100_IGN2,
197 Gpio::MM100_IGN3,
198 Gpio::MM100_IGN4,
199};

◆ tle9104_cfg

const tle9104_config tle9104_cfg[BOARD_TLE9104_COUNT]
static

Definition at line 71 of file board_configuration.cpp.

71 {
72 {
73 .spi_bus = &SPID3,
74 .spi_config = {
75 .circular = false,
76#ifdef _CHIBIOS_RT_CONF_VER_6_1_
77 .end_cb = nullptr,
78#else
79 .slave = false,
80 .data_cb = nullptr,
81 .error_cb = nullptr,
82#endif
83 .ssport = GPIOA,
84 .sspad = 15,
85 .cr1 =
86 SPI_CR1_16BIT_MODE |
87 SPI_CR1_SSM |
88 SPI_CR1_SSI |
89 ((3 << SPI_CR1_BR_Pos) & SPI_CR1_BR) | // div = 16
90 SPI_CR1_MSTR |
91 SPI_CR1_CPHA |
92 0,
93 .cr2 = SPI_CR2_16BIT_MODE
94 },
95 .direct_io = {
96 { .port = GPIOD, .pad = 3 },
97 { .port = GPIOA, .pad = 9 },
98 { .port = GPIOD, .pad = 11 },
99 { .port = GPIOD, .pad = 10 }
100 },
101 .resn = Gpio::Unassigned, //Gpio::B14,
102 .en = Gpio::Unassigned //Gpio::B15
103 },
104 {
105 .spi_bus = &SPID3,
106 .spi_config = {
107 .circular = false,
108#ifdef _CHIBIOS_RT_CONF_VER_6_1_
109 .end_cb = nullptr,
110#else
111 .slave = false,
112 .data_cb = nullptr,
113 .error_cb = nullptr,
114#endif
115 .ssport = GPIOB,
116 .sspad = 12,
117 .cr1 =
118 SPI_CR1_16BIT_MODE |
119 SPI_CR1_SSM |
120 SPI_CR1_SSI |
121 ((3 << SPI_CR1_BR_Pos) & SPI_CR1_BR) | // div = 16
122 SPI_CR1_MSTR |
123 SPI_CR1_CPHA |
124 0,
125 .cr2 = SPI_CR2_16BIT_MODE
126 },
127 .direct_io = {
128 { .port = GPIOA, .pad = 8 }, // tach
129 { .port = GPIOD, .pad = 15 }, // pump relay
130 { .port = GPIOD, .pad = 2 }, // idle valve
131 { .port = GPIOD, .pad = 12 } // fan relay
132 },
133 .resn = Gpio::Unassigned, //Gpio::B14,
134 .en = Gpio::Unassigned //Gpio::B15
135 }
136};
@ Unassigned

Go to the source code of this file.