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/hellen/hellen72/board_configuration.cpp
3 *
4 *
5 * @brief Configuration defaults for the Hellen72 board
6 *
7 * See https://rusefi.com/s/hellen72
8 *
9 * @author andreika <prometheus.pcb@gmail.com>
10 * @author Andrey Belomutskiy, (c) 2012-2020
11 */
12
13#include "pch.h"
14#include "hellen_meta.h"
15#include "board_overrides.h"
16
23
24static void setIgnitionPins() {
25 engineConfiguration->ignitionPins[0] = H176_IGN_1; // 3F - IGN_1 (1&4)
27 engineConfiguration->ignitionPins[2] = Gpio::E5; // 3I - IGN_2 (2&3)
29}
30
32 // trigger inputs
35 // Direct hall-only cam input
37
39
42
44
45 engineConfiguration->clt.adcChannel = H144_IN_CLT;
46
47 engineConfiguration->iat.adcChannel = H144_IN_IAT;
48}
49
50#include "hellen_leds_176.cpp"
51
54
55 if (engine->engineState.hellenBoardId == -1) {
56 // Rev a-d use SPI3 for SD card
58 } else {
59 // Revs E and later use SPI2 for SD card
61 }
62
63 // NB2 still uses L6205PD
64 engineConfiguration->etbIo[0].directionPin1 = Gpio::H144_OUT_PWM3; // ETB+
65 engineConfiguration->etbIo[0].directionPin2 = Gpio::H144_OUT_PWM4; // ETB-
66 engineConfiguration->etbIo[0].controlPin = Gpio::H144_OUT_PWM2; // ETB_EN
68
70
72}
73
74/**
75 * @brief Board-specific configuration defaults.
76 *
77 * See also setDefaultEngineConfiguration
78 *
79
80 */
84
86
90
92 engineConfiguration->clutchDownPin = Gpio::H144_IN_RES3;
93 engineConfiguration->clutchDownPinMode = PI_INVERTED_DEFAULT;
94
101 engineConfiguration->vvtPins[0] = Gpio::I0; // 4R - VVT (O5)
102
103 engineConfiguration->tachOutputPin = Gpio::D13; // 3O - TACH (PWM7)
104 engineConfiguration->alternatorControlPin = Gpio::D15; // 3M - ALTERN (PWM6)
105
106
107 // "required" hardware is done - set some reasonable defaults
109
111 engineConfiguration->firingOrder = FO_1_3_4_2;
112
113 engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS; // IM_WASTED_SPARK
114
115
116
117 hellenWbo();
118}
119
void setup_custom_board_overrides()
EngineState engineState
Definition engine.h:344
@ Unassigned
static EngineAccessor engine
Definition engine.h:413
std::optional< setup_custom_board_overrides_type > custom_board_ConfigOverrides
std::optional< setup_custom_board_overrides_type > custom_board_DefaultConfiguration
static constexpr engine_configuration_s * engineConfiguration
static void setupDefaultSensorInputs()
static void setIgnitionPins()
static void setInjectorPins()
static void hellen_MiataNB2_boardDefaultConfiguration()
Board-specific configuration defaults.
static void hellen_MiataNB2_boardConfigOverrides()
void setHellenCan()
void hellenWbo()
void setHellenVbatt()
void setHellenSdCardSpi2()
void setDefaultHellenAtPullUps(float pullup=HELLEN_DEFAULT_AT_PULLUP)
void setHellenSdCardSpi3()
brain_input_pin_e triggerInputPins[TRIGGER_INPUT_PIN_COUNT]