2014-09-24 19:33:12 +02:00
|
|
|
APPLICATION = driver_pir
|
|
|
|
include ../Makefile.tests_common
|
|
|
|
|
2014-10-01 17:24:27 +02:00
|
|
|
FEATURES_REQUIRED = periph_gpio
|
2014-09-24 19:33:12 +02:00
|
|
|
|
|
|
|
# Define default pin mappings for some boards:
|
|
|
|
ifneq (,$(filter stm32f4discovery,$(BOARD)))
|
2015-09-29 18:30:24 +02:00
|
|
|
export PIR_GPIO ?= GPIO_PIN\(3,7\)
|
2014-09-24 19:33:12 +02:00
|
|
|
endif
|
|
|
|
ifneq (,$(filter arduino-due,$(BOARD)))
|
2015-09-29 18:30:24 +02:00
|
|
|
export PIR_GPIO ?= GPIO_PIN\(0,20\)
|
2014-09-24 19:33:12 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
USEMODULE += pir
|
2015-09-03 21:36:13 +02:00
|
|
|
USEMODULE += xtimer
|
2014-09-24 19:33:12 +02:00
|
|
|
|
|
|
|
ifneq (,$(PIR_GPIO))
|
|
|
|
CFLAGS += -DPIR_GPIO=$(PIR_GPIO)
|
2014-10-06 18:53:26 +02:00
|
|
|
else
|
|
|
|
# set random default
|
2015-09-29 18:30:24 +02:00
|
|
|
CFLAGS += -DPIR_GPIO=GPIO_PIN\(0,0\)
|
2014-09-24 19:33:12 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
include $(RIOTBASE)/Makefile.include
|
|
|
|
|
|
|
|
all-polling: CFLAGS += -DTEST_PIR_POLLING
|
|
|
|
|
|
|
|
all-polling: all
|
|
|
|
|
|
|
|
all-interrupt: all
|