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

Functions

static void setInjectorPins ()
 Board-specific configuration defaults.
 
Gpio getWarningLedPin ()
 
Gpio getCommsLedPin ()
 
Gpio getRunningLedPin ()
 
static void setIgnitionPins ()
 
static void s105_boardDefaultConfiguration ()
 
static void setupVbatt ()
 
static void s105_boardConfigOverrides ()
 
float getAnalogInputDividerCoefficient (adc_channel_e hwChannel)
 
void setup_custom_board_overrides ()
 

Function Documentation

◆ getAnalogInputDividerCoefficient()

float getAnalogInputDividerCoefficient ( adc_channel_e  hwChannel)

Definition at line 112 of file board_configuration.cpp.

112 {
113 switch (hwChannel) {
114 /* MAP, TPS, MAF (na), AC press (na) */
115 case EFI_ADC_0:
116 case EFI_ADC_1:
117 case EFI_ADC_11:
118 case EFI_ADC_6:
119 return (22.0 + 41.2) / 41.2;
120
121 /* IAT, CLT */
122 case EFI_ADC_3:
123 case EFI_ADC_14:
124 /* no divider, 1.5K pull-up to 3.3V, 22K pull-down */
125 /* TODO: handle both pull-up and pull-down */
126 return 1.0;
127
128 /* AFR 1, AFR 2 (na), knock (TBD) */
129 case EFI_ADC_7:
130 case EFI_ADC_5:
131 case EFI_ADC_2:
132 /* no divider */
133 return 1.0;
134
135 /* +12 sense, Ignition switch */
136 case EFI_ADC_9:
137 case EFI_ADC_8:
138 return (68.0 + 6.8) / 6.8;
139
140 /* 5V feedback */
141 case EFI_ADC_10:
142 return (10.0 + 10.0) / 10.0;
143
144 /* Ignition feedback */
145 case EFI_ADC_12:
146 case EFI_ADC_13:
147 /* TBD */
148 return 1.0;
149
150 default:
152 }
154}
static constexpr engine_configuration_s * engineConfiguration

◆ getCommsLedPin()

Gpio getCommsLedPin ( )

Definition at line 27 of file board_configuration.cpp.

27 {
28 // this board has no comms led
29 return Gpio::Unassigned;
30}
@ Unassigned

◆ getRunningLedPin()

Gpio getRunningLedPin ( )

Definition at line 32 of file board_configuration.cpp.

32 {
33 return Gpio::Unassigned;
34}

◆ getWarningLedPin()

Gpio getWarningLedPin ( )

Definition at line 22 of file board_configuration.cpp.

22 {
23 // this board has no warning led
24 return Gpio::Unassigned;
25}

◆ s105_boardConfigOverrides()

static void s105_boardConfigOverrides ( )
static

◆ s105_boardDefaultConfiguration()

static void s105_boardDefaultConfiguration ( )
static

Definition at line 45 of file board_configuration.cpp.

45 {
48
49 strcpy(engineConfiguration->engineMake, "UAZ");
50 strcpy(engineConfiguration->engineCode, "451");
51
52 // No LEDs on this board, do we need some unused pin tp toggle? PC14 of LSI did not work for blinking, any better alternatives?
53
56 engineConfiguration->tachOutputPin = Gpio::B8; /* not populated by default */
58 //engineConfiguration->idle.solenoidPin = ?
60 engineConfiguration->fanPin = Gpio::D6; /* not populated by default */
61 engineConfiguration->fanPinMode = OM_OPENDRAIN;
62 //engineConfiguration->mainRelayPin = ?;
64
66 engineConfiguration->firingOrder = FO_1_2_4_3;
67
68 engineConfiguration->ignitionMode = IM_WASTED_SPARK;
70 engineConfiguration->injectionMode = IM_SEQUENTIAL;
71
73
77 engineConfiguration->afr.hwChannel = EFI_ADC_NONE;
81}
static void setIgnitionPins()
static void setInjectorPins()
brain_input_pin_e triggerInputPins[TRIGGER_INPUT_PIN_COUNT]

Referenced by setup_custom_board_overrides().

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

◆ setIgnitionPins()

static void setIgnitionPins ( )
static

◆ setInjectorPins()

static void setInjectorPins ( )
static

◆ setup_custom_board_overrides()

void setup_custom_board_overrides ( )

Definition at line 156 of file board_configuration.cpp.

156 {
159}
std::optional< setup_custom_board_overrides_type > custom_board_ConfigOverrides
std::optional< setup_custom_board_overrides_type > custom_board_DefaultConfiguration
static void s105_boardDefaultConfiguration()
static void s105_boardConfigOverrides()
Here is the call graph for this function:

◆ setupVbatt()

static void setupVbatt ( )
static

Definition at line 83 of file board_configuration.cpp.

83 {
84 // There are two different input dividers:
85 // 22K (high) + 22K (low) on IAT and CLT
86 // 22K (high) + 41.2K (low) on TPS and MAP
88 // TODO: TPS and MAP
89 //engineConfiguration->analogInputDividerCoefficient = (22.0 + 41.2) / 22.0;
90
91 // 68K + 6.8k
92 engineConfiguration->vbattDividerCoeff = (68 + 6.8) / 6.8;
93
94 // pin input +12 from Main Relay
96
98}

Go to the source code of this file.