Skip to content

Commit 75c8999

Browse files
committed
Support for skipping the NFCT as GPIO & SD defines
nrf52840_m2 makes use of these skips.
1 parent 4263c8f commit 75c8999

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,17 @@ CFLAGS += -Wno-cast-function-type
257257
# Defined Symbol (MACROS)
258258
CFLAGS += -D__HEAP_SIZE=0
259259
CFLAGS += -DCONFIG_GPIO_AS_PINRESET
260-
CFLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS
261-
CFLAGS += -DSOFTDEVICE_PRESENT
260+
261+
# Skip defining CONFIG_NFCT_PINS_AS_GPIOS if the device uses the NFCT.
262+
ifneq ($(USES_NFCT),yes)
263+
CFLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS
264+
endif
265+
266+
# Skip defining SOFTDEVICE_PRESENT if the device doesn't use a soft device.
267+
ifneq ($(NO_SOFT_DEVICE),yes)
268+
CFLAGS += -DSOFTDEVICE_PRESENT
269+
endif
270+
262271
CFLAGS += -DDFU_APP_DATA_RESERVED=7*4096
263272

264273
CFLAGS += -DUF2_VERSION='"$(GIT_VERSION) $(GIT_SUBMODULE_VERSIONS)"'

src/boards/nrf52840_m2/board.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
MCU_SUB_VARIANT = nrf52840
2-
CFLAGS += -UCONFIG_NFCT_PINS_AS_GPIOS -USOFTDEVICE_PRESENT
2+
USES_NFCT = yes
3+
NO_SOFT_DEVICE = yes

0 commit comments

Comments
 (0)