rusEFI
The most advanced open source ECU
board_configuration.cpp
Go to the documentation of this file.
1 /**
2  * @file boards/cypress/board_configuration.h
3  *
4  * @brief In this file we can override engine_configuration.cpp.
5  *
6  * @date Jan 27, 2020
7  * @author andreika <prometheus.pcb@gmail.com>
8  */
9 
10 #include "pch.h"
11 #include "trigger_input.h"
12 
14  // this board has no warning led
15  return Gpio::Unassigned;
16 }
17 
19  return Gpio::Unassigned;
20 }
21 
23  // this board has no comms led
24  return Gpio::Unassigned;
25 }
26 
29 
31 
32  setAlgorithm(LM_SPEED_DENSITY);
33 
35  engineConfiguration->firingOrder = FO_1_3_4_2;
36 
37  engineConfiguration->ignitionMode = IM_WASTED_SPARK;
38  engineConfiguration->crankingInjectionMode = IM_SIMULTANEOUS;
39  engineConfiguration->injectionMode = IM_SIMULTANEOUS;
40 
41  engineConfiguration->globalTriggerAngleOffset = 114; // the end of 19th tooth?
42 
45 
48 
49  engineConfiguration->rpmHardLimit = 3000; // yes, 3k. let's play it safe for now
50 
51  engineConfiguration->map.sensor.type = MT_MPX4250A;
52 
58 
60  // todo:
66 
69  engineConfiguration->tpsErrorDetectionTooLow = -10; // -10% open
71 
73 
75  engineConfiguration->clt.adcChannel = EFI_ADC_26;
76  engineConfiguration->iat.adcChannel = EFI_ADC_27;
78  engineConfiguration->afr.hwChannel = EFI_ADC_4;
80 
81 #if 0
82  engineConfiguration->tps1_1AdcChannel = EFI_ADC_NONE;
83  engineConfiguration->vbattAdcChannel = EFI_ADC_NONE;
84  engineConfiguration->clt.adcChannel = EFI_ADC_NONE;
85  engineConfiguration->iat.adcChannel = EFI_ADC_NONE;
86  engineConfiguration->afr.hwChannel = EFI_ADC_NONE;
87 #endif
88 
90  engineConfiguration->tps1_2AdcChannel = EFI_ADC_NONE;
91  engineConfiguration->tps2_2AdcChannel = EFI_ADC_NONE;
93 
94 
95  engineConfiguration->hipOutputChannel = EFI_ADC_NONE;
96  engineConfiguration->fuelLevelSensor = EFI_ADC_NONE;
98 
102 
103 #if 0
104 
105  // todo:
106  int i;
107  for (i = 0; i < MAX_CYLINDER_COUNT; i++)
109  for (i = 0; i < MAX_CYLINDER_COUNT; i++)
111 
112  engineConfiguration->adcVcc = 5.0f;
114 #endif
115 
116  //!!!!!!!!!!!!!!!!!!!
117  //engineConfiguration->isFastAdcEnabled = false;
118 }
119 
122 }
Gpio getWarningLedPin()
Gpio getCommsLedPin()
Gpio getRunningLedPin()
Gpio
@ Unassigned
void setBoardDefaultConfiguration()
void setAdcChannelOverrides()
for(i=0;i< numSectors;i++)
Definition: flash_int.cpp:63
void setCrankOperationMode()
void setAlgorithm(engine_load_mode_e algo)
engine_configuration_s * engineConfiguration
brain_input_pin_e triggerInputPins[TRIGGER_INPUT_PIN_COUNT]
constexpr int convertVoltageTo10bitADC(float voltage)
Definition: tps.h:21
Position sensor hardware layer.
void addAdcChannelForTrigger(void)