Commit 6ba22d9f authored by schneider's avatar schneider
Browse files

fix(sdk): Update (BLE) SDK to latest version

parent e08ab5df

Too many changes to show.

To preserve performance only 448 of 448+ files are displayed.
......@@ -98,6 +98,7 @@ const LlRtCfg_t _ll_cfg = {
const BbRtCfg_t _bb_cfg = {
/*clkPpm*/ 20,
/*rfSetupDelayUsec*/ BB_RF_SETUP_DELAY_US,
/*defaultTxPower*/ -10,
/*maxScanPeriodMsec*/ BB_MAX_SCAN_PERIOD_MS,
/*schSetupDelayUsec*/ BB_SCH_SETUP_DELAY_US
};
......
......@@ -55,13 +55,103 @@
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Toolchain/arm-none-eabi/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Toolchain/arm-none-eabi/include/sys&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Toolchain/lib/gcc/arm-none-eabi/6.3.1/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/wsf/common/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/wsf/common/include/util&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/platform/common/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/controller/sources/mac/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/ble-host/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/ble-profiles/include/app&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/ble-profiles/sources/profiles/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/wsf&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/wsf/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/wsf/include/util&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/wsf/sources&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/wsf/sources/util&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/wsf/sources/port&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/wsf/sources/port/baremetal&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/platform&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/platform/max32665&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/platform/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/include/app&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/apps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/apps/app&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/apps/app/common&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/anpc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/bas&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/blpc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/blps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/cpp&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/cscp&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/dis&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/fmpl&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/gap&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/gatt&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/glpc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/glps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/hid&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/hrpc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/hrps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/htpc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/htps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/paspc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/plxpc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/plxps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/rscp&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/scpps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/sensor&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/tipc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/udsc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/uribeacon&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/wdxc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/wdxs&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/wpc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/wspc&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/services&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/build&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-host&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-host/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-host/sources&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-host/sources/sec&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-host/sources/sec/common&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-host/sources/hci&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-host/sources/hci/dual_chip&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-host/sources/hci/common&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-host/sources/stack&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-host/sources/stack/att&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-host/sources/stack/l2c&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-host/sources/stack/hci&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-host/sources/stack/smp&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-host/sources/stack/dm&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-host/sources/stack/cfg&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/platform&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/platform/max32665&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/platform/common&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/platform/common/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/platform/common/sources&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/platform/common/sources/chci&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/platform/common/sources/bb&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/platform/common/sources/bb/ble&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/platform/common/sources/ll&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/include/common&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/include/ble&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/sources&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/sources/common&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/sources/common/bb&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/sources/common/sch&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/sources/ble&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/sources/ble/lhci&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/sources/ble/init&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/sources/ble/bb&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/sources/ble/sch&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/sources/ble/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/sources/ble/ll&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/sources/ble/lmgr&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/controller/sources/ble/lctr&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/thirdparty&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/link_layer/thirdparty/uecc&quot;"/>
</option>
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.68945223" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
</tool>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>
<configuration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1674944962" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
</extension>
</configuration>
<configuration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.1674944962" name="Debug">
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings Cross ARM" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
</extension>
</configuration>
</project>
......@@ -15,7 +15,7 @@
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.openocd.gdbServerExecutable" value="openocd"/>
<intAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.openocd.gdbServerGdbPortNumber" value="3333"/>
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.openocd.gdbServerLog" value=""/>
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.openocd.gdbServerOther" value="-s ${env_var:TOOLCHAIN_PATH}/share/openocd/scripts -f interface/ftdi/olimex-arm-usb-ocd-h.cfg -f interface/ftdi/olimex-arm-jtag-swd.cfg -f target/max32665.cfg"/>
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.openocd.gdbServerOther" value="-s ${env_var:TOOLCHAIN_PATH}/share/openocd/scripts -f interface/cmsis-dap.cfg -f target/max32665.cfg"/>
<intAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.openocd.gdbServerTelnetPortNumber" value="4444"/>
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.openocd.otherInitCommands" value=""/>
<stringAttribute key="ilg.gnuarmeclipse.debug.gdbjtag.openocd.otherRunCommands" value=""/>
......
......@@ -88,6 +88,16 @@ VPATH = .
# Where to find header files for this test
IPATH = .
##############################################################################
# OS Check/Utility definitions
ifeq '$(findstring ;,$(PATH))' ';'
BUILD_OS := Windows
else
BUILD_OS := $(shell uname 2>/dev/null || echo Unknown)
BUILD_OS := $(patsubst MSYS%,MSYS,$(BUILD_OS))
BUILD_OS := $(patsubst MINGW%,MSYS,$(BUILD_OS))
endif
################################################################################
# Project build configuration.
......@@ -96,16 +106,58 @@ IPATH = .
ifdef BTLE_APP_USE_LEGACY_API
ifeq "$(BTLE_APP_USE_LEGACY_API)" ""
BTLE_APP_USE_LEGACY_API_SPECIFIED=1
PROJ_CFLAGS+=-DBTLE_APP_USE_LEGACY_API=TRUE
else
ifeq "$(BTLE_APP_USE_LEGACY_API)" "0"
BTLE_APP_USE_LEGACY_API_SPECIFIED=0
else
ifeq "$(BTLE_APP_USE_LEGACY_API)" "FALSE"
BTLE_APP_USE_LEGACY_API_SPECIFIED=0
else
BTLE_APP_USE_LEGACY_API_SPECIFIED=1
PROJ_CFLAGS+=-DBTLE_APP_USE_LEGACY_API=TRUE
endif
endif
endif
else
BTLE_APP_USE_LEGACY_API_SPECIFIED=1
PROJ_CFLAGS+=-DBTLE_APP_USE_LEGACY_API=TRUE
endif
ifdef BTLE_APP_ENABLE_PERIODIC
ifeq "$(BTLE_APP_ENABLE_PERIODIC)" ""
BTLE_APP_ENABLE_PERIODIC_SPECIFIED=0
else
ifeq "$(BTLE_APP_ENABLE_PERIODIC)" "0"
BTLE_APP_ENABLE_PERIODIC_SPECIFIED=0
else
ifeq "$(BTLE_APP_ENABLE_PERIODIC)" "FALSE"
BTLE_APP_ENABLE_PERIODIC_SPECIFIED=0
else
BTLE_APP_ENABLE_PERIODIC_SPECIFIED=1
PROJ_CFLAGS+=-DBTLE_APP_ENABLE_PERIODIC=TRUE
endif
endif
endif
else
BTLE_APP_ENABLE_PERIODIC_SPECIFIED=0
endif
ifeq "$(BTLE_APP_USE_LEGACY_API_SPECIFIED)" "1"
ifeq "$(BTLE_APP_ENABLE_PERIODIC_SPECIFIED)" "1"
$(error Periodic advertising not compatible with legacy API.)
endif
endif
ifneq "$(BTLE_APP_ADV_TYPE)" "DM_ADV_NONCONN_UNDIRECT"
ifeq "$(BTLE_APP_ENABLE_PERIODIC_SPECIFIED)" "1"
$(error Periodic advertising not compatible with scannable or connectable modes.)
endif
endif
ifdef BTLE_APP_ADV_TYPE
ifneq "$(BTLE_APP_ADV_TYPE)" ""
PROJ_CFLAGS+=-DBTLE_APP_ADV_TYPE=$(BTLE_APP_ADV_TYPE)
endif
endif
ifdef CONSOLE_UART
......@@ -114,31 +166,26 @@ PROJ_CFLAGS+=-DCONSOLE_UART=$(CONSOLE_UART)
endif
endif
ENABLE_SDMA_SPECIFIED=0
ifdef ENABLE_SDMA
ifneq "$(ENABLE_SDMA)" ""
ifeq "$(ENABLE_SDMA)" "0"
undefine ENABLE_SDMA
ENABLE_SDMA=
else
ifeq "$(ENABLE_SDMA)" "FALSE"
undefine ENABLE_SDMA
ENABLE_SDMA=
else
ENABLE_SDMA=1
ENABLE_SDMA_SPECIFIED=1
endif
endif
endif
endif
ifneq "$(ENABLE_SDMA)" ""
ifdef BTLE_APP_USE_LEGACY_API
ifneq "$(BTLE_APP_USE_LEGACY_API)" ""
ifeq "$(BTLE_APP_USE_LEGACY_API)" "0"
ifeq "$(ENABLE_SDMA_SPECIFIED)" "1"
ifeq "$(BTLE_APP_USE_LEGACY_API_SPECIFIED)" "0"
$(error SDMA currently requires BTLE_APP_USE_LEGACY_API)
endif
ifeq "$(BTLE_APP_USE_LEGACY_API)" "FALSE"
$(error SDMA currently requires BTLE_APP_USE_LEGACY_API)
endif
endif
endif
endif
#-------------------------------------------------------------------------------
......@@ -149,7 +196,6 @@ endif
# Enable assertion checking for development
PROJ_CFLAGS+=-DMXC_ASSERT_ENABLE=TRUE
PROJ_CFLAGS+=-DWSF_TRACE_ENABLED=TRUE
PROJ_CFLAGS+=-DWSF_ASSERT_ENABLED=TRUE
# PROJ_CFLAGS+=-DLL_TRACE_ENABLED=TRUE
# PROJ_CFLAGS+=-DLL_DBG_PIN_ENABLED=TRUE
......
......@@ -41,6 +41,11 @@
Macros
**************************************************************************************************/
// Defined in dm_adv_ae.c
#define DM_ADV_SCANNABLE(advType) (((advType) == DM_ADV_CONN_UNDIRECT) || \
((advType) == DM_ADV_SCAN_UNDIRECT) || \
((advType) == DM_EXT_ADV_SCAN_DIRECT))
/**************************************************************************************************
Configurable Parameters
**************************************************************************************************/
......@@ -95,18 +100,47 @@ static const uint8_t beaconAdvDataDisc[] =
static const uint8_t beaconScanDataDisc[] =
{
/*! device name */
8, /*! length */
13, /*! length */
DM_ADV_TYPE_LOCAL_NAME, /*! AD type */
'D',
'M',
'a',
't',
's',
'x',
'i',
'm',
' ',
'T',
'X'
'B',
'e',
'a',
'c',
'o',
'n'
};
#else /* BTLE_APP_USE_LEGACY_API */
#if (defined(BTLE_APP_ADV_TYPE) && (DM_ADV_SCANNABLE(BTLE_APP_ADV_TYPE)))
static const uint8_t beaconExtScanDataDisc[] =
{
/*! device name */
13, /*! length */
DM_ADV_TYPE_LOCAL_NAME, /*! AD type */
'M',
'a',
'x',
'i',
'm',
' ',
'B',
'e',
'a',
'c',
'o',
'n'
};
#else /* (defined(BTLE_APP_ADV_TYPE) && (DM_ADV_SCANNABLE(BTLE_APP_ADV_TYPE))) */
/*! extended advertising and scan data, discoverable mode */
static const uint8_t beaconExtAdvDataDisc[] =
{
......@@ -122,31 +156,55 @@ static const uint8_t beaconExtAdvDataDisc[] =
UINT16_TO_BYTES(HCI_ID_ARM), /*! company ID */
/*! device name */
8, /*! length */
13, /*! length */
DM_ADV_TYPE_LOCAL_NAME, /*! AD type */
'D',
'M',
'a',
't',
's',
'x',
'i',
'm',
' ',
'T',
'X'
'B',
'e',
'a',
'c',
'o',
'n'
};
static const uint8_t beaconExtScanDataDisc[] =
#endif /* (defined(BTLE_APP_ADV_TYPE) && (DM_ADV_SCANNABLE(BTLE_APP_ADV_TYPE))) */
#ifdef BTLE_APP_ENABLE_PERIODIC
static const uint8_t beaconPerAdvData[] =
{
/*! device name */
8, /*! length */
22, /*! length */
DM_ADV_TYPE_LOCAL_NAME, /*! AD type */
'D',
'M',
'a',
't',
's',
'x',
'i',
'm',
' ',
'P',
'e',
'r',
'i',
'o',
'd',
'i',
'c',
' ',
'T',
'X'
'B',
'e',
'a',
'c',
'o',
'n'
};
#endif /* BTLE_APP_ENABLE_PERIODIC */
#endif /* BTLE_APP_USE_LEGACY_API */
/**************************************************************************************************
......@@ -211,31 +269,52 @@ void beaconDisplayStackVersion(const char *pVersion)
static void beaconSetup(dmEvt_t *pMsg)
{
#ifndef BTLE_APP_USE_LEGACY_API
uint8_t advHandle;
uint8_t aAdvHandles[1];
const size_t nAdvHandles = (sizeof(aAdvHandles)/sizeof(aAdvHandles[0]));
#endif /* BTLE_APP_USE_LEGACY_API */
/* For extended advertisements, select handle. */
#ifndef BTLE_APP_USE_LEGACY_API
aAdvHandles[0] = DM_ADV_HANDLE_DEFAULT;
#endif /* BTLE_APP_USE_LEGACY_API */
/* Send scannable advertisements. */
AppSetAdvType(DM_ADV_SCAN_UNDIRECT);
#ifdef BTLE_APP_ADV_TYPE
#ifdef BTLE_APP_USE_LEGACY_API
AppSetAdvType(BTLE_APP_ADV_TYPE);
#else /* BTLE_APP_USE_LEGACY_API */
AppExtSetAdvType(aAdvHandles[0], BTLE_APP_ADV_TYPE);
#endif /* BTLE_APP_USE_LEGACY_API */
#endif /* BTLE_APP_ADV_TYPE */
/* set advertising and scan response data for discoverable mode */
#ifdef BTLE_APP_USE_LEGACY_API
AppAdvSetData(APP_ADV_DATA_DISCOVERABLE, sizeof(beaconAdvDataDisc), (uint8_t *) beaconAdvDataDisc);
AppAdvSetData(APP_SCAN_DATA_DISCOVERABLE, sizeof(beaconScanDataDisc), (uint8_t *) beaconScanDataDisc);
#else /* BTLE_APP_USE_LEGACY_API */
AppExtAdvSetData(DM_ADV_HANDLE_DEFAULT, APP_ADV_DATA_DISCOVERABLE, sizeof(beaconExtAdvDataDisc), (uint8_t *) beaconExtAdvDataDisc, HCI_EXT_ADV_DATA_LEN);
AppExtAdvSetData(DM_ADV_HANDLE_DEFAULT, APP_SCAN_DATA_DISCOVERABLE, sizeof(beaconExtScanDataDisc), (uint8_t *) beaconExtScanDataDisc, HCI_EXT_ADV_DATA_LEN);
#if (defined(BTLE_APP_ADV_TYPE) && (DM_ADV_SCANNABLE(BTLE_APP_ADV_TYPE)))
AppExtAdvSetData(aAdvHandles[0], APP_SCAN_DATA_DISCOVERABLE, sizeof(beaconExtScanDataDisc), (uint8_t *) beaconExtScanDataDisc, HCI_EXT_ADV_DATA_LEN);
#else /* (defined(BTLE_APP_ADV_TYPE) && (DM_ADV_SCANNABLE(BTLE_APP_ADV_TYPE))) */
AppExtAdvSetData(aAdvHandles[0], APP_ADV_DATA_DISCOVERABLE, sizeof(beaconExtAdvDataDisc), (uint8_t *) beaconExtAdvDataDisc, HCI_EXT_ADV_DATA_LEN);
#endif /* (defined(BTLE_APP_ADV_TYPE) && (DM_ADV_SCANNABLE(BTLE_APP_ADV_TYPE))) */
#endif /* BTLE_APP_USE_LEGACY_API */
/* start advertising; automatically set connectable/discoverable mode and bondable mode */
#ifndef BTLE_APP_USE_LEGACY_API
advHandle = DM_ADV_HANDLE_DEFAULT;
#endif /* BTLE_APP_USE_LEGACY_API */
/* set periodic advertisement data. */
#ifdef BTLE_APP_ENABLE_PERIODIC
AppPerAdvSetData(aAdvHandles[0], sizeof(beaconPerAdvData), (uint8_t *) beaconPerAdvData, HCI_EXT_ADV_DATA_LEN);
#endif /* BTLE_APP_ENABLE_PERIODIC */
/* start advertising; automatically set connectable/discoverable mode and bondable mode */
#ifdef BTLE_APP_USE_LEGACY_API
AppAdvStart(APP_MODE_DISCOVERABLE);
#else /* BTLE_APP_USE_LEGACY_API */
AppExtAdvStart(1, &advHandle, APP_MODE_DISCOVERABLE);
AppExtAdvStart(nAdvHandles, &aAdvHandles[0], APP_MODE_DISCOVERABLE);
#endif /* BTLE_APP_USE_LEGACY_API */
/* start periodic advertisements */
#ifdef BTLE_APP_ENABLE_PERIODIC
AppPerAdvStart(aAdvHandles[0]);
#endif /* BTLE_APP_ENABLE_PERIODIC */
}
/*************************************************************************************************/
......@@ -266,6 +345,10 @@ static void beaconProcMsg(dmEvt_t *pMsg)
case DM_ADV_SET_START_IND:
uiEvent = APP_UI_ADV_SET_START_IND;
break;
case DM_PER_ADV_SET_START_IND:
uiEvent = APP_UI_PER_ADV_SET_START_IND;
break;
#endif /* BTLE_APP_IGNORE_EXT_EVENTS */
case DM_ADV_STOP_IND:
......@@ -276,6 +359,10 @@ static void beaconProcMsg(dmEvt_t *pMsg)
case DM_ADV_SET_STOP_IND:
uiEvent = APP_UI_ADV_SET_STOP_IND;
break;
case DM_PER_ADV_SET_STOP_IND:
uiEvent = APP_UI_PER_ADV_SET_STOP_IND;
break;
#endif /* BTLE_APP_IGNORE_EXT_EVENTS */
case DM_VENDOR_SPEC_IND:
......
......@@ -4,9 +4,16 @@
# Set to 0 to use 5.0 extended advertisements.
BTLE_APP_USE_LEGACY_API?=1
# UART used for console output.
# 1 by default.
CONSOLE_UART?=1
# Specifies whether periodic advertisements are used.
BTLE_APP_ENABLE_PERIODIC?=0
# Specifies the advertisement type used.
# Unspecified -> Use default (connectable).
# DM_ADV_SCAN_UNDIRECT -> Non-connectable scannable
# DM_ADV_NONCONN_UNDIRECT -> Non-connectable non-scannable
BTLE_APP_ADV_TYPE?=
#BTLE_APP_ADV_TYPE?=DM_ADV_NONCONN_UNDIRECT
#BTLE_APP_ADV_TYPE?=DM_ADV_SCAN_UNDIRECT
# Run link layer using SDMA.
ENABLE_SDMA?=0
......@@ -83,6 +83,7 @@ const LlRtCfg_t _ll_cfg = {
const BbRtCfg_t _bb_cfg = {
/*clkPpm*/ 20,
/*rfSetupDelayUsec*/ BB_RF_SETUP_DELAY_US,
/*defaultTxPower*/ -10,
/*maxScanPeriodMsec*/ BB_MAX_SCAN_PERIOD_MS,
/*schSetupDelayUsec*/ BB_SCH_SETUP_DELAY_US
};
......
......@@ -55,15 +55,103 @@
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Toolchain/arm-none-eabi/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Toolchain/arm-none-eabi/include/sys&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Toolchain/lib/gcc/arm-none-eabi/6.3.1/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/wsf/common/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/wsf/common/include/util&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/platform/common/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/controller/sources/mac/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/ble-host/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/ble-profiles/include/app&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/ble-profiles/sources/profiles/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/ble-profiles/sources/apps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/NDALibraries/BTLE/projects/ble-apps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/wsf&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/wsf/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/wsf/include/util&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/wsf/sources&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/wsf/sources/util&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/wsf/sources/port&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/wsf/sources/port/baremetal&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/platform&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/platform/max32665&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/platform/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/include/app&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/apps&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/apps/app&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/apps/app/common&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles&quot;"/>
<listOptionValue builtIn="false" value="&quot;${MAXIM_PATH}/Firmware/MAX32665/Libraries/BTLE/stack/ble-profiles/sources/profiles/anpc&quot;"/>