diff --git a/nrf5/bluetooth/bluetooth_common.mk b/nrf5/bluetooth/bluetooth_common.mk index 94ed916414..f06190bee9 100644 --- a/nrf5/bluetooth/bluetooth_common.mk +++ b/nrf5/bluetooth/bluetooth_common.mk @@ -18,6 +18,13 @@ else ifeq ($(SD), s132) INC += -Ibluetooth/$(SD)_$(MCU_VARIANT)_$(SOFTDEV_VERSION)/$(SD)_$(MCU_VARIANT)_$(SOFTDEV_VERSION)_API/include/$(MCU_VARIANT) CFLAGS += -DBLUETOOTH_SD_DEBUG=1 CFLAGS += -DBLUETOOTH_SD=132 + +ifeq ($(SOFTDEV_VERSION), 2.0.1) + CFLAGS += -DBLE_API_VERSION=2 +else ifeq ($(SOFTDEV_vERSION), 3.0.0) + CFLAGS += -DBLE_API_VERSION=3 +endif + SOFTDEV_HEX_NAME = $(SD)_$(MCU_VARIANT)_$(SOFTDEV_VERSION)_softdevice.hex SOFTDEV_HEX_PATH = bluetooth/$(SD)_$(MCU_VARIANT)_$(SOFTDEV_VERSION) else