auto-sync
This commit is contained in:
parent
e0db131319
commit
b6d642fb79
|
@ -108,9 +108,7 @@ void setFordInline6(engine_configuration_s *engineConfiguration, board_configura
|
||||||
boardConfiguration->triggerInputPins[0] = GPIOA_8;
|
boardConfiguration->triggerInputPins[0] = GPIOA_8;
|
||||||
boardConfiguration->triggerInputPins[1] = GPIOA_5;
|
boardConfiguration->triggerInputPins[1] = GPIOA_5;
|
||||||
boardConfiguration->logicAnalyzerPins[0] = GPIOC_6;
|
boardConfiguration->logicAnalyzerPins[0] = GPIOC_6;
|
||||||
boardConfiguration->logicAnalyzerPins[1] = GPIOE_7;
|
boardConfiguration->logicAnalyzerPins[1] = GPIOE_5;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* EFI_SUPPORT_1995_FORD_INLINE_6 */
|
#endif /* EFI_SUPPORT_1995_FORD_INLINE_6 */
|
||||||
|
|
|
@ -27,6 +27,30 @@ static void setDefaultCrankingFuel(engine_configuration_s *engineConfiguration)
|
||||||
engineConfiguration->crankingSettings.fuelAtMinTempMs = 6;
|
engineConfiguration->crankingSettings.fuelAtMinTempMs = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void commonMiataNa(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
||||||
|
engineConfiguration->triggerConfig.triggerType = TT_MAZDA_MIATA_NA;
|
||||||
|
|
||||||
|
engineConfiguration->ignitionMode = IM_WASTED_SPARK;
|
||||||
|
|
||||||
|
// Frankenstein: high side #1 is PE8
|
||||||
|
// Frankenstein: high side #2 is PE10
|
||||||
|
// Frankenstein: high side #3 is PE12
|
||||||
|
// Frankenstein: high side #4 is PE14
|
||||||
|
// Frankenstein: high side #5 is PC9
|
||||||
|
// Frankenstein: high side #6 is PC7
|
||||||
|
|
||||||
|
boardConfiguration->ignitionPins[0] = GPIOE_12; // Frankenstein: high side #3
|
||||||
|
boardConfiguration->ignitionPins[1] = GPIOE_14; // Frankenstein: high side #4
|
||||||
|
boardConfiguration->ignitionPins[2] = GPIO_NONE;
|
||||||
|
boardConfiguration->ignitionPins[3] = GPIO_NONE;
|
||||||
|
boardConfiguration->ignitionPinMode = OM_DEFAULT;
|
||||||
|
|
||||||
|
setDefaultCrankingFuel(engineConfiguration);
|
||||||
|
|
||||||
|
boardConfiguration->triggerSimulatorPinModes[0] = OM_OPENDRAIN;
|
||||||
|
boardConfiguration->triggerSimulatorPinModes[1] = OM_OPENDRAIN;
|
||||||
|
}
|
||||||
|
|
||||||
static void common079721_2351(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
static void common079721_2351(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
||||||
|
|
||||||
engineConfiguration->digitalChartSize = 150;
|
engineConfiguration->digitalChartSize = 150;
|
||||||
|
@ -59,23 +83,10 @@ static void common079721_2351(engine_configuration_s *engineConfiguration, board
|
||||||
}
|
}
|
||||||
|
|
||||||
void setMiata1990(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
void setMiata1990(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
||||||
engineConfiguration->triggerConfig.triggerType = TT_MAZDA_MIATA_NA;
|
|
||||||
|
|
||||||
common079721_2351(engineConfiguration, boardConfiguration);
|
common079721_2351(engineConfiguration, boardConfiguration);
|
||||||
|
|
||||||
|
commonMiataNa(engineConfiguration, boardConfiguration);
|
||||||
|
|
||||||
// Frankenstein: high side #1 is PE8
|
|
||||||
// Frankenstein: high side #2 is PE10
|
|
||||||
// Frankenstein: high side #3 is PE12
|
|
||||||
// Frankenstein: high side #4 is PE14
|
|
||||||
// Frankenstein: high side #5 is PC9
|
|
||||||
// Frankenstein: high side #6 is PC7
|
|
||||||
|
|
||||||
boardConfiguration->ignitionPins[0] = GPIOE_12; // Frankenstein: high side #3
|
|
||||||
boardConfiguration->ignitionPins[1] = GPIOE_14; // Frankenstein: high side #4
|
|
||||||
boardConfiguration->ignitionPins[2] = GPIO_NONE;
|
|
||||||
boardConfiguration->ignitionPins[3] = GPIO_NONE;
|
|
||||||
boardConfiguration->ignitionPinMode = OM_DEFAULT;
|
|
||||||
|
|
||||||
// Frankenstein: low side - inj #1: PC14
|
// Frankenstein: low side - inj #1: PC14
|
||||||
// Frankenstein: low side - inj #2: PC15
|
// Frankenstein: low side - inj #2: PC15
|
||||||
|
@ -143,7 +154,9 @@ void setFordEscortGt(engine_configuration_s *engineConfiguration, board_configur
|
||||||
* set_engine_type 20
|
* set_engine_type 20
|
||||||
*/
|
*/
|
||||||
void setMiata1994(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
void setMiata1994(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
||||||
engineConfiguration->triggerConfig.triggerType = TT_MAZDA_MIATA_NA;
|
|
||||||
|
commonMiataNa(engineConfiguration, boardConfiguration);
|
||||||
|
|
||||||
engineConfiguration->displacement = 1.839;
|
engineConfiguration->displacement = 1.839;
|
||||||
|
|
||||||
boardConfiguration->triggerSimulatorPins[0] = GPIOD_2; // 2G - YEL/BLU
|
boardConfiguration->triggerSimulatorPins[0] = GPIOD_2; // 2G - YEL/BLU
|
||||||
|
@ -158,11 +171,10 @@ void setMiata1994(engine_configuration_s *engineConfiguration, board_configurati
|
||||||
boardConfiguration->is_enabled_spi_2 = false;
|
boardConfiguration->is_enabled_spi_2 = false;
|
||||||
boardConfiguration->is_enabled_spi_3 = false;
|
boardConfiguration->is_enabled_spi_3 = false;
|
||||||
|
|
||||||
setDefaultCrankingFuel(engineConfiguration);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setMiata1996(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
void setMiata1996(engine_configuration_s *engineConfiguration, board_configuration_s *boardConfiguration) {
|
||||||
|
commonMiataNa(engineConfiguration, boardConfiguration);
|
||||||
|
|
||||||
setDefaultCrankingFuel(engineConfiguration);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -334,7 +334,7 @@ void setDefaultConfiguration(engine_configuration_s *engineConfiguration, board_
|
||||||
boardConfiguration->triggerInputPins[0] = GPIOC_6;
|
boardConfiguration->triggerInputPins[0] = GPIOC_6;
|
||||||
boardConfiguration->triggerInputPins[1] = GPIOA_5;
|
boardConfiguration->triggerInputPins[1] = GPIOA_5;
|
||||||
boardConfiguration->logicAnalyzerPins[0] = GPIOA_8;
|
boardConfiguration->logicAnalyzerPins[0] = GPIOA_8;
|
||||||
boardConfiguration->logicAnalyzerPins[1] = GPIOE_7;
|
boardConfiguration->logicAnalyzerPins[1] = GPIOE_7; // todo: E7 is not timer input, that's a bug!
|
||||||
|
|
||||||
boardConfiguration->idleThreadPeriod = 100;
|
boardConfiguration->idleThreadPeriod = 100;
|
||||||
boardConfiguration->consoleLoopPeriod = 200;
|
boardConfiguration->consoleLoopPeriod = 200;
|
||||||
|
|
|
@ -88,11 +88,35 @@ static uint32_t getAlternateFunctions(ICUDriver *driver) {
|
||||||
return 0xffffffff;
|
return 0xffffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
icuchannel_t getInputCaptureChannel(brain_pin_e hwPin) {
|
||||||
|
switch (hwPin) {
|
||||||
|
case GPIOA_5:
|
||||||
|
case GPIOA_8:
|
||||||
|
case GPIOC_6:
|
||||||
|
case GPIOE_5:
|
||||||
|
case GPIOE_9:
|
||||||
|
return ICU_CHANNEL_1;
|
||||||
|
|
||||||
|
case GPIOE_6:
|
||||||
|
case GPIOE_11:
|
||||||
|
return ICU_CHANNEL_2;
|
||||||
|
default:
|
||||||
|
firmwareError("Unexpected hw pin in getInputCaptureChannel %d", hwPin);
|
||||||
|
return ICU_CHANNEL_1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ICUDriver * getInputCaptureDriver(brain_pin_e hwPin) {
|
ICUDriver * getInputCaptureDriver(brain_pin_e hwPin) {
|
||||||
#if STM32_ICU_USE_TIM1
|
#if STM32_ICU_USE_TIM1
|
||||||
if (hwPin == GPIOA_8) {
|
if (hwPin == GPIOA_8) {
|
||||||
return &ICUD1;
|
return &ICUD1;
|
||||||
}
|
}
|
||||||
|
if (hwPin == GPIOE_9) {
|
||||||
|
return &ICUD1;
|
||||||
|
}
|
||||||
|
if (hwPin == GPIOE_11) {
|
||||||
|
return &ICUD1;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#if STM32_ICU_USE_TIM2
|
#if STM32_ICU_USE_TIM2
|
||||||
if (hwPin == GPIOA_5) {
|
if (hwPin == GPIOA_5) {
|
||||||
|
@ -105,7 +129,7 @@ ICUDriver * getInputCaptureDriver(brain_pin_e hwPin) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if STM32_ICU_USE_TIM9
|
#if STM32_ICU_USE_TIM9
|
||||||
if (hwPin == GPIOE_7) {
|
if (hwPin == GPIOE_5) {
|
||||||
return &ICUD9;
|
return &ICUD9;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue