2016-05-19 19:03:18 -07:00
|
|
|
/*
|
|
|
|
* accelerometer.cpp
|
|
|
|
*
|
|
|
|
* @date May 19, 2016
|
2017-01-03 03:05:22 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2017
|
2016-05-19 19:03:18 -07:00
|
|
|
*/
|
|
|
|
|
2017-08-18 13:18:11 -07:00
|
|
|
#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;
|
|
|
|
}
|
|
|
|
|
2016-05-19 19:03:18 -07:00
|
|
|
|
2017-05-15 20:33:22 -07:00
|
|
|
void initAccelerometer(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
2016-05-19 19:03:18 -07:00
|
|
|
|
2016-05-23 17:02:39 -07:00
|
|
|
}
|
2016-05-19 19:03:18 -07:00
|
|
|
|
2017-05-15 20:33:22 -07:00
|
|
|
float getLongitudinalAcceleration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
2016-05-23 17:02:39 -07:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-05-15 20:33:22 -07:00
|
|
|
float getTransverseAcceleration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
2016-05-23 17:02:39 -07:00
|
|
|
return 0;
|
|
|
|
}
|