diff --git a/firmware/Makefile b/firmware/Makefile index d122096cc2..b87fa5c3eb 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -186,8 +186,14 @@ include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk # EX files (optional). -include $(CHIBIOS)/os/ex/devices/ST/lis2dw12.mk -include $(CHIBIOS)/os/ex/devices/ST/lsm303agr.mk +ifeq ($(EFI_ONBOARD_MEMS_LIS2DW12),yes) + DDEFS += -DEFI_ONBOARD_MEMS_LIS2DW12=TRUE + include $(CHIBIOS)/os/ex/devices/ST/lis2dw12.mk +endif +ifeq ($(EFI_ONBOARD_MEMS_LIS2DH12),yes) + DDEFS += -DEFI_ONBOARD_MEMS_LIS2DH12=TRUE + include $(CHIBIOS)/os/ex/devices/ST/lsm303agr.mk +endif include $(CHIBIOS)/os/hal/lib/streams/streams.mk include $(CHIBIOS)/os/various/cpp_wrappers/chcpp.mk diff --git a/firmware/config/boards/hellen/hellen-honda-k/board.mk b/firmware/config/boards/hellen/hellen-honda-k/board.mk index d10b018254..115e13fa38 100644 --- a/firmware/config/boards/hellen/hellen-honda-k/board.mk +++ b/firmware/config/boards/hellen/hellen-honda-k/board.mk @@ -28,11 +28,11 @@ DDEFS += -DMMC_USE_MUTUAL_EXCLUSION=TRUE DDEFS += -DEFI_ONBOARD_MEMS=TRUE # May be it is LIS2DW12? -# DDEFS += -DEFI_ONBOARD_MEMS_LIS2DW12=TRUE +# EFI_ONBOARD_MEMS_LIS2DW12 = yes # DDEFS += -DLIS2DW12_USE_SPI=TRUE -DLIS2DW12_SHARED_SPI=TRUE # But on my board this is LIS2DH12 that is compatible with LSM303AGR -DDEFS += -DEFI_ONBOARD_MEMS_LIS2DH12=TRUE +EFI_ONBOARD_MEMS_LIS2DH12 = yes DDEFS += -DLSM303AGR_USE_SPI=TRUE -DLSM303AGR_USE_I2C=FALSE -DLSM303AGR_SHARED_SPI=TRUE include $(BOARDS_DIR)/hellen/hellen-common144.mk