diff --git a/src/main/drivers/accgyro_spi_mpu6000.c b/src/main/drivers/accgyro_spi_mpu6000.c index aa2d7696e..b48338091 100644 --- a/src/main/drivers/accgyro_spi_mpu6000.c +++ b/src/main/drivers/accgyro_spi_mpu6000.c @@ -40,6 +40,9 @@ #include "sensor.h" #include "accgyro.h" #include "accgyro_mpu.h" + +#if defined(USE_GYRO_SPI_MPU6000) || defined(USE_ACC_SPI_MPU6000) + #include "accgyro_spi_mpu6000.h" static void mpu6000AccAndGyroInit(void); @@ -282,3 +285,5 @@ bool mpu6000SpiGyroDetect(gyro_t *gyro) return true; } + +#endif diff --git a/src/main/drivers/barometer_spi_bmp280.c b/src/main/drivers/barometer_spi_bmp280.c index a32d6d117..9d97343e1 100644 --- a/src/main/drivers/barometer_spi_bmp280.c +++ b/src/main/drivers/barometer_spi_bmp280.c @@ -25,6 +25,7 @@ #include "barometer.h" #include "barometer_bmp280.h" +#ifdef USE_BARO_SPI_BMP280 #define DISABLE_BMP280 IOHi(bmp280CsPin) #define ENABLE_BMP280 IOLo(bmp280CsPin) @@ -88,3 +89,4 @@ void bmp280_spi_get_up(void) bmp280_up = (int32_t)((((uint32_t)(data[0])) << 12) | (((uint32_t)(data[1])) << 4) | ((uint32_t)data[2] >> 4)); bmp280_ut = (int32_t)((((uint32_t)(data[3])) << 12) | (((uint32_t)(data[4])) << 4) | ((uint32_t)data[5] >> 4)); } +#endif diff --git a/src/main/main.c b/src/main/main.c index a41111761..8cf45ac7b 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -193,7 +193,7 @@ void init(void) EXTIInit(); #endif -#if defined(SPRACINGF3MINI) || defined(OMNIBUS) +#if defined(BUTTONS) gpio_config_t buttonAGpioConfig = { BUTTON_A_PIN, Mode_IPU,