rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
board_configuration.cpp
Go to the documentation of this file.
1/**
2 * @file boards/kinetis/board_configuration.h
3 *
4 * @brief In this file we can override engine_configuration.cpp.
5 *
6 * @date Mar 22, 2019
7 * @author andreika, (c) 2019
8 */
9
10#include "pch.h"
11#include "board_overrides.h"
12
13#if 0
16#endif
17
19 // this board has no warning led
20 return Gpio::Unassigned;
21}
22
26
28 // this board has no comms led
29 return Gpio::Unassigned;
30}
31
35// engineConfiguration->consoleSerialTxPin = Gpio::A10;
36// engineConfiguration->consoleSerialRxPin = Gpio::A11;
39}
40
43
44 setAlgorithm(engine_load_mode_e::LM_SPEED_DENSITY);
45
47 engineConfiguration->firingOrder = FO_1_3_4_2;
48
49 engineConfiguration->ignitionMode = IM_WASTED_SPARK;
51 engineConfiguration->injectionMode = IM_SIMULTANEOUS;
52
53 engineConfiguration->globalTriggerAngleOffset = 114; // the end of 19th tooth?
54
57
60
61 engineConfiguration->map.sensor.type = MT_MPX4250A;
62
65
67 // todo:
73
78
80
82
85
88
89 // todo:
90 int i;
91 for (i = 0; i < MAX_CYLINDER_COUNT; i++)
93 for (i = 0; i < MAX_CYLINDER_COUNT; i++)
95
98
99 //engineConfiguration->isFastAdcEnabled = false;
100
101 // we call it here because setDefaultBoardConfiguration() is not called for DEFAULT_ENGINE_TYPE=MINIMAL_PINS
103}
104
106 // on Kinetis, ADC_FAST & SLOW are not really "fast" or "slow",
107 // they are just different ADC numbers with different sets of channels
110
113}
114
115#include <setjmp.h>
116
117void longjmp(jmp_buf /*env*/, int /*status*/) {
118 // noop, but noreturn
119 while (1) { }
120}
121
122int setjmp(jmp_buf /*env*/) {
123 // Fake return 0, not implemented
124 return 0;
125}
126
void removeChannel(const char *, adc_channel_e hwChannel)
void addFastAdcChannel(const char *, adc_channel_e hwChannel)
Gpio getWarningLedPin()
Gpio getCommsLedPin()
Gpio getRunningLedPin()
void setup_custom_board_overrides()
@ Unassigned
void setAdcChannelOverrides()
std::optional< setup_custom_board_overrides_type > custom_board_ConfigOverrides
static constexpr persistent_config_s * config
static constexpr engine_configuration_s * engineConfiguration
void setAlgorithm(engine_load_mode_e algo)
static void setSerialConfigurationOverrides()
char __debugBuffer[80]
int setjmp(jmp_buf)
static void kinetis_boardConfigOverrides()
void longjmp(jmp_buf, int)
int __debugEnabled
brain_input_pin_e triggerInputPins[TRIGGER_INPUT_PIN_COUNT]
float crankingCycleBaseFuel[CRANKING_CYCLE_CLT_SIZE][CRANKING_CURVE_SIZE]
constexpr void setTable(TElement(&dest)[N][M], const VElement value)
constexpr int convertVoltageTo10bitADC(float voltage)
Definition tps.h:21