This commit is contained in:
parent
5f244108f3
commit
5faad39810
|
@ -43,7 +43,7 @@
|
|||
#include "HIP9011.h"
|
||||
#endif
|
||||
|
||||
#include "mems.h"
|
||||
#include "accelerometer.h"
|
||||
|
||||
#include "custom_engine.h"
|
||||
#include "engine_template.h"
|
||||
|
@ -937,7 +937,7 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
|
||||
#if EFI_MEMS || defined(__DOXYGEN__)
|
||||
// this would override some values from above
|
||||
initMemsPins(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
configureAccelerometerPins(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
#endif
|
||||
|
||||
boardConfiguration->spi2mosiPin = GPIOB_15;
|
||||
|
|
|
@ -5,8 +5,22 @@
|
|||
* @author Andrey Belomutskiy, (c) 2012-2017
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
//#include "lis302dl.h"
|
||||
#include "accelerometer.h"
|
||||
#include "lis302dl.h"
|
||||
#include "hardware.h"
|
||||
|
||||
EXTERN_ENGINE;
|
||||
|
||||
void configureAccelerometerPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
engineConfiguration->LIS302DLCsPin = GPIOE_3;
|
||||
// boardConfiguration->is_enabled_spi_1 = true; // we have a conflict with PA5 input pin
|
||||
|
||||
// stm32f4discovery defaults
|
||||
boardConfiguration->spi1mosiPin = GPIOA_7;
|
||||
boardConfiguration->spi1misoPin = GPIOA_6;
|
||||
boardConfiguration->spi1sckPin = GPIOA_5;
|
||||
}
|
||||
|
||||
|
||||
void initAccelerometer(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* accelerometer.h
|
||||
* @file accelerometer.h
|
||||
*
|
||||
* @date May 19, 2016
|
||||
* @author Andrey Belomutskiy, (c) 2012-2017
|
||||
|
@ -8,6 +8,10 @@
|
|||
#ifndef HW_LAYER_ACCELEROMETER_H_
|
||||
#define HW_LAYER_ACCELEROMETER_H_
|
||||
|
||||
#include "main.h"
|
||||
#include "engine.h"
|
||||
|
||||
void configureAccelerometerPins(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
void initAccelerometer(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
/**
|
||||
|
|
|
@ -14,22 +14,12 @@
|
|||
* @author Andrey Belomutskiy, (c) 2012-2017
|
||||
*/
|
||||
|
||||
#include "mems.h"
|
||||
#include "accelerometer.h"
|
||||
#include "lis302dl.h"
|
||||
#include "hardware.h"
|
||||
|
||||
EXTERN_ENGINE;
|
||||
|
||||
void initMemsPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||
engineConfiguration->LIS302DLCsPin = GPIOE_3;
|
||||
// boardConfiguration->is_enabled_spi_1 = true; // we have a conflict with PA5 input pin
|
||||
|
||||
// stm32f4discovery defaults
|
||||
boardConfiguration->spi1mosiPin = GPIOA_7;
|
||||
boardConfiguration->spi1misoPin = GPIOA_6;
|
||||
boardConfiguration->spi1sckPin = GPIOA_5;
|
||||
}
|
||||
|
||||
#if EFI_MEMS || defined(__DOXYGEN__)
|
||||
|
||||
static SPIDriver *spip = &SPID1; // todo: make this configurable
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
/*
|
||||
* @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.h"
|
||||
|
||||
void initMemsPins(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
|
||||
#endif /* HW_LAYER_MEMS_H_ */
|
Loading…
Reference in New Issue