diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index bd7be886b0..23871634f3 100644 --- a/firmware/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Aug 12 12:04:29 EDT 2017 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Aug 17 02:29:38 EDT 2017 // begin #ifndef ENGINE_CONFIGURATION_GENERATED_H_ #define ENGINE_CONFIGURATION_GENERATED_H_ @@ -1603,7 +1603,11 @@ typedef struct { /** * offset 2176 */ - float unusedalternatorControl[2]; + brain_pin_e LIS302DLCsPin; + /** + * offset 2180 + */ + float unusedalternatorControl; /** * offset 2184 */ @@ -2154,4 +2158,4 @@ typedef struct { #endif // end -// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Aug 12 12:04:29 EDT 2017 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Aug 17 02:29:38 EDT 2017 diff --git a/firmware/controllers/algo/rusefi_generated.h b/firmware/controllers/algo/rusefi_generated.h index bfee756f18..81005e1cb4 100644 --- a/firmware/controllers/algo/rusefi_generated.h +++ b/firmware/controllers/algo/rusefi_generated.h @@ -1124,8 +1124,10 @@ #define iacByTpsTaper_offset_hex 87c #define unusedShort_offset 2174 #define unusedShort_offset_hex 87e -#define unusedalternatorControl_offset 2176 -#define unusedalternatorControl_offset_hex 880 +#define LIS302DLCsPin_offset 2176 +#define LIS302DLCsPin_offset_hex 880 +#define unusedalternatorControl_offset 2180 +#define unusedalternatorControl_offset_hex 884 #define tpsAccelLength_offset 2184 #define tpsAccelLength_offset_hex 888 #define tpsAccelEnrichmentThreshold_offset 2188 diff --git a/firmware/hw_layer/hw_layer.mk b/firmware/hw_layer/hw_layer.mk index d0324de7dd..59b5e76de5 100644 --- a/firmware/hw_layer/hw_layer.mk +++ b/firmware/hw_layer/hw_layer.mk @@ -17,6 +17,7 @@ HW_LAYER_EMS_CPP = $(HW_LAYER_EGT_CPP) \ $(PROJECT_DIR)/hw_layer/hardware.cpp \ $(PROJECT_DIR)/hw_layer/neo6m.cpp \ $(PROJECT_DIR)/hw_layer/mmc_card.cpp \ + $(PROJECT_DIR)/hw_layer/mems.cpp \ $(PROJECT_DIR)/hw_layer/lcd/lcd_HD44780.cpp \ $(PROJECT_DIR)/hw_layer/adc_inputs.cpp \ $(PROJECT_DIR)/hw_layer/board_test.cpp \ diff --git a/firmware/hw_layer/mems.cpp b/firmware/hw_layer/mems.cpp new file mode 100644 index 0000000000..5aa7ab407b --- /dev/null +++ b/firmware/hw_layer/mems.cpp @@ -0,0 +1,23 @@ +/* + * @file mems.cpp + * + * stm32f4discovery has MEMS LIS302DL + * + * SPI1 + * LIS302DL_SPI_SCK PA5 + * LIS302DL_SPI_MISO PA6 + * LIS302DL_SPI_MOSI PA7 + * LIS302DL_SPI_CS_PIN PE3 + * + * @date Aug 17, 2017 + * @author Andrey Belomutskiy, (c) 2012-2017 + */ + +#include "mems.h" + + +void initMemsPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) { + +} + + diff --git a/firmware/hw_layer/mems.h b/firmware/hw_layer/mems.h new file mode 100644 index 0000000000..8c81b98292 --- /dev/null +++ b/firmware/hw_layer/mems.h @@ -0,0 +1,16 @@ +/* + * @mems mems.h + * + * @date Aug 17, 2017 + * @author Andrey Belomutskiy, (c) 2012-2017 + */ + +#ifndef HW_LAYER_MEMS_H_ +#define HW_LAYER_MEMS_H_ + +#include "main.h" +#include "engine_configuration.h" + +void initMemsPins(DECLARE_ENGINE_PARAMETER_SIGNATURE); + +#endif /* HW_LAYER_MEMS_H_ */ diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 3089db3a56..d27dd8f270 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -725,8 +725,9 @@ custom pin_mode_e 4 bits, U32, @OFFSET@, [0:5], @@pin_mode_e_enum@@ int16_t unusedShortHere;;"seconds", 1, 0, 0, 6000, 0 int16_t iacByTpsTaper;Extra IAC, in percent between 0 and 100, tapered between zero and idle deactivation TPS value;"percent", 1, 0, 0, 500, 0 - int16_t unusedShort; - float[2] unusedalternatorControl; + int16_t unusedShort; + brain_pin_e LIS302DLCsPin; + float unusedalternatorControl; int tpsAccelLength;;"cycles", 1, 0, 1, 200, 0 float tpsAccelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3 diff --git a/java_console/models/src/com/rusefi/config/Fields.java b/java_console/models/src/com/rusefi/config/Fields.java index 2afd324123..ae67755842 100644 --- a/java_console/models/src/com/rusefi/config/Fields.java +++ b/java_console/models/src/com/rusefi/config/Fields.java @@ -1,6 +1,6 @@ package com.rusefi.config; -// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Aug 12 12:04:29 EDT 2017 +// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Aug 17 02:29:38 EDT 2017 public class Fields { public static final int LE_COMMAND_LENGTH = 200; public static final int BLOCKING_FACTOR = 400; @@ -816,8 +816,10 @@ public class Fields { public static final int unusedShortHere_offset = 2170; public static final int iacByTpsTaper_offset = 2172; public static final int unusedShort_offset = 2174; - public static final int unusedalternatorControl_offset = 2176; - public static final int unusedalternatorControl_offset_hex = 880; + public static final int LIS302DLCsPin_offset = 2176; + public static final int LIS302DLCsPin_offset_hex = 880; + public static final int unusedalternatorControl_offset = 2180; + public static final int unusedalternatorControl_offset_hex = 884; public static final int tpsAccelLength_offset = 2184; public static final int tpsAccelLength_offset_hex = 888; public static final int tpsAccelEnrichmentThreshold_offset = 2188; @@ -1621,6 +1623,8 @@ public class Fields { public static final Field UNUSEDSHORTHERE = Field.create("UNUSEDSHORTHERE", 2170, FieldType.INT); public static final Field IACBYTPSTAPER = Field.create("IACBYTPSTAPER", 2172, FieldType.INT); public static final Field UNUSEDSHORT = Field.create("UNUSEDSHORT", 2174, FieldType.INT); + public static final Field LIS302DLCSPIN = Field.create("LIS302DLCSPIN", 2176, FieldType.INT, brain_pin_e); + public static final Field UNUSEDALTERNATORCONTROL = Field.create("UNUSEDALTERNATORCONTROL", 2180, FieldType.FLOAT); public static final Field TPSACCELLENGTH = Field.create("TPSACCELLENGTH", 2184, FieldType.INT); public static final Field TPSACCELENRICHMENTTHRESHOLD = Field.create("TPSACCELENRICHMENTTHRESHOLD", 2188, FieldType.FLOAT); public static final Field VVTOFFSET = Field.create("VVTOFFSET", 2192, FieldType.FLOAT);