Skip to content

Commit

Permalink
added build flag to conditionally compile extended features
Browse files Browse the repository at this point in the history
  • Loading branch information
EricB-ADI committed Jul 24, 2024
1 parent b5ea934 commit e14cdc4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Libraries/Cordio/controller/sources/ble/init/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void LlInitLlInit(void)
#endif

#if (BT_VER >= LL_VER_BT_CORE_SPEC_5_0)
#ifdef INIT_CENTRAL
#if defined(INIT_CENTRAL) && defined(INIT_EXTENDED)

This comment has been minimized.

Copy link
@kevin-gillespie

kevin-gillespie Jul 24, 2024

Contributor

We need to wrap only the LlExt* functions with INIT_EXTENDED. We still want to call LlPhyMasterInit.

LlExtScanMasterInit();
LlExtInitMasterInit();
LlPhyMasterInit();
Expand All @@ -165,7 +165,7 @@ void LlInitLlInit(void)
#endif
#endif

#ifdef INIT_PERIPHERAL
#if defined(INIT_PERIPHERAL) && defined(INIT_EXTENDED)
LlExtAdvSlaveInit();
LlPhySlaveInit();
#if (BT_VER >= LL_VER_BT_CORE_SPEC_5_2)
Expand Down
6 changes: 6 additions & 0 deletions Libraries/libs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,17 @@ endif
# ************************
LIB_CORDIO ?= 0
CODED_PHY_DEMO ?= 0
INIT_EXTENDED ?= 0
ifeq ($(LIB_CORDIO), 1)
# Include the Cordio Library
CORDIO_DIR ?= $(LIBS_DIR)/Cordio
include $(CORDIO_DIR)/platform/targets/maxim/build/cordio_lib.mk
PROJ_CFLAGS += -D__CORDIO__

ifeq ($(INIT_EXTENDED),1)
PROJ_CFLAGS += -DINIT_EXTENDED=1
endif

CHIP_REVISION ?= b
export CHIP_REVISION

Expand Down

0 comments on commit e14cdc4

Please sign in to comment.