tests/driver_pir: simplified Makefile
This commit is contained in:
parent
23c3315654
commit
3ee0980243
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user