EFI_MEMS -> EFI_ONBOARD_MEMS
This commit is contained in:
parent
9a26f985a6
commit
e80c57fa5f
|
@ -141,8 +141,8 @@
|
||||||
#define EFI_CJ125 FALSE
|
#define EFI_CJ125 FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(EFI_MEMS) || defined(__DOXYGEN__)
|
#if !defined(EFI_ONBOARD_MEMS) || defined(__DOXYGEN__)
|
||||||
#define EFI_MEMS FALSE
|
#define EFI_ONBOARD_MEMS FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define EFI_INTERNAL_ADC TRUE
|
#define EFI_INTERNAL_ADC TRUE
|
||||||
|
|
|
@ -74,7 +74,7 @@ static void setHip9011FrankensoPinout() {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EFI_MEMS
|
#if EFI_ONBOARD_MEMS
|
||||||
static void configureAccelerometerPins() {
|
static void configureAccelerometerPins() {
|
||||||
// engineConfiguration->accelerometerCsPin = Gpio::E3; // we have a conflict with VVT output on Miata
|
// engineConfiguration->accelerometerCsPin = Gpio::E3; // we have a conflict with VVT output on Miata
|
||||||
// engineConfiguration->is_enabled_spi_1 = true; // we have a conflict with PA5 input pin
|
// engineConfiguration->is_enabled_spi_1 = true; // we have a conflict with PA5 input pin
|
||||||
|
@ -84,7 +84,7 @@ static void configureAccelerometerPins() {
|
||||||
engineConfiguration->spi1misoPin = Gpio::A6;
|
engineConfiguration->spi1misoPin = Gpio::A6;
|
||||||
engineConfiguration->spi1sckPin = Gpio::A5;
|
engineConfiguration->spi1sckPin = Gpio::A5;
|
||||||
}
|
}
|
||||||
#endif // EFI_MEMS
|
#endif // EFI_ONBOARD_MEMS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Hardware board-specific default configuration (GPIO pins, ADC channels, SPI configs etc.)
|
* @brief Hardware board-specific default configuration (GPIO pins, ADC channels, SPI configs etc.)
|
||||||
|
@ -98,10 +98,10 @@ void setBoardDefaultConfiguration() {
|
||||||
#endif /* EFI_HIP_9011 */
|
#endif /* EFI_HIP_9011 */
|
||||||
|
|
||||||
// set optional subsystem configs
|
// set optional subsystem configs
|
||||||
#if EFI_MEMS
|
#if EFI_ONBOARD_MEMS
|
||||||
// this would override some values from above
|
// this would override some values from above
|
||||||
configureAccelerometerPins();
|
configureAccelerometerPins();
|
||||||
#endif /* EFI_MEMS */
|
#endif /* EFI_ONBOARD_MEMS */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -127,8 +127,8 @@
|
||||||
#define EFI_CJ125 FALSE
|
#define EFI_CJ125 FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(EFI_MEMS) || defined(__DOXYGEN__)
|
#if !defined(EFI_ONBOARD_MEMS) || defined(__DOXYGEN__)
|
||||||
#define EFI_MEMS FALSE
|
#define EFI_ONBOARD_MEMS FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef EFI_INTERNAL_ADC
|
#ifndef EFI_INTERNAL_ADC
|
||||||
|
|
|
@ -77,8 +77,8 @@
|
||||||
#undef EFI_MAIN_RELAY_CONTROL
|
#undef EFI_MAIN_RELAY_CONTROL
|
||||||
#define EFI_MAIN_RELAY_CONTROL TRUE
|
#define EFI_MAIN_RELAY_CONTROL TRUE
|
||||||
|
|
||||||
#undef EFI_MEMS
|
#undef EFI_ONBOARD_MEMS
|
||||||
#define EFI_MEMS FALSE
|
#define EFI_ONBOARD_MEMS FALSE
|
||||||
|
|
||||||
#undef EFI_IDLE_PID_CIC
|
#undef EFI_IDLE_PID_CIC
|
||||||
#define EFI_IDLE_PID_CIC TRUE
|
#define EFI_IDLE_PID_CIC TRUE
|
||||||
|
|
|
@ -91,8 +91,8 @@
|
||||||
#undef EFI_MAIN_RELAY_CONTROL
|
#undef EFI_MAIN_RELAY_CONTROL
|
||||||
#define EFI_MAIN_RELAY_CONTROL FALSE
|
#define EFI_MAIN_RELAY_CONTROL FALSE
|
||||||
|
|
||||||
#undef EFI_MEMS
|
#undef EFI_ONBOARD_MEMS
|
||||||
#define EFI_MEMS FALSE
|
#define EFI_ONBOARD_MEMS FALSE
|
||||||
|
|
||||||
#undef EFI_IDLE_PID_CIC
|
#undef EFI_IDLE_PID_CIC
|
||||||
#define EFI_IDLE_PID_CIC TRUE
|
#define EFI_IDLE_PID_CIC TRUE
|
||||||
|
|
|
@ -237,8 +237,8 @@
|
||||||
#define EFI_HIP_9011 FALSE
|
#define EFI_HIP_9011 FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(EFI_MEMS)
|
#if !defined(EFI_ONBOARD_MEMS)
|
||||||
#define EFI_MEMS FALSE
|
#define EFI_ONBOARD_MEMS FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef EFI_INTERNAL_ADC
|
#ifndef EFI_INTERNAL_ADC
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
#include "bench_test.h"
|
#include "bench_test.h"
|
||||||
|
|
||||||
#if EFI_MEMS
|
#if EFI_ONBOARD_MEMS
|
||||||
#include "accelerometer.h"
|
#include "accelerometer.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -548,7 +548,7 @@ void initHardware() {
|
||||||
initWS2812();
|
initWS2812();
|
||||||
#endif /* EFI_LED_WS2812 */
|
#endif /* EFI_LED_WS2812 */
|
||||||
|
|
||||||
#if EFI_MEMS
|
#if EFI_ONBOARD_MEMS
|
||||||
initAccelerometer();
|
initAccelerometer();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "accelerometer.h"
|
#include "accelerometer.h"
|
||||||
#include "hardware.h"
|
#include "hardware.h"
|
||||||
|
|
||||||
#if EFI_MEMS
|
#if EFI_ONBOARD_MEMS
|
||||||
#include "mpu_util.h"
|
#include "mpu_util.h"
|
||||||
#include "lis302dl.h"
|
#include "lis302dl.h"
|
||||||
#include "periodic_thread_controller.h"
|
#include "periodic_thread_controller.h"
|
||||||
|
@ -42,9 +42,6 @@ static const SPIConfig accelerometerCfg = {
|
||||||
SPI_CR1_8BIT_MODE,
|
SPI_CR1_8BIT_MODE,
|
||||||
.cr2 = SPI_CR2_8BIT_MODE
|
.cr2 = SPI_CR2_8BIT_MODE
|
||||||
};
|
};
|
||||||
#endif /* EFI_MEMS */
|
|
||||||
|
|
||||||
#if EFI_MEMS
|
|
||||||
|
|
||||||
static THD_WORKING_AREA(ivThreadStack, UTILITY_THREAD_STACK_SIZE);
|
static THD_WORKING_AREA(ivThreadStack, UTILITY_THREAD_STACK_SIZE);
|
||||||
|
|
||||||
|
@ -93,4 +90,4 @@ void initAccelerometer() {
|
||||||
#endif /* HAL_USE_SPI */
|
#endif /* HAL_USE_SPI */
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* EFI_MEMS */
|
#endif /* EFI_ONBOARD_MEMS */
|
||||||
|
|
Loading…
Reference in New Issue