minimal pin configuration & EFI_COMMUNICATION_PIN fix
This commit is contained in:
parent
ed8fbe9b1e
commit
8594a29c6a
|
@ -79,6 +79,25 @@ void disableLCD(board_configuration_s *boardConfiguration) {
|
|||
boardConfiguration->HD44780_db7 = GPIO_UNASSIGNED;
|
||||
}
|
||||
|
||||
void setMinimalPinsEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
// not great implementation since we undo values which were set somewhere else
|
||||
// todo: maybe use prepareVoidConfiguration method?
|
||||
boardConfiguration->hip9011CsPin = GPIO_UNASSIGNED;
|
||||
boardConfiguration->hip9011IntHoldPin = GPIO_UNASSIGNED;
|
||||
CONFIGB(canTxPin) = GPIO_UNASSIGNED;
|
||||
CONFIGB(canRxPin) = GPIO_UNASSIGNED;
|
||||
CONFIGB(sdCardCsPin) = GPIO_UNASSIGNED;
|
||||
for (int i = 0;i<TRIGGER_INPUT_PIN_COUNT;i++) {
|
||||
CONFIGB(triggerInputPins)[i] = GPIO_UNASSIGNED;
|
||||
}
|
||||
CONFIGB(triggerSimulatorPins)[0] = GPIO_UNASSIGNED;
|
||||
CONFIGB(triggerSimulatorPins)[1] = GPIO_UNASSIGNED;
|
||||
CONFIGB(triggerSimulatorPins)[2] = GPIO_UNASSIGNED;
|
||||
CONFIGB(digitalPotentiometerSpiDevice) = SPI_NONE;
|
||||
engineConfiguration->accelerometerSpiDevice = SPI_NONE;
|
||||
CONFIGB(is_enabled_spi_1) = CONFIGB(is_enabled_spi_2) = CONFIGB(is_enabled_spi_3) = false;
|
||||
}
|
||||
|
||||
// todo: should this be renamed to 'setFrankensoConfiguration'?
|
||||
// todo: should this be part of more default configurations?
|
||||
void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
|
|
|
@ -13,7 +13,7 @@ void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|||
void setFrankenso_01_LCD(board_configuration_s *boardConfiguration);
|
||||
void disableLCD(board_configuration_s *boardConfiguration);
|
||||
void runSchedulingPrecisionTestIfNeeded(void);
|
||||
|
||||
void setMinimalPinsEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void setFrankensoBoardTestConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
#endif /* CONFIG_ENGINES_CUSTOM_ENGINE_H_ */
|
||||
|
|
|
@ -91,6 +91,8 @@ case MIATA_NA6_MAP:
|
|||
return "MIATA_NA6_MAP";
|
||||
case MIATA_NA6_VAF:
|
||||
return "MIATA_NA6_VAF";
|
||||
case MINIMAL_PINS:
|
||||
return "MINIMAL_PINS";
|
||||
case MINI_COOPER_R50:
|
||||
return "MINI_COOPER_R50";
|
||||
case MITSU_4G93:
|
||||
|
|
|
@ -289,6 +289,8 @@ void prepareVoidConfiguration(engine_configuration_s *engineConfiguration) {
|
|||
memset(engineConfiguration, 0, sizeof(engine_configuration_s));
|
||||
board_configuration_s *boardConfiguration = &engineConfiguration->bc;
|
||||
|
||||
boardConfiguration->canTxPin = GPIO_UNASSIGNED;
|
||||
boardConfiguration->canRxPin = GPIO_UNASSIGNED;
|
||||
setDefaultFsioParameters(engineConfiguration);
|
||||
|
||||
disableLCD(boardConfiguration);
|
||||
|
@ -970,10 +972,11 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
|
||||
engineConfiguration->alternatorPwmFrequency = 300;
|
||||
|
||||
#ifndef EFI_COMMUNICATION_PIN
|
||||
#define EFI_COMMUNICATION_PIN GPIOD_15
|
||||
#endif
|
||||
#ifdef EFI_COMMUNICATION_PIN
|
||||
engineConfiguration->communicationLedPin = EFI_COMMUNICATION_PIN;
|
||||
#else
|
||||
engineConfiguration->communicationLedPin = GPIOD_15; // blue LED on discovery
|
||||
#endif
|
||||
engineConfiguration->runningLedPin = GPIOD_12; // greeb LED on discovery
|
||||
setDefaultBasePins(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
|
@ -1116,6 +1119,9 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_EN
|
|||
case CUSTOM_ENGINE:
|
||||
setCustomEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
break;
|
||||
case MINIMAL_PINS:
|
||||
setMinimalPinsEngineConfiguration(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
break;
|
||||
case ACURA_RSX:
|
||||
setAcuraRSX(engineConfiguration);
|
||||
break;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Jan 25 21:07:52 EST 2019
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Jan 26 11:15:45 EST 2019
|
||||
// begin
|
||||
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
||||
#define ENGINE_CONFIGURATION_GENERATED_H_
|
||||
|
@ -533,7 +533,7 @@ typedef struct {
|
|||
/**
|
||||
* offset 288
|
||||
*/
|
||||
brain_input_pin_e triggerInputPins[3];
|
||||
brain_input_pin_e triggerInputPins[TRIGGER_INPUT_PIN_COUNT];
|
||||
/**
|
||||
* offset 300
|
||||
*/
|
||||
|
@ -2480,4 +2480,4 @@ typedef struct {
|
|||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Jan 25 21:07:52 EST 2019
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Jan 26 11:15:45 EST 2019
|
||||
|
|
|
@ -178,6 +178,10 @@ typedef enum {
|
|||
// see also MIATA_NA6_MAP = 41
|
||||
MIATA_NA6_VAF = 57,
|
||||
|
||||
/**
|
||||
* this configuration has as few pins configured as possible
|
||||
*/
|
||||
MINIMAL_PINS = 99,
|
||||
PROMETHEUS_DEFAULTS = 100,
|
||||
|
||||
Force_4_bytes_size_engine_type = ENUM_32_BITS,
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#define DIGIPOT_COUNT 4
|
||||
#define HW_MAX_ADC_INDEX 17
|
||||
#define TRIGGER_SIMULATOR_PIN_COUNT 3
|
||||
#define TRIGGER_INPUT_PIN_COUNT 3
|
||||
#define LOGIC_ANALYZER_CHANNEL_COUNT 4
|
||||
#define FSIO_COMMAND_COUNT 16
|
||||
#define AUX_PID_COUNT 4
|
||||
|
|
|
@ -100,6 +100,7 @@ struct_no_prefix engine_configuration_s
|
|||
#define DIGIPOT_COUNT 4
|
||||
#define HW_MAX_ADC_INDEX 17
|
||||
#define TRIGGER_SIMULATOR_PIN_COUNT 3
|
||||
#define TRIGGER_INPUT_PIN_COUNT 3
|
||||
#define LOGIC_ANALYZER_CHANNEL_COUNT 4
|
||||
#define FSIO_COMMAND_COUNT 16
|
||||
#define AUX_PID_COUNT 4
|
||||
|
@ -508,7 +509,7 @@ custom adc_channel_mode_e 4 bits, U32, @OFFSET@, [0:1], "Off", "Slow", "Fas
|
|||
brain_pin_e tachOutputPin;+This implementation produces one pulse per engine cycle. See also dizzySparkOutputPin.
|
||||
pin_output_mode_e tachOutputPinMode;
|
||||
|
||||
brain_input_pin_e[3 iterate] triggerInputPins;
|
||||
brain_input_pin_e[TRIGGER_INPUT_PIN_COUNT iterate] triggerInputPins;
|
||||
brain_pin_e mainRelayPin;
|
||||
|
||||
int idleThreadPeriod;
|
||||
|
|
Loading…
Reference in New Issue