tests/driver_pir: simplified Makefile

This commit is contained in:
Hauke Petersen 2015-11-03 15:27:25 +01:00
parent 23c3315654
commit 3ee0980243

View File

@ -3,23 +3,22 @@ include ../Makefile.tests_common
FEATURES_REQUIRED = periph_gpio
# Define default pin mappings for some boards:
ifneq (,$(filter stm32f4discovery,$(BOARD)))
export PIR_GPIO ?= GPIO_PIN\(3,7\)
endif
ifneq (,$(filter arduino-due,$(BOARD)))
export PIR_GPIO ?= GPIO_PIN\(0,20\)
endif
USEMODULE += pir
USEMODULE += xtimer
ifneq (,$(PIR_GPIO))
CFLAGS += -DPIR_GPIO=$(PIR_GPIO)
else
# set random default
CFLAGS += -DPIR_GPIO=GPIO_PIN\(0,0\)
# define parameters for selected boards
ifneq (,$(filter stm32f4discovery,$(BOARD)))
PIR_GPIO ?= GPIO_PIN\(3,7\)
endif
ifneq (,$(filter arduino-due,$(BOARD)))
PIR_GPIO ?= GPIO_PIN\(0,20\)
endif
# set default device parameters in case they are undefined
PIR_GPIO ?= GPIO_PIN\(0,0\)
# export parameters
CFLAGS += -DPIR_GPIO=$(PIR_GPIO)
include $(RIOTBASE)/Makefile.include