rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions
defaults.h File Reference

Functions

void setLeftRightBanksNeedBetterName ()
 
void setDefaultBaseEngine ()
 
void setDefaultFuel ()
 
void setDefaultIgnition ()
 
void setDefaultCranking ()
 
void setGDIFueling ()
 
void setHpfpLobeProfileAngle (int lobes)
 
void setGdiWallWetting ()
 
void setInline4 ()
 
void setDynoDefaults ()
 
void setupTLE9201 (Gpio controlPin, Gpio direction, Gpio disable, int dcIndex=0)
 
void setupTLE9201IncludingStepper (Gpio controlPin, Gpio direction, Gpio disable, int dcIndex=0)
 
void setPPSInputs (adc_channel_e pps1, adc_channel_e pps2)
 
void setPPSCalibration (float primaryUp, float primaryDown, float secondaryUp, float secondaryDown)
 
void setTPS1Inputs (adc_channel_e tps1, adc_channel_e tps2)
 
void setTPS1Calibration (uint16_t tpsMin, uint16_t tpsMax)
 
void setTPS1Calibration (uint16_t tpsMin, uint16_t tpsMax, uint16_t tps1SecondaryMin, uint16_t tps1SecondaryMax)
 
void setCustomMap (float lowValue, float mapLowValueVoltage, float highValue, float mapHighValueVoltage)
 
void setEtbPID (float p, float i, float d)
 
void defaultsOrFixOnBurn ()
 

Function Documentation

◆ defaultsOrFixOnBurn()

void defaultsOrFixOnBurn ( )

Definition at line 129 of file default_base_engine.cpp.

129 {
130 if (config->dynoCarCarMassKg == 0) {
132 }
133
136 }
137
140 }
143 }
144
147 }
150 }
153 }
154
157 }
160 }
163 }
164
167 }
168}
void setDynoDefaults()
static constexpr persistent_config_s * config
static constexpr engine_configuration_s * engineConfiguration

Referenced by setDefaultBaseEngine(), and validateConfigOnStartUpOrBurn().

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

◆ setCustomMap()

void setCustomMap ( float  lowValue,
float  mapLowValueVoltage,
float  highValue,
float  mapHighValueVoltage 
)

◆ setDefaultBaseEngine()

void setDefaultBaseEngine ( )

Definition at line 170 of file default_base_engine.cpp.

170 {
171 // Base Engine Settings
174#if MAX_CYLINDER_COUNT >= 4
175 setInline4();
176#else
177 // todo: invoke more complete one cylinder default?
179#endif
180
182
183 for (size_t i = 0; i < engineConfiguration->cylindersCount; i++) {
184 // one knock sensor by default. See also 'setLeftRightBanksNeedBetterName()'
185 // zero-based index
187 }
188
191
196
198
199#ifdef EFI_KLINE
200 engineConfiguration->kLinePeriodUs = 300 /* us*/;
202#endif
203
205
206 // it's useful to know what starting point is given tune based on
207 engineConfiguration->calibrationBirthday = compilationYear() * 10000 + compilationMonth() * 100 + compilationDay();
208
210
213
216
220
223
225
230
232
233 setLinearCurve(engineConfiguration->tractionControlSlipBins, /*from*/0.9, /*to*/1.2, 0.05);
235
237
239
241 // here we assume load is TPS
243
244 engineConfiguration->fuelAlgorithm = engine_load_mode_e::LM_SPEED_DENSITY;
245 // let's have valid default while we still have the field
246 engineConfiguration->debugMode = DBG_EXECUTOR;
247
248 engineConfiguration->speedometerPulsePerKm = 2485; // GM GMT800 platform
249
251 // this should not be below default rpm! maybe even make them equal?
253
254 // todo: this "2JZ" trigger is very powerful for many low tooth quantity applications
255 // todo: we might be getting closer to a re-name
256 // by the way 2GRFE intake likes position 160 / precision 20
257 // see also https://github.com/rusefi/rusefi/issues/7345
258 //
259 // 2JZ values
262
263 // Limits and Fallbacks
269
271
273
274 // CLT RPM limit table - just the X axis
275 copyArray(config->cltRevLimitRpmBins, { -20, 0, 40, 80 });
276
281// engineConfiguration->alsMinPps = 10;
285
287
292
296
297 // Trigger
299
300#if EFI_SIMULATOR
301 engineConfiguration->vvtMode[0] = VVT_SINGLE_TOOTH;
303 engineConfiguration->vvtPins[0] = Gpio::A0; // a random unused pin needed to unblock startSimplePwmExt()
304#endif // EFI_SIMULATOR
305
306#if EFI_SIMULATOR
307 // R
308 config->tcuSolenoidTable[0][0] = 99;
309 config->tcuSolenoidTable[0][1] = 1;
310 config->tcuSolenoidTable[0][2] = 2;
311 config->tcuSolenoidTable[0][3] = 3;
312 config->tcuSolenoidTable[0][4] = 4;
313 config->tcuSolenoidTable[0][5] = 5;
314 // P/N
315 config->tcuSolenoidTable[1][0] = 10;
316 config->tcuSolenoidTable[1][1] = 11;
317 config->tcuSolenoidTable[1][2] = 12;
318 config->tcuSolenoidTable[1][3] = 13;
319 config->tcuSolenoidTable[1][4] = 14;
320 config->tcuSolenoidTable[1][5] = 15;
321 config->tcuSolenoidTable[1][6] = 16;
322 config->tcuSolenoidTable[1][7] = 17;
323 config->tcuSolenoidTable[1][8] = 18;
324 config->tcuSolenoidTable[1][9] = 19;
325 // 1
326 config->tcuSolenoidTable[2][0] = 20;
327 config->tcuSolenoidTable[2][1] = 21;
328 config->tcuSolenoidTable[2][2] = 22;
329 // 2
330 config->tcuSolenoidTable[3][0] = 30;
331 config->tcuSolenoidTable[3][1] = 31;
332 config->tcuSolenoidTable[3][3] = 33;
333 // 3
334 config->tcuSolenoidTable[4][0] = 40;
335 config->tcuSolenoidTable[4][1] = 41;
336 config->tcuSolenoidTable[4][4] = 44;
337 // 4
338 config->tcuSolenoidTable[5][0] = 50;
339 config->tcuSolenoidTable[5][1] = 51;
340 config->tcuSolenoidTable[5][5] = 55;
341
342 // [tag:runNotSquareTest] huh why is this not a unit test?!
343 config->scriptTable4[0][0] = 140;
344 config->scriptTable4[0][1] = 141;
345 config->scriptTable4[0][2] = 142;
346 config->scriptTable4[0][3] = 143;
347 config->scriptTable4[0][4] = 144;
348 config->scriptTable4[0][5] = 145;
349
350 config->scriptTable4[1][0] = 240;
351 config->scriptTable4[1][1] = 241;
352 config->scriptTable4[1][2] = 242;
353 config->scriptTable4[1][3] = 243;
354 config->scriptTable4[1][4] = 244;
355 config->scriptTable4[1][5] = 245;
356
357 config->scriptTable4[4][0] = 40;
358 config->scriptTable4[4][2] = 41;
359 config->scriptTable4[4][3] = 42;
360 config->scriptTable4[4][4] = 43;
361 config->scriptTable4[4][5] = 44;
362 config->scriptTable4[4][5] = 45;
363
364 config->scriptTable4[5][0] = 50;
365 config->scriptTable4[5][1] = 51;
366 config->scriptTable4[5][2] = 52;
367 config->scriptTable4[5][3] = 53;
368 config->scriptTable4[5][4] = 54;
369 config->scriptTable4[5][5] = 55;
370
371#endif // EFI_SIMULATOR
372
374
375 // Default this to on - if you want to diagnose, turn it off.
377
382
383 engineConfiguration->etbSplit = MAX_TPS_PPS_DISCREPANCY;
384
385 // Advanced Trigger
386
387 // Battery and alternator
388 engineConfiguration->vbattDividerCoeff = ((float) (15 + 65)) / 15;
389
390#if EFI_ALTERNATOR_CONTROL
392#endif /* EFI_ALTERNATOR_CONTROL */
393
394 // Fuel pump
395 // todo: maybe change to 2s as default?
397
398 engineConfiguration->kLineBaudRate = KLINE_BAUD_RATE;
399
403
404
405 // Tachometer
406 // 50% duty cycle is the default for tach signal
410
413
416
417 //knock
418#ifdef KNOCK_SPECTROGRAM
423#endif
424
425 // Check engine light
426#if EFI_PROD_CODE
428#else
430#endif /* EFI_PROD_CODE */
431
433
434 // Oil pressure protection
438
439 engine->engineModules.apply_all([](auto & m) { m.setDefaultConfiguration(); });
440
442
443 // we invoke this last so that we can validate even defaults
445}
type_list< Mockable< InjectorModelPrimary >, Mockable< InjectorModelSecondary >,#if EFI_IDLE_CONTROL Mockable< IdleController >,#endif TriggerScheduler,#if EFI_HPFP &&EFI_ENGINE_CONTROL Mockable< HpfpController >,#endif #if EFI_ENGINE_CONTROL Mockable< ThrottleModel >,#endif #if EFI_ALTERNATOR_CONTROL AlternatorController,#endif MainRelayController, Mockable< IgnitionController >, Mockable< AcController >, PrimeController, DfcoController,#if EFI_HD_ACR HarleyAcr,#endif Mockable< WallFuelController >, KnockController, SensorChecker,#if EFI_ENGINE_CONTROL Mockable< LimpManager >,#endif #if EFI_VVT_PID VvtController1, VvtController2, VvtController3, VvtController4,#endif #if EFI_BOOST_CONTROL BoostController,#endif TpsAccelEnrichment,#if EFI_LAUNCH_CONTROL NitrousController,#endif #if EFI_LTFT_CONTROL LongTermFuelTrim,#endif ShortTermFuelTrim,#include "modules_list_generated.h" EngineModule > engineModules
Definition engine.h:198
void defaultsOrFixOnBurn()
static void mc33810defaults()
void setInline4()
static void setDefaultAlternatorParameters()
static void setGdiDefaults()
static EngineAccessor engine
Definition engine.h:421
uint8_t tractionControlSpeedBins[TRACTION_CONTROL_ETB_DROP_SPEED_SIZE]
scaled_channel< uint16_t, 100, 1 > tractionControlSlipBins[TRACTION_CONTROL_ETB_DROP_SLIP_SIZE]
scaled_channel< uint8_t, 1, 100 > maximumOilPressureBins[4]
uint8_t tcuSolenoidTable[TCU_SOLENOID_COUNT][TCU_GEAR_COUNT]
scaled_channel< int16_t, 1, 1 > cltRevLimitRpmBins[CLT_LIMITER_CURVE_SIZE]
uint8_t scriptTable4[TABLE_4_LOAD_SIZE][TABLE_4_RPM_SIZE]
scaled_channel< uint8_t, 1, 100 > maxKnockRetardRpmBins[KNOCK_TABLE_RPM_SIZE]
scaled_channel< uint8_t, 1, 100 > minimumOilPressureBins[8]
scaled_channel< uint8_t, 4, 1 > maxKnockRetardTable[KNOCK_TABLE_SIZE][KNOCK_TABLE_RPM_SIZE]
constexpr void setTable(TElement(&dest)[N][M], const VElement value)
void setRpmTableBin(TValue(&array)[TSize])
void setLinearCurve(TValue(&array)[TSize], float from, float to, float precision=0.01f)
void setDefaultVrThresholds()
Definition vr_pwm.cpp:57

Referenced by setDefaultEngineConfiguration().

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

◆ setDefaultCranking()

void setDefaultCranking ( )

Definition at line 6 of file default_cranking.cpp.

6 {
8
9 // Fuel
11
12 // Ignition
13 engineConfiguration->ignitionDwellForCrankingMs = DEFAULT_CRANKING_DWELL_MS;
14 engineConfiguration->crankingTimingAngle = DEFAULT_CRANKING_ANGLE;
15
16 // IAC
18 // should be 100 once tune is better
20 setLinearCurve(config->afterCrankingIACtaperDurationBins, CLT_CURVE_RANGE_FROM, 100, 1);
21
23
24 // After start enrichment
25#if !EFI_UNIT_TEST
26 // don't set this for unit tests, as it makes things more complicated to test
27 setLinearCurve(config->postCrankingCLTBins, /*from*/-20, /*to*/80, 20);
28 setLinearCurve(config->postCrankingDurationBins, /*from*/0, /*to*/150, 40);
30#endif
31
32 setLinearCurve(config->crankingTpsCoef, /*from*/1, /*to*/1, 1);
34
35 setLinearCurve(config->cltCrankingCorrBins, CLT_CURVE_RANGE_FROM, 100, 1);
36 setLinearCurve(config->cltCrankingCorr, 50, 50, 1); // now as % of idle valve/etb
37
38#if CRANKING_CURVE_SIZE == 8
39 // Cranking temperature compensation
40 static const float crankingCoef[] = {
41 2.8,
42 2.2,
43 1.8,
44 1.55,
45 1.3,
46 1.1,
47 1.0,
48 1.0
49 };
50 copyArray(config->crankingFuelCoef, crankingCoef);
51 copyArray(config->crankingFuelCoefE100, crankingCoef);
52
53 // Deg C
54 static const float crankingBins[] = {
55 -20,
56 -10,
57 5,
58 20,
59 35,
60 50,
61 65,
62 90
63 };
64 copyArray(config->crankingFuelBins, crankingBins);
65#endif
66 // Cranking cycle compensation
67
70
71 // X values are simply counting up cycle number starting at 1
72 for (size_t i = 0; i < efi::size(config->crankingCycleBins); i++) {
73 config->crankingCycleBins[i] = i + 1;
74 }
75
76 // Cranking ignition timing
78
79 static const float advanceBins[] = { 0, 200, 400, 1000 };
80 copyArray(config->crankingAdvanceBins, advanceBins);
81
83}
uint16_t afterCrankingIACtaperDuration[CLT_CRANKING_TAPER_CURVE_SIZE]
float crankingCycleBaseFuel[CRANKING_CYCLE_CLT_SIZE][CRANKING_CURVE_SIZE]
scaled_channel< int16_t, 100, 1 > crankingAdvance[CRANKING_ADVANCE_CURVE_SIZE]
float postCrankingFactor[CRANKING_ENRICH_CLT_COUNT][CRANKING_ENRICH_COUNT]
float afterCrankingIACtaperDurationBins[CLT_CRANKING_TAPER_CURVE_SIZE]
scaled_channel< uint16_t, 100, 1 > crankingFuelCoefE100[CRANKING_CURVE_SIZE]
uint16_t crankingAdvanceBins[CRANKING_ADVANCE_CURVE_SIZE]
void setArrayValues(TValue(&array)[TSize], float value)

Referenced by setDefaultEngineConfiguration().

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

◆ setDefaultFuel()

void setDefaultFuel ( )

By the way http://users.erols.com/srweiss/tableifc.htm has a LOT of data

Definition at line 314 of file default_fuel.cpp.

314 {
315 // Base injection configuration
317 engineConfiguration->injectionMode = IM_SEQUENTIAL;
318
319 /**
320 * By the way http://users.erols.com/srweiss/tableifc.htm has a LOT of data
321 */
325
326 // 9.0 = E100 pure ethanol
328
329 // Injector deadtime
332
333 // Tables
334 setFuelTablesLoadBin(10, 160);
336
339
342
345
348
352
353 setTable(config->injectionPhase, PORT_INJECTION_OFFSET);
354
355 // Charge temperature estimation
360 engineConfiguration->tChargeMode = TCHARGE_MODE_RPM_TPS;
366
367 // CLT correction table
369
370 // IAT correction table
371 // TODO
372
373 // Closed loop fuel correction
376
377 // Decel fuel cut
379
380 engineConfiguration->tpsAccelEnrichmentThreshold = 40; // TPS % change, per engine cycle
381
383
384 // TPS/TPS AE curve
386
387 // Some reasonable reference pressure that many vehicles use
389
391
392 // Lambda protection defaults
394
396
397 // Cut at 110% instantly
399 // Cut at 96% after 0.5 second
402}
static void setDefaultLtftSettings()
static void setDefaultWarmupFuelEnrichment()
static void setDefaultLambdaProtection()
void setDefaultWallWetting()
static void setBosch02880155868(injector_s &cfg)
static void setDefaultPriming()
static void setDefaultStftSettings()
static void setDefaultVETable()
static void setMazdaMiataNbTpsTps()
static void setDefaultFuelCutParameters()
static void setDefaultLambdaTable()
static void setDefaultWboSettings()
void setFuelTablesLoadBin(float minValue, float maxValue)
int16_t injectionPhase[INJ_PHASE_LOAD_COUNT][INJ_PHASE_RPM_COUNT]
scaled_channel< uint8_t, 1, 50 > tpsTspCorrValuesBins[TPS_TPS_ACCEL_CLT_CORR_TABLE]
scaled_channel< uint16_t, 100, 1 > mapEstimateTpsBins[MAP_EST_LOAD_COUNT]
scaled_channel< uint8_t, 50, 1 > predictiveMapBlendDurationValues[TPS_TPS_ACCEL_CLT_CORR_TABLE]
scaled_channel< uint8_t, 50, 1 > tpsTspCorrValues[TPS_TPS_ACCEL_CLT_CORR_TABLE]
scaled_channel< uint16_t, 100, 1 > mapEstimateTable[MAP_EST_LOAD_COUNT][MAP_EST_RPM_COUNT]
scaled_channel< uint8_t, 1, 50 > predictiveMapBlendDurationBins[TPS_TPS_ACCEL_CLT_CORR_TABLE]

Referenced by setDefaultEngineConfiguration().

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

◆ setDefaultIgnition()

void setDefaultIgnition ( )

Definition at line 101 of file default_ignition.cpp.

101 {
102 // Ignition base settings
104
105 engineConfiguration->timingMode = TM_DYNAMIC;
107
110
111 // Dwell table - a bit conservative but reasonable
113
116
117 // Multispark
119
120 // Ignition advance table
122 setTimingRpmBin(800, 7000);
123 buildTimingMap(35);
124
126
127 // CLT correction
129
130 // IAT correction
132
133 // Give default axes for cylinder trim tables
134#if IGN_TRIM_SIZE == 4
135 copyArray(config->ignTrimRpmBins, { 1000, 3000, 5000, 7000 });
136 copyArray(config->ignTrimLoadBins, { 20, 50, 80, 100 });
137#else
140#endif
141
142 // Default axes for VE blends
143 for (size_t i = 0; i < efi::size(config->ignBlends); i++) {
144 auto& blend = config->ignBlends[i];
145 setLinearCurve(blend.loadBins, 0, 100, 10);
146 setLinearCurve(blend.rpmBins, 0, 7000);
147
148 setLinearCurve(blend.blendBins, 0, 100);
149 setLinearCurve(blend.blendValues, 0, 100);
150 }
151}
static void setDefaultCltTimingCorrection()
static void setDefaultTrailingSparkTable()
static void buildTimingMap(float advanceMax)
static void setDefaultMultisparkParameters()
static void setDefaultIatTimingCorrection()
void setConstantDwell(floatms_t dwellMs)
Sets the same dwell time across the whole getRpm() range set dwell X.
void setTimingRpmBin(float from, float to)
scaled_channel< uint8_t, 10, 1 > dwellVoltageCorrVoltBins[DWELL_CURVE_SIZE]
scaled_channel< uint8_t, 50, 1 > dwellVoltageCorrValues[DWELL_CURVE_SIZE]

Referenced by setDefaultEngineConfiguration().

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

◆ setDynoDefaults()

void setDynoDefaults ( )

Definition at line 108 of file default_base_engine.cpp.

108 {
109 config->dynoRpmStep = 100;
110
112 config->dynoSaeBaro = STD_ATMOSPHERE;
114
118
122
123 config->dynoCarCarMassKg = 1000;
127 }

Referenced by defaultsOrFixOnBurn().

Here is the caller graph for this function:

◆ setEtbPID()

void setEtbPID ( float  p,
float  i,
float  d 
)

◆ setGDIFueling()

void setGDIFueling ( )

Definition at line 70 of file default_base_engine.cpp.

70 {
71#ifdef HW_HELLEN_8CHAN
73#endif
74
75 engineConfiguration->injectionMode = IM_SEQUENTIAL;
77 engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
78
80 // Use high pressure sensor
82 // Automatic compensation of injector flow based on rail pressure
83 engineConfiguration->injectorCompensationMode = ICM_SensedRailPressure;
84 // Reference rail pressure is 10 000 kPa = 100 bar
86 //setting "flat" 0.2 ms injector's lag time
88
92}
void setGdiWallWetting()
scaled_channel< int16_t, 100, 1 > battLagCorrTable[VBAT_INJECTOR_CURVE_PRESSURE_SIZE][VBAT_INJECTOR_CURVE_SIZE]

Referenced by alphax_4kgdi_defaultConfiguration(), commonPassatB6(), setGmGdi(), and setHyundaiPb().

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

◆ setGdiWallWetting()

void setGdiWallWetting ( )

◆ setHpfpLobeProfileAngle()

void setHpfpLobeProfileAngle ( int  lobes)

Definition at line 22 of file default_base_engine.cpp.

22 {
23#if HPFP_LOBE_PROFILE_SIZE == 16
24static const float hardCodedHpfpLobeProfileAnglesForThreeLobes[16] = {0.0, 7.5, 16.5, 24.0,
2532.0 , 40.0, 48.0, 56.0,
2664.0 , 72.0, 80.0, 88.0,
2796.0 , 103.5, 112.5, 120.0
28};
29
30 float multiplier = 3.0 / lobes;
31 for (size_t i = 0; i < HPFP_LOBE_PROFILE_SIZE; i++) {
32 config->hpfpLobeProfileAngle[i] = multiplier * hardCodedHpfpLobeProfileAnglesForThreeLobes[i];
33 }
34#endif // HPFP_LOBE_PROFILE_SIZE
35}
scaled_channel< uint8_t, 2, 1 > hpfpLobeProfileAngle[HPFP_LOBE_PROFILE_SIZE]

Referenced by set4CylGmEcotec3(), setBoschHDEV_5_injectors(), setFordEcoboost(), and setHyundaiPb().

Here is the caller graph for this function:

◆ setInline4()

void setInline4 ( )

◆ setLeftRightBanksNeedBetterName()

void setLeftRightBanksNeedBetterName ( )

file defaults.h

Definition at line 95 of file default_base_engine.cpp.

95 {
96 for (size_t i = 0; i < engineConfiguration->cylindersCount; i++) {
97 // zero-based index
99 }
100}

Referenced by setGmLs4(), and setSubaruEG33Defaults().

Here is the caller graph for this function:

◆ setPPSCalibration()

void setPPSCalibration ( float  primaryUp,
float  primaryDown,
float  secondaryUp,
float  secondaryDown 
)

◆ setPPSInputs()

void setPPSInputs ( adc_channel_e  pps1,
adc_channel_e  pps2 
)

◆ setTPS1Calibration() [1/2]

void setTPS1Calibration ( uint16_t  tpsMin,
uint16_t  tpsMax 
)

◆ setTPS1Calibration() [2/2]

void setTPS1Calibration ( uint16_t  tpsMin,
uint16_t  tpsMax,
uint16_t  tps1SecondaryMin,
uint16_t  tps1SecondaryMax 
)

Definition at line 462 of file default_base_engine.cpp.

462 {
463 setTPS1Calibration(tpsMin, tpsMax);
464
465
466 engineConfiguration->tps1SecondaryMin = tps1SecondaryMin;
467 engineConfiguration->tps1SecondaryMax = tps1SecondaryMax;
468}
void setTPS1Calibration(uint16_t tpsMin, uint16_t tpsMax)
Here is the call graph for this function:

◆ setTPS1Inputs()

void setTPS1Inputs ( adc_channel_e  tps1,
adc_channel_e  tps2 
)

Definition at line 452 of file default_base_engine.cpp.

Referenced by alphax_4kgdi_defaultConfiguration(), m74_9_boardDefaultConfiguration(), setDefaultSensorInputs(), setGmEcotec3(), setGmLs4(), setHarley(), setMercedesM111EngineConfiguration(), and setupDefaultSensorInputs().

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

◆ setupTLE9201()

void setupTLE9201 ( Gpio  controlPin,
Gpio  direction,
Gpio  disable,
int  dcIndex = 0 
)

Definition at line 503 of file default_base_engine.cpp.

503 {
504 // TLE9201 driver
505 // This chip has three control pins:
506 // DIR - sets direction of the motor
507 // PWM - pwm control (enable high, coast low)
508 // DIS - disables motor (enable low)
509
510 // PWM pin
511 engineConfiguration->etbIo[dcIndex].controlPin = controlPin;
512 // DIR pin
513 engineConfiguration->etbIo[dcIndex].directionPin1 = direction;
514 // Disable pin
516
517 // we only have pwm/dir, no dira/dirb
519}
static void disable(const char *param)
Definition settings.cpp:449

Referenced by alphax_4chan_defaultConfiguration(), alphax_4kgdi_boardConfigOverrides(), hellen154hyundai_f7_boardConfigOverrides(), hellen_gm_e67_boardConfigOverrides(), setupEtb(), and setupTLE9201IncludingStepper().

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

◆ setupTLE9201IncludingStepper()

void setupTLE9201IncludingStepper ( Gpio  controlPin,
Gpio  direction,
Gpio  disable,
int  dcIndex = 0 
)

Definition at line 521 of file default_base_engine.cpp.

521 {
522 setupTLE9201(controlPin, direction, disable, dcIndex);
523
524 // on SBC style stepper IAC fully-extended valve shaft would give least idle air
525 // fully-retracted valve shaft would give most idle air
526 int stepperIndexWeirdness = 1 - dcIndex;
527 engineConfiguration->stepperDcIo[stepperIndexWeirdness].controlPin = controlPin;
528 engineConfiguration->stepperDcIo[stepperIndexWeirdness].directionPin1 = direction;
530 engineConfiguration->stepperDcIo[stepperIndexWeirdness].disablePin = disable;
531}
@ Unassigned
void setupTLE9201(Gpio controlPin, Gpio direction, Gpio disable, int dcIndex)

Referenced by set8chanDefaultETBPins(), setDefaultETBPins(), setMegaUaefiBoardDefaultConfiguration(), and setUaefiDefaultETBPins().

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

Go to the source code of this file.