EFI_MEMS -> EFI_ONBOARD_MEMS

This commit is contained in:
Andrey Gusakov 2023-12-13 19:08:28 +03:00 committed by rusefillc
parent 9a26f985a6
commit e80c57fa5f
9 changed files with 18 additions and 21 deletions

View File

@ -141,8 +141,8 @@
#define EFI_CJ125 FALSE
#endif
#if !defined(EFI_MEMS) || defined(__DOXYGEN__)
#define EFI_MEMS FALSE
#if !defined(EFI_ONBOARD_MEMS) || defined(__DOXYGEN__)
#define EFI_ONBOARD_MEMS FALSE
#endif
#define EFI_INTERNAL_ADC TRUE

View File

@ -74,7 +74,7 @@ static void setHip9011FrankensoPinout() {
}
#endif
#if EFI_MEMS
#if EFI_ONBOARD_MEMS
static void configureAccelerometerPins() {
// 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
@ -84,7 +84,7 @@ static void configureAccelerometerPins() {
engineConfiguration->spi1misoPin = Gpio::A6;
engineConfiguration->spi1sckPin = Gpio::A5;
}
#endif // EFI_MEMS
#endif // EFI_ONBOARD_MEMS
/**
* @brief Hardware board-specific default configuration (GPIO pins, ADC channels, SPI configs etc.)
@ -98,10 +98,10 @@ void setBoardDefaultConfiguration() {
#endif /* EFI_HIP_9011 */
// set optional subsystem configs
#if EFI_MEMS
#if EFI_ONBOARD_MEMS
// this would override some values from above
configureAccelerometerPins();
#endif /* EFI_MEMS */
#endif /* EFI_ONBOARD_MEMS */

View File

@ -127,8 +127,8 @@
#define EFI_CJ125 FALSE
#endif
#if !defined(EFI_MEMS) || defined(__DOXYGEN__)
#define EFI_MEMS FALSE
#if !defined(EFI_ONBOARD_MEMS) || defined(__DOXYGEN__)
#define EFI_ONBOARD_MEMS FALSE
#endif
#ifndef EFI_INTERNAL_ADC

View File

@ -77,8 +77,8 @@
#undef EFI_MAIN_RELAY_CONTROL
#define EFI_MAIN_RELAY_CONTROL TRUE
#undef EFI_MEMS
#define EFI_MEMS FALSE
#undef EFI_ONBOARD_MEMS
#define EFI_ONBOARD_MEMS FALSE
#undef EFI_IDLE_PID_CIC
#define EFI_IDLE_PID_CIC TRUE

View File

@ -91,8 +91,8 @@
#undef EFI_MAIN_RELAY_CONTROL
#define EFI_MAIN_RELAY_CONTROL FALSE
#undef EFI_MEMS
#define EFI_MEMS FALSE
#undef EFI_ONBOARD_MEMS
#define EFI_ONBOARD_MEMS FALSE
#undef EFI_IDLE_PID_CIC
#define EFI_IDLE_PID_CIC TRUE

View File

@ -237,8 +237,8 @@
#define EFI_HIP_9011 FALSE
#endif
#if !defined(EFI_MEMS)
#define EFI_MEMS FALSE
#if !defined(EFI_ONBOARD_MEMS)
#define EFI_ONBOARD_MEMS FALSE
#endif
#ifndef EFI_INTERNAL_ADC

View File

@ -29,7 +29,7 @@
#include "bench_test.h"
#if EFI_MEMS
#if EFI_ONBOARD_MEMS
#include "accelerometer.h"
#endif

View File

@ -548,7 +548,7 @@ void initHardware() {
initWS2812();
#endif /* EFI_LED_WS2812 */
#if EFI_MEMS
#if EFI_ONBOARD_MEMS
initAccelerometer();
#endif

View File

@ -21,7 +21,7 @@
#include "accelerometer.h"
#include "hardware.h"
#if EFI_MEMS
#if EFI_ONBOARD_MEMS
#include "mpu_util.h"
#include "lis302dl.h"
#include "periodic_thread_controller.h"
@ -42,9 +42,6 @@ static const SPIConfig accelerometerCfg = {
SPI_CR1_8BIT_MODE,
.cr2 = SPI_CR2_8BIT_MODE
};
#endif /* EFI_MEMS */
#if EFI_MEMS
static THD_WORKING_AREA(ivThreadStack, UTILITY_THREAD_STACK_SIZE);
@ -93,4 +90,4 @@ void initAccelerometer() {
#endif /* HAL_USE_SPI */
}
#endif /* EFI_MEMS */
#endif /* EFI_ONBOARD_MEMS */